This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Conversion of GIF to JPEG" Watch "Conversion of GIF to JPEG" New topic

Conversion of GIF to JPEG

J Guru

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
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:
subject: Conversion of GIF to JPEG
jQuery in Action, 3rd edition