my $NUMPROGRESS = 10000;
my @DIMENSIONS = (800,300);
my $RESRC_URL = '';
-my $IMG_FORMAT = 'png';
+my $img_format = 'png';
# Do not display data in pie where percentage is lower than this value
# to avoid label overlaping.
"q|quiet!" => \$quiet,
"p|progress!" => \$progress,
"pie-limit=i" => \$pie_percentage_limit,
+ "image-format=s" => \$img_format,
);
if ($ver) {
$pie_percentage_limit = 2 if ($pie_percentage_limit eq '');
$pie_percentage_limit = 100 if ($pie_percentage_limit > 100);
+# Set default download image format
+$img_format = lc($img_format);
+$img_format = 'jpeg' if ($img_format eq 'jpg');
+$img_format = 'png' if ($img_format ne 'jpeg');
+
# Extract the output directory from outfile so that graphs will
# be created in the same directoty
my @infs = fileparse($outfile);
"you can only get a VML image that you can use in Microsoft Office.<br />"
);
}
- graph.download.saveImage('$IMG_FORMAT');
+ graph.download.saveImage('$img_format');
};
document.getElementById('toimage$buttonid').onclick = function() {
if (Flotr.isIE && Flotr.isIE < 9) {
"you can only get a VML image that you can use in Microsoft Office.<br />"
);
}
- graph.download.saveImage('$IMG_FORMAT', null, null, true);
+ graph.download.saveImage('$img_format', null, null, true);
};
})(document.getElementById("$divid"));
"you can only get a VML image that you can use in Microsoft Office.<br />"
);
}
- graph.download.saveImage('$IMG_FORMAT');
+ graph.download.saveImage('$img_format');
};
document.getElementById('toimage$buttonid').onclick = function() {
if (Flotr.isIE && Flotr.isIE < 9) {
"you can only get a VML image that you can use in Microsoft Office.<br />"
);
}
- graph.download.saveImage('$IMG_FORMAT', null, null, true);
+ graph.download.saveImage('$img_format', null, null, true);
};