Ask a Question related to PERL Modules, Design and Development.
-
louloizides@yahoo.com #1
ImageMagick and Xitami jpeg/bmp issue
I have ActivePerl and ImageMagick installed on WinXP machine. I'm using
the Xitami webserver. I need to generate thumbnails of a few images on
the fly and I'm using the following code:
---------------------------------------------------
#!c:\perl\bin\perl.exe
use Image::Magick;
use CGI;
my $req = new CGI;
$fileName=$req->param("fileName");
print "Content-type: image/jpeg\r\n\r\n";
$imagefile="C:/pics$fileName";
$image=new Image::Magick( format => "jpeg" );
$image->Set(quality=>10);
$image->Read($imagefile);
$image->Resize(geometry=>'150x150');
binmode STDOUT;
$image->Write('jpg:-');
undef $image;
---------------------------------------------------
It creates the thumbnail fine and the image is obviously a small, poor
quality jpeg because the compression is clearly visible. The problem is
that when I right click on the image and go to save I only get the
option to save it as a bmp. So, because of this, I have no clue whether
the image is being transmitted as a jpeg or bmp. Does anyone know how
I'd be able to tell? If it is being transmitted as a bmp, does anyone
know why? These thumbnails, as jpegs, should be only a few kb each at
the most but the bmps are 40-50kb.
louloizides@yahoo.com Guest
-
4.0.3 Jpeg Size Issue Revisited
Rather than continue with the “Jpeg size bug in ID 4.0.3?” thread which I had started, I am starting a new thread on this issue partly because I... -
using imagemagick
Hello Would you please give me some good references and tutorials on how to use imagemagick in PHP. I am trying to create an extended gallery for... -
imagemagick
I need some help with imagemagick how is it possible to resize a pic to a fixed size (640x480) and if the image is too small (640x400) to fill up... -
Win98, PHP, and Imagemagick
I've been fighting with this for three days. Can anyone give me a clue as to what I need to do to make this script work? Win98 (first edition),... -
Making Xitami Start Automatically
Okay folks, here's one I can't solve no matter what. I've even used a kazillion search engines to locate a hint. I downloaded and built Xitami...



Reply With Quote

