Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Appending an image to a png file

by beable (Friar)
on Aug 03, 2004 at 11:34 UTC ( [id://379585]=note: print w/replies, xml ) Need Help??


in reply to Appending an image to a png file

Can you do that to a PNG file? I thought that a PNG file has within it data to tell how large the image is; so if you append another image to the end of the file, you'll end up with the same image except with junk on the end which is the second image. What does it mean to "append an image to a png file which already has an image"? Why do you want to do this?

Replies are listed 'Best First'.
Re^2: Appending an image to a png file
by Nalina (Monk) on Aug 04, 2004 at 05:58 UTC
    If a png file can not be appended, atleast it can be written. How do I write images from 2 different png files to a single png file?

    I tried
    #!/usr/local/bin/perl use Image::Magick; my($image, $p, $q); $image = new Image::Magick; $image->Read('d:\\d\\Graph.xls..PNG','d:\\d\\Sample.jpg'); $image->Write('d:\\pimage.jpg');
    but this writes the images to two files 'pimage.jpg.0' & 'pimage.jpg.1'(each having one image). I want both the images to be in a single png file. How do I get it?

    Thanks & Regards

    Nalina
      Let's suppose you have two png images, one with a red background with a green circle on it; and the other one with a blue background with a yellow triangle on it. What output would you like to get?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://379585]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-28 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found