PerlMagick - append images not working
Posted: 2009-11-19T13:34:05-07:00
Hi,
I'm sure not if my question belongs to the user-forum or to the bug-forum.
After trying for several hours I believe that it could be a bug.
But because I'm new to this forum I decided to post in the user forum.
Perhaps am I doing something wrong.
I use PerlMagic which comes with ImageMagick-6.5.7-8.
My Perl Version is ActivePerl-5.8.9.826-MSWin32-x86-290470.
Operating System is Win XP Sp3.
Within Perl, the reading, manipulating (e.g. flop) and writing back of the images
is working without problems.
The problem starts, if I try to append 2 images to a single one :
Here ist my code :
my($image, $image2, $x);
$image = Image::Magick->new;
$image2 = Image::Magick->new;
$x = $image->Read("E:\\Tmp\\test\\test.bmp");
print ("read1 : $x\n");
$x = $image->Read("E:\\Tmp\\test\\test2.bmp");
print ("read2 : $x\n");
$x = $image->Append(stack=>true);
print ("append : >$x<\n");
$x = $image->Write("E:\\Tmp\\test\\new.bmp");
print ("write : $x\n");
outoput is :
read1 :
read2 :
append : >Image::Magick=ARRAY(0x1a183b0)<
write :
The result are 2 Files (new.bmp.0 and new.bmp.1)
I also tried this version :
my($image, $image2, $x);
$image = Image::Magick->new;
$image2 = Image::Magick->new;
$x = $image->Read("E:\\Tmp\\test\\test.bmp");
print ("read1 : $x\n");
$x = $image->Read("E:\\Tmp\\test\\test2.bmp");
print ("read2 : $x\n");
$x = $image_new = $image->Clone();
print ("Clone : $x\n");
$x = push (@$image_new, $image2);
print ("push : $x\n");
$x = $image_new->Append(stack=>true);
print ("append : >$x<\n");
$x = $image_new->Write("E:\\Tmp\\test\\new.bmp");
print ("write : $x\n");
outoput is :
read1 :
read2 :
Clone : Image::Magick=ARRAY(0x19e8e14)
push : 3
append : >Image::Magick=ARRAY(0x19e8c94)<
write :
The result ist the same; 2 Files.
What am I doing wrong ? ? ?
Shouldn't the code produce just a single file with the images appended ?
The source files have the same width and height.
Could anyone help me ?
AUTSCH
I'm sure not if my question belongs to the user-forum or to the bug-forum.
After trying for several hours I believe that it could be a bug.
But because I'm new to this forum I decided to post in the user forum.
Perhaps am I doing something wrong.
I use PerlMagic which comes with ImageMagick-6.5.7-8.
My Perl Version is ActivePerl-5.8.9.826-MSWin32-x86-290470.
Operating System is Win XP Sp3.
Within Perl, the reading, manipulating (e.g. flop) and writing back of the images
is working without problems.
The problem starts, if I try to append 2 images to a single one :
Here ist my code :
my($image, $image2, $x);
$image = Image::Magick->new;
$image2 = Image::Magick->new;
$x = $image->Read("E:\\Tmp\\test\\test.bmp");
print ("read1 : $x\n");
$x = $image->Read("E:\\Tmp\\test\\test2.bmp");
print ("read2 : $x\n");
$x = $image->Append(stack=>true);
print ("append : >$x<\n");
$x = $image->Write("E:\\Tmp\\test\\new.bmp");
print ("write : $x\n");
outoput is :
read1 :
read2 :
append : >Image::Magick=ARRAY(0x1a183b0)<
write :
The result are 2 Files (new.bmp.0 and new.bmp.1)
I also tried this version :
my($image, $image2, $x);
$image = Image::Magick->new;
$image2 = Image::Magick->new;
$x = $image->Read("E:\\Tmp\\test\\test.bmp");
print ("read1 : $x\n");
$x = $image->Read("E:\\Tmp\\test\\test2.bmp");
print ("read2 : $x\n");
$x = $image_new = $image->Clone();
print ("Clone : $x\n");
$x = push (@$image_new, $image2);
print ("push : $x\n");
$x = $image_new->Append(stack=>true);
print ("append : >$x<\n");
$x = $image_new->Write("E:\\Tmp\\test\\new.bmp");
print ("write : $x\n");
outoput is :
read1 :
read2 :
Clone : Image::Magick=ARRAY(0x19e8e14)
push : 3
append : >Image::Magick=ARRAY(0x19e8c94)<
write :
The result ist the same; 2 Files.
What am I doing wrong ? ? ?
Shouldn't the code produce just a single file with the images appended ?
The source files have the same width and height.
Could anyone help me ?
AUTSCH