From d79c2c86ef0b69c4250642e3709f22a34fe7c8a0 Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" <> Date: Sat, 30 Jul 2005 07:46:39 +0000 Subject: Fix for bug 302083: automatically converts BMP files to PNG files to conserve disk space; patch by Greg Hendricks; r=myk, a=myk --- defparams.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'defparams.pl') diff --git a/defparams.pl b/defparams.pl index 09f2a5012..49448b9d9 100644 --- a/defparams.pl +++ b/defparams.pl @@ -209,6 +209,15 @@ sub check_user_verify_class { return ""; } +sub check_image_converter { + my ($value, $hash) = @_; + if ($value == 1){ + eval "require Image::Magick"; + return "Error requiring Image::Magick: '$@'" if $@; + } + return ""; +} + sub check_languages { my @languages = split /[,\s]+/, trim($_[0]); if(!scalar(@languages)) { @@ -1291,6 +1300,16 @@ Reason: %reason% default => '0', checker => \&check_numeric }, + + { + name => 'convert_uncompressed_images', + desc => 'If this option is on, attachments with content type image/bmp ' . + 'will be converted to image/png and compressed before uploading to'. + 'the database to conserve disk space.', + type => 'b', + default => 0, + checker => \&check_image_converter + }, { name => 'chartgroup', -- cgit v1.2.3-24-g4f1b