Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: glen_stewart [...] associate.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.40
Fixed in: (no value)



Subject: Memory Fault with .40pre2 on HP/UX with wide TIFFs
I'm trying to crop a wide TIFF image generated from a HPGL image using hp2xx. The image is too wide for us, so we plan to split it into two images using crop. This is a J16 size sheet. We have J24 and J32 that will be split into 3 and 4 sheets respectively - we hope (-: Am I misusing Imager, or is this a bug? Appreciate your help. Glen Using Perl 5.61. The script I'm running is: --- #!/opt/perl5/bin/perl -w use strict; use Imager; Imager::init(log=>"logfile.txt"); die "Usage: crop.pl filename\n" if !-f $ARGV[0]; my $file = shift; my $img=Imager->new(); $img->read(file=>$file) or die "error on \"$file\": ".$img->{ERRSTR}."\n"; my $newimg = $img->crop(width=>50, height=>50); $newimg->write(file=>"1_$file"); --- The logfile output is: --- [2002/06/28 15:41:11] log.c:35 0: Imager - log started (level = 1) [2002/06/28 15:41:11] Imager.xs:125 1: Imager 0.40pre2 starting [2002/06/28 15:41:11] iolayer.c:980 1: io_new_fd(fd 4) [2002/06/28 15:41:11] io.c:236 1: mymalloc(size 60) -> 401c0cc0 [2002/06/28 15:41:11] iolayer.c:992 1: (401c0cc0) <- io_new_fd [2002/06/28 15:41:11] iolayer.c:828 1: io_glue_commit_types(ig 401c0cc0) [2002/06/28 15:41:11] iolayer.c:829 1: io_glue_commit_types: source type 0 (FDSEEK) [2002/06/28 15:41:11] tiff.c:327 1: i_readtiff_wiol(ig 401c0cc0, length -1) [2002/06/28 15:41:11] tiff.c:118 1: i_readtiff_wiol: width=26408, height=10208, channels=1 [2002/06/28 15:41:11] tiff.c:119 1: i_readtiff_wiol: not tiled [2002/06/28 15:41:11] tiff.c:120 1: i_readtiff_wiol: not byte swapped [2002/06/28 15:41:11] image.c:352 1: i_img_empty_ch(*im 00000000, x 26408, y 10208, ch 1) [2002/06/28 15:41:11] io.c:236 1: mymalloc(size 128) -> 40015a30 [2002/06/28 15:41:11] io.c:236 1: mymalloc(size 269572864) -> 401c1808 [2002/06/28 15:41:12] image.c:369 1: (40015a30) <- i_img_empty_ch [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 200) -> 400a5840 [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 20) -> 401bec28 [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 7) -> 40122830 [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 4) -> 400686ac [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 7) -> 40122828 [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 4) -> 400686a8 [2002/06/28 15:41:12] tiff.c:264 1: i_readtiff_wiol: rowsperstrip=-888414101 ---
Download j16.tiff
image/tiff 47.4k
j16.tiff
Date: Sat, 29 Jun 2002 11:50:46 -0400 (EDT)
From: Arnar Mar Hrafnkelsson <addi [...] umich.edu>
To: Guest via RT <bug-Imager [...] rt.cpan.org>
Subject: Re: [cpan #1207] Memory Fault with .40pre2 on HP/UX with wide TIFFs
Hey Glen, I generated an image of that size and ran imager on it and it seemed to work quite ok... My guess is that the problem is either with the libtiff on the machine or the thing that generates the images. Can you run tiffinfo on the file in question and send me the output? -- Arnar On Fri, 28 Jun 2002, Guest via RT wrote: Show quoted text
> > > This message about Imager was sent to you by guest via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=1207 > > > I'm trying to crop a wide TIFF image generated from a HPGL image using hp2xx. The image is too wide for us, so we plan > to split it into two images using crop. This is a J16 size sheet. We have J24 and J32 that will be split into 3 and 4 sheets > respectively - we hope (-: > > Am I misusing Imager, or is this a bug? Appreciate your help. > > Glen > > > > Using Perl 5.61. The script I'm running is: > --- > #!/opt/perl5/bin/perl -w > use strict; > use Imager; > Imager::init(log=>"logfile.txt"); > die "Usage: crop.pl filename\n" if !-f $ARGV[0]; > my $file = shift; > my $img=Imager->new(); > $img->read(file=>$file) or die "error on \"$file\": ".$img->{ERRSTR}."\n"; > my $newimg = $img->crop(width=>50, height=>50); > $newimg->write(file=>"1_$file"); > --- > > The logfile output is: > --- > [2002/06/28 15:41:11] log.c:35 0: Imager - log started (level = 1) > [2002/06/28 15:41:11] Imager.xs:125 1: Imager 0.40pre2 starting > [2002/06/28 15:41:11] iolayer.c:980 1: io_new_fd(fd 4) > [2002/06/28 15:41:11] io.c:236 1: mymalloc(size 60) -> 401c0cc0 > [2002/06/28 15:41:11] iolayer.c:992 1: (401c0cc0) <- io_new_fd > [2002/06/28 15:41:11] iolayer.c:828 1: io_glue_commit_types(ig 401c0cc0) > [2002/06/28 15:41:11] iolayer.c:829 1: io_glue_commit_types: source type 0 (FDSEEK) > [2002/06/28 15:41:11] tiff.c:327 1: i_readtiff_wiol(ig 401c0cc0, length -1) > [2002/06/28 15:41:11] tiff.c:118 1: i_readtiff_wiol: width=26408, height=10208, channels=1 > [2002/06/28 15:41:11] tiff.c:119 1: i_readtiff_wiol: not tiled > [2002/06/28 15:41:11] tiff.c:120 1: i_readtiff_wiol: not byte swapped > [2002/06/28 15:41:11] image.c:352 1: i_img_empty_ch(*im 00000000, x 26408, y 10208, ch 1) > [2002/06/28 15:41:11] io.c:236 1: mymalloc(size 128) -> 40015a30 > [2002/06/28 15:41:11] io.c:236 1: mymalloc(size 269572864) -> 401c1808 > [2002/06/28 15:41:12] image.c:369 1: (40015a30) <- i_img_empty_ch > [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 200) -> 400a5840 > [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 20) -> 401bec28 > [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 7) -> 40122830 > [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 4) -> 400686ac > [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 7) -> 40122828 > [2002/06/28 15:41:12] io.c:236 1: mymalloc(size 4) -> 400686a8 > [2002/06/28 15:41:12] tiff.c:264 1: i_readtiff_wiol: rowsperstrip=-888414101 > --- >