GIF files have an internal, lossless LZW compression. I don't believe the format permits any other compression method, such as JPG, although I'm going on general knowledge here, not reading specs.

TIF files permit a variety of different compression methods, and I believe that Image::Magick supports all (or at least most) of them.

Image::Magick also supports many other graphics formats.

So if you are happy with (lossy) JPEG compression, why not use a JPEG file, which supports only that type of compression? Or use a TIF file with JPEG compression? Why try to invent JPEG compression in a GIF file? Do you have some particular reason to need a GIF file for some purpose? If you must have GIF, you are stuck with its capabilities and limitations.


On approximately 2/25/2004 1:01 AM, came the following characters from the keyboard of John:

Unfortunately, Image::Magick doen't support gif compression.

Here is my script


use Image::Magick;


my $image;

$image = Image::Magick->new;

$image->Read('test.bmp');
$image->Resize(geometry=>'800x800');
$image->Write(filename=>'test.gif', compression => 'JPEG', quality=>1,
monochrome =>True);

the 10MB bmp can be compressed to 100KB jpg (with 800x800 geometry)

Any more effective compression?



----- Original Message ----- From: "Glenn Linderman" <[EMAIL PROTECTED]>
To: "John" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, February 24, 2004 10:24 PM
Subject: Re: compress and convert a bmp




Sure, use Image::Magick

On approximately 2/24/2004 10:13 AM, came the following characters from
the keyboard of John:


Has anyone compressed and convert a bmp image through the perl?

Thanks in advance.


------------------------------------------------------------------------


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

-- Glenn -- http://nevcal.com/ =========================== The best part about procrastination is that you are never bored, because you have all kinds of things that you should be doing.





_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



-- Glenn -- http://nevcal.com/ =========================== The best part about procrastination is that you are never bored, because you have all kinds of things that you should be doing.

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to