JAI - Splitting Multi-page TIFs

Discussion in 'Java' started by carl.manaster@gmail.com, Oct 11, 2005.

  1. Guest

    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
     
    , Oct 11, 2005
    #1
    1. Advertising

  2. > 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?


    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 (!!!).

    --
    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
     
    Andrey Kuznetsov, Oct 11, 2005
    #2
    1. Advertising

  3. Guest

    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
     
    , Oct 12, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dwilson
    Replies:
    0
    Views:
    1,217
    dwilson
    Apr 8, 2005
  2. John Ericson
    Replies:
    0
    Views:
    431
    John Ericson
    Jul 19, 2003
  3. Mark
    Replies:
    0
    Views:
    447
  4. John Dibling
    Replies:
    0
    Views:
    420
    John Dibling
    Jul 19, 2003
  5. PWGSC/TPSGC

    Splitting into a multi-dimensional array

    PWGSC/TPSGC, Oct 16, 2003, in forum: Javascript
    Replies:
    1
    Views:
    73
    Thomas 'PointedEars' Lahn
    Oct 16, 2003
Loading...

Share This Page