Click here to get back home

ImageMagick and Xitami jpeg/bmp issue

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
ImageMagick and Xitami jpeg/bmp issue louloizides 06-28-2006
Posted by louloizides on June 28, 2006, 9:40 am
Please log in for more thread options


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.


Similar ThreadsPosted
ImageMagick and threads October 12, 2004, 1:44 pm
Any ImageMagick Gurus out there? I need HELP! November 7, 2006, 2:33 pm
how to use ImageMagick to compare 2 images? September 3, 2004, 11:05 pm
Newb Needs Help with Simple ImageMagick Module October 26, 2005, 11:02 am
debugging issue with Net::FTP January 1, 2005, 2:36 pm
net::telnet pm issue February 9, 2007, 3:33 pm
Possible Issue with HTML::TreeBuilder? July 5, 2005, 6:49 am
libwww-SSL Post Issue August 2, 2006, 4:04 pm
Illegal Immigration, the Non-Issue of the Week........................ March 30, 2006, 10:52 pm
Sybase Stored Procedure issue June 14, 2006, 12:27 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap