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.

.



Relevant Pages

  • HTML to Graphic File?
    ... Is there a .NET component which can generate a Graphic File (JPEG, GIF, ... BMP, etc) from a URL? ... Basically I want to create thumbnails of several dynamic pages I have (via ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How do I get Access to recognize a bmp created in Photoshop?
    ... If you use a Bound OLE Frame you can use JPEG or bmp format, ... involves storing uncompressed images in the database (Photo Editor stores them uncompressed, ... Consequently the database swells rapidly towards the maximum Access file size. ...
    (microsoft.public.access.forms)
  • Re: How do I get Access to recognize a bmp created in Photoshop?
    ... If you use a Bound OLE Frame you can use JPEG (with Photo Editor) or bmp format, ... Consequently the database swells rapidly towards the maximum Access file size. ...
    (microsoft.public.access.forms)
  • Re: New free source image processing code
    ... sized PNG files of approximately 1 MB each as THUMBNAILS! ... you should resize the images and save as JPEG. ... They never envisioned this use for small images where it matters. ... BTW I agree it is antisocial to use large images scaled down by the WIDTH & HEIGHT specifiers, but that the specifiers should be used to allow the page to render immediately with placeholders. ...
    (sci.image.processing)
  • Re: C# Image
    ... The JPEG file size was only about 1.5MB. ... to the expected but the BMP is almost double. ... Having to use this method has its drawback - more memory is used while both ... The Mem Usage is noted before and after ...
    (microsoft.public.dotnet.general)