* @return legend dimensions
* @throws IOException
*/
public Dimension getLegendURLSize(StyleInfo style) throws Exception {
synchronized (style) {
GetLegendGraphicOutputFormat pngOutputFormat = new PNGLegendOutputFormat();
File sampleLegend = getSampleFile(style);
if (isSampleExisting(sampleLegend)
&& !isStyleSampleInvalid(style)) {
// using existing sample if sld has not been updated from