Page 1 of 1

Non 90deg Rotate() causes problems with $image->Get('page')

Posted: 2007-06-08T15:19:11-07:00
by wilburlo
Hi, I think I found a possible bug with image magick, if you can take a moment to look into it, that would be great.


Thank you

-daniel


BUG:
With perl magick; $image->Rotate() seams to mess up $image->Get('page')

OS:
FreeBSD [deleted] 6.1-STABLE FreeBSD 6.1-STABLE #1: Thu Jun 15 14:41:29 PDT 2006 [deleted] :/usr/obj/usr/src/sys/WWWv2 amd64

Image Magick Version: 6.3.3.10
>identify -version
Version: ImageMagick 6.3.3 05/01/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC

OUTPUT:
[3:16pm]/home/daniel>perl page_bug.pl
Image::Magick::VERSION = 6.3.3
Original: (this should work)
100x100+0+0
90deg: (this should work)
100x100+99+0
45deg: (yikes! No page size)
0x0+99+0

CODE:

#!/usr/bin/perl
use strict;
use warnings;
use Image::Magick;

print "Image::Magick::VERSION = $Image::Magick::VERSION\n";

my $image = Image::Magick->new();
print STDERR $image->Set('page'=>'100x100');
print STDERR $image->Read('xc:white');

print "Original: (this should work)\n";
print join 'x', $image->Get('page');
print "\n";

print STDERR $image->Rotate(degrees=>90);

print "90deg: (this should work)\n";
print join 'x', $image->Get('page');
print "\n";

print STDERR $image->Rotate(degrees=>45);

print "45deg: (yikes! No page size)\n";
print join 'x', $image->Get('page');
print "\n";

Re: Non 90deg Rotate() causes problems with $image->Get('page')

Posted: 2007-06-12T20:03:17-07:00
by anthony
The 0x0 means that the 'virtual' page size is now undefined, and the actual page size and offsets should be used as appropriate.

That has always been the case!