Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 1513
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: TONYC [...] cpan.org
Requestors: crome [...] devnetinc.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.41
Fixed in: (no value)



Subject: Dr. Watson/GPF when accessing TIFF images on WinXP
Whenever I try to read a TIFF image using Imager, Dr. Watson pays me a visit (ie, the program GPFs). I am using Windows XP Professional, ActiveState Perl 5.6.1.633, and a PPD of Imager version 0.41. All I am trying to do is deliver a multi-page TIFF to a client browser. I'm not sure if this code is correct, but seeing as how I can't even read the image it's difficult to work with ;) If I use a JPEG instead of a TIFF in the first block of code below, it works great. If I could get TIFF to work, I'd be in hog heaven. The code I have tried thus far includes: my $file = 'd:\test.tif'; my $img = Imager->new(); $img->open(file=>$file) or die $img->errstr(); # This line crashes binmode STDOUT; print $request->header(-type=>'image/tiff'); $img->write(type=>'tiff', fd=>fileno(STDOUT)) or die $img->errstr(); # First line crashes my @images = Imager->read_multi(file=>$file,type=>'tiff'); binmode STDOUT; print $request->header(-type=>'image/tiff'); Imager->write_multi({fd=>fileno(STDOUT),type=>'tiff'}, @images); I have provided a sample image at http://www.devnetinc.com/~crome/test.TIF.
[guest - Fri Sep 13 09:37:52 2002]: Show quoted text
> Whenever I try to read a TIFF image using Imager, Dr. Watson pays me a > visit (ie, the program GPFs). I am using Windows XP Professional, > ActiveState Perl 5.6.1.633, and a PPD of Imager version 0.41.
TIFFLIB was attempting to produce a warning about an unknown tag in the image, and crashing in the process. I'm not sure why it crashes. I have added a workaround to Imager CVS by setting a TIFFLIB warning handler while reading tiffs. Currently this just discards the message, but could be modified at some point to call back to a user supplied function (at the C level). The XS code could then supply a function which did a warn, or perhaps did a callback into perl. This file also revealed a problem when an input TIFF file had more than five images. Added a test and a fix. I'm not entirely happy with dropping the warnings into the bit bucket, so I'm leaving this ticket open for now.