Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

JAI - Splitting Multi-page TIFs

Thread view: 
carl.manaster@gmail.com - 11 Oct 2005 16:32 GMT
I've got what I think is a simple task, splitting a multi-page TIF into
separate files by page.  I've found a few examples online, but only
one, here:

http://forum.java.sun.com/thread.jspa?threadID=646007&tstart=135

worked - and that only sort of (images came out reversed) and very
slowly (140 seconds for a 30MB file).

Does anyone have a better bit of code to do this, faster?

Thanks in advance.

--Carl
Andrey Kuznetsov - 11 Oct 2005 17:06 GMT
> I've got what I think is a simple task, splitting a multi-page TIF into
> separate files by page.  I've found a few examples online, but only
[quoted text clipped - 6 lines]
>
> Does anyone have a better bit of code to do this, faster?

I think that this is a wrong approach.
There are no need to decode and encode TIFF to split it into separate files.

However I don't have currently a solution for this.

A little bit theorie - you schould be able to copy each ImageFileDirectory
into separate file,
but you have to adjust all offsets (!!!).

Signature

Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities

carl.manaster@gmail.com - 12 Oct 2005 23:29 GMT
Hi, Andrey,

Thanks for the help.  I have solved it, as you suggest, by "just"
reading the TIFF directly, twiddling the values that represent offsets,
and streaming each IFD to its own file.  This would have been easier if
Java had unsigned types, and if my TIFFs used the same byte ordering as
my language.

Peace,
--Carl


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.