Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Conversion of GIF to JPEG

 
J Guru
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic