bigsoon Welcome to the JavaRanch! Please adjust your display name to meet the JavaRanch Naming Policy. You can change it here. Thanks! and welcome to the JavaRanch!
You need to describe what you are trying to do in more detail.
OK, you have 18 images and you want to create 1 image from them. In your second post you mention that you want to make them into layers... so I am assuming that each image has transparency in it and you are going to lay each of the images on top of the previous. Two more questions... are you actually trying to produce another *image file* from these images or are you just trying to *display* all of these images at the same time? And, are you using a greater than 1.4 JDK or an older version? (If you are trying to write out an image file, 1.4 added the ImageIO classes that make writing out image files easier.)
P.S. - Please change your displayed name as Paul suggested. (Thanks Paul! )
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Thanks Nate. And I want to make 18 transparent images lay each of the images on top of the previous and at last produce another *image file*. I am newbie to java image(jdk1.4),so I don't know how to write the code.I had read more about java image in sun's web site,but too more to read!Pls help me,I just want the sample code,and learn it,thanks. BTW,sorry for my error displayed name ,I had changed it.
Here's a short example of how to save a new image from 8 other images layered on top of one another. This uses PNG format because the ImageIO classes support writing PNGs "out-of-the-box" and because they aren't "copywronged" like GIF format images. It assumes that your images are named "image_0.png", "image_1.png", etc.
P.S. - Your display name is still the same... You can can change it here.
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
That's because you're trying to write it out as a GIF file. Due to legal reasons Sun would have to pay to use the compression techniques used to create GIF images. You can read a little about it here on JavaLobby.
The easiest way to fix it is to change the output file to a PNG image.
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad: