Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: UVOELKER [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.51
Fixed in: (no value)



Subject: getpixel() fails on tiff image
Reading a tiff image and using getpixel... my $imager = Imager->new; $imager->read(file => 'imager.tiff', type => 'tiff'); my $col = $imager->getpixel(x => 1, y => 1); ... gives this error: Use of uninitialized value in subroutine entry at /opt/perl/perl-5.8.8/lib/site_perl/5.8.8/i686-linux/Imager.pm line 2578. Use of uninitialized value in subroutine entry at /opt/perl/perl-5.8.8/lib/site_perl/5.8.8/i686-linux/Imager.pm line 2578. im is not of type Imager::ImgRaw at /opt/perl/perl-5.8.8/lib/site_perl/5.8.8/i686-linux/Imager.pm line 2578. Thank you very much, bye, Uwe
Subject: tiff-bug.pl
#!/opt/bin/perl use warnings; use strict; use Imager; my $imager = Imager->new; $imager->read(file => 'imager.tiff', type => 'tiff'); my $col = $imager->getpixel(x => 1, y => 1);
Subject: imager.tiff
Download imager.tiff
image/tiff 10.8k
imager.tiff
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #20592] getpixel() fails on tiff image
Date: Fri, 21 Jul 2006 10:13:38 +1000
To: via RT <bug-Imager [...] rt.cpan.org>
From: Tony Cook <tony [...] develop-help.com>
On Thu, Jul 20, 2006 at 04:35:46PM -0400, via RT wrote: Show quoted text
> Reading a tiff image and using getpixel... > > > my $imager = Imager->new; > $imager->read(file => 'imager.tiff', type => 'tiff'); > > my $col = $imager->getpixel(x => 1, y => 1); > > > ... gives this error: > > Use of uninitialized value in subroutine entry at > /opt/perl/perl-5.8.8/lib/site_perl/5.8.8/i686-linux/Imager.pm line 2578. > Use of uninitialized value in subroutine entry at > /opt/perl/perl-5.8.8/lib/site_perl/5.8.8/i686-linux/Imager.pm line 2578. > im is not of type Imager::ImgRaw at > /opt/perl/perl-5.8.8/lib/site_perl/5.8.8/i686-linux/Imager.pm line 2578.
This probably means that Imager is failing to read the TIFF file, try adding an error handling clause to the read, so for example: $imager->read(file => 'imager.tiff', type => 'tiff') or die "Cannot read: ", $imager->errstr; If the message you get isn't enlightening, please run tiffdump on the image file, and supply me the output. Or supply the TIFF if it isn't too big. There have been some improvements in TIFF support in 0.51_03 (for 0.52 when it comes out), that may have fixed your problem. Or it may not have, TIFF is complex. I'm planning on improving Imager's TIFF support over the long term, but it's a complex format. == There's still a bug here, that getpixel() isn't checking for a live object before calling the low level function to get the pixel information. I'm not planning on fixing this for 0.52 since it's an old but minor problem, but I'll look at it for 0.53. Tony
Subject: Re: [rt.cpan.org #20592] getpixel() fails on tiff image
Date: Fri, 21 Jul 2006 08:38:14 +0200
To: bug-Imager [...] rt.cpan.org
From: Uwe Voelker <uwe.voelker [...] gmx.de>
Hello Tony, Show quoted text
> If the message you get isn't enlightening, please run tiffdump on the > image file, and supply me the output. Or supply the TIFF if it isn't > too big.
I will check the error message and report it to you. In the meantime I converted my pics to png and all works fine. The tiff image was already attached to the bug report. It is very tiny (11k). Thanks, Uwe
Subject: Re: [rt.cpan.org #20592] getpixel() fails on tiff image
Date: Fri, 21 Jul 2006 08:41:54 +0200
To: bug-Imager [...] rt.cpan.org
From: Uwe Voelker <uwe.voelker [...] gmx.de>
Hello Tony, Show quoted text
> This probably means that Imager is failing to read the TIFF file, try > adding an error handling clause to the read, so for example:
Cannot read: format 'tiff' not supported That propably means it disabled tiff support during the compilation/installation. Maybe because I didn't have the right libs. Sorry for disturbing you - I think this bug can be closed. Thanks, bye, Uwe
Thanks. Closing this ticket.