• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with ImageIO.read

 
Alejandro Barrero
Ranch Hand
Posts: 335
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same code may work or fail in the same method:

The only difference that I can tell between the two calls is that it works with an array of size 493,563 and fails, returns null, with an array of size 563,472.

Your help will be greatly appreciated.

Alejandro Barrero
 
Alejandro Barrero
Ranch Hand
Posts: 335
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found the problem. The byte array in the second case didn't correspond to an image. It would have been easier to detect if instead of null I had gotten a garbage image.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic