• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How can I merge 18 images to 1 images?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So hard!
 
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you want to do - make a composite image from a number of images ?
 
Blood Bigsoon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just want to merge 18 images in to 1 images,just like 18 layers of a picture.
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bigsoon,

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! )
 
Blood Bigsoon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Blood Bigsoon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx Nathan Pruett!
And I changed my display name which like a game character.Hoho,enjoy it!
 
Ashish Hareet
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thought I'd put in a few lines aswell - this is for fading in the images -

HTH
Ashish H.
[ January 13, 2003: Message edited by: Ashish Hareet ]
 
Blood Bigsoon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look my code,I always got a 0 bytes gif files.No exception catched.I don't know what happened.

[ January 13, 2003: Message edited by: Blood Bigsoon ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Blueberry pie is best when it is firm and you can hold in your hand. Smell it. And smell this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic