in reply to Appending an image to a png file

Could you please explain what you mean with "append an image to a png file"? I've already answered this question before but apparantly you want to do something else than I thought. Or maybe not.

Also warn "$x" if "$x"; is what is causing the message: you are printing an Image::Magick object, and an object in perl usually stringifies to the class name and memory address.

Replies are listed 'Best First'.
Re^2: Appending an image to a png file
by Nalina (Monk) on Aug 04, 2004 at 06:16 UTC
    I mean I want to read two png files and write the read images to an another png file OR read a png file and append the image in that file to an another png file.

    I tried
    use Image::Magick; $image = Image::Magick->new; open(IMAGE, 'd:\d\Sample.jpg'); print "test1\n"; $image->Read(file=>\*IMAGE); print "test2\n"; close(IMAGE); $filename = "test.png"; open(IMAGE, ">>$filename"); $image->Write(file=>\*IMAGE, filename=>$filename); close(IMAGE);
    but got an Application error saying,
    The instruction at "0x77f88216" referenced memory at "0x00000010". The + memory could not be "written". Click on OK to terminate the program.
    How to resolve this error?

    Thanks & Regards

    Nalina