This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Conversion of GIF to JPEG Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Conversion of GIF to JPEG" Watch "Conversion of GIF to JPEG" New topic
Author

Conversion of GIF to JPEG

J Guru
Greenhorn

Joined: Nov 23, 2002
Posts: 1
I want to convert GIF to JPEG. I used Java Advance Imaging (JAI) to first decode GIF as BufferedImage and than tried encoding it as JPEG. However, this doesn't leads to proper encoding of image. The image is always interpreted as GIF.
If you could point to any image conversion jar utility or APIs using which I can perform GIF to JPEG conversion, this would be of great help.
Thanks in advance
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi J (by the way you should use a proper name...),
You might be doing the wrong thing to save your jpg image. I have worked on several projects using JAI and have never seen any problems with image encoders.
Here is an example of what you should do to ensure your image gets correctly encoded in JPG:

Hope this helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Conversion of GIF to JPEG
 
Similar Threads
rendering onto an gif/jpeg image????
What does the "static" block in following class does?
Produce image dynamicly by servlet
Image as a background
request.getHeader()