Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ImageIO JPG Problems/Bug??

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a bug or a problem in writing JPG images using the ImageIO API?
My code is as follows:

The problem is that the new JPG image seems to be almost a negative of the GIF image.
Does anyone know how to resolve this? I did read that there was a bug in the ImageIO with Compressing JPG's, but didn't think that would affect my code. But I am not sure.
Thanks.
BTW - if my oldImg is a JPEG file and I write a JPEG file, I don't have a problem. Appearntly it is only in converting from GIF to JPG. I also don't have a problem going from JPG to PNG either.
[ December 26, 2002: Message edited by: Gregg Bolinger ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm... I tried this out... are you trying to convert a gif that uses transparency or animation? The jpeg images that were produced by trying to convert these were pretty screwed up. Most normal gifs are converting OK though... (not that I've tried this with a considerable amount... ~5 or so, so there may be other issues.)
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh, there is actually transparancy in my GIF file I was testing with.
Thanks Nate - I will try a different test file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic