From 6eec197b4ad9d396b6c33c5012155608ae4bd961 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 13 Aug 2009 21:32:15 +0000 Subject: Bug 480986: The BMP -> PNG conversion tool for new attachments should be an extension - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Attachment.pm | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'Bugzilla/Attachment.pm') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 5ba62e5e5..b1aecd5b0 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -568,24 +568,6 @@ sub _check_data { return $data if ref $data; $data || ThrowUserError('zero_length_file'); - - # This should go away, see bug 480986. - # Windows screenshots are usually uncompressed BMP files which - # makes for a quick way to eat up disk space. Let's compress them. - # We do this before we check the size since the uncompressed version - # could easily be greater than maxattachmentsize. - if (Bugzilla->params->{'convert_uncompressed_images'} - && $params->{mimetype} eq 'image/bmp') - { - require Image::Magick; - my $img = Image::Magick->new(magick=>'bmp'); - $img->BlobToImage($data); - $img->set(magick=>'png'); - my $imgdata = $img->ImageToBlob(); - $data = $imgdata; - $params->{mimetype} = 'image/png'; - } - # Make sure the attachment does not exceed the maximum permitted size. my $len = length($data); my $max_size = $params->{store_in_file} ? Bugzilla->params->{'maxlocalattachment'} * 1048576 -- cgit v1.2.3-24-g4f1b