• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Split multi-page tiff throwing: End of data reached before next EOL

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I've a little code that attempts to split a multi-page tiff into single tiffs (or single whatever, can be jpeg, gif, png), but I'm getting the following exception: End of data reached before next EOL.

The code I'm using:



And the FULL exception log:



Thank you for you help!
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a guess, but that suggests to me that the input file is corrupted in some way. Since the message mentions "end of data" then perhaps the file has been truncated.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, this topic is old so I guess you fixed your problem but I'll give more info in case it happens to someone else : I had the same error while trying to do the same thing. In my process I had Apache FOP generating a multipage TIFF file, then I split it into single page TIFFs using more or less the same code as you. For some reason FOP sometimes returned a corrupted multipage TIFF, and JAI returned this InvocationTargetException . I advise you to use tools like AsTiffTagViewer to analyze the header of the TIFF files you have in input, you may be able to find some anomalies (as a corrupted TIFF can still be readable in image viewers).
 
It's weird that we cook bacon and bake cookies. Eat this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic