Re: Photoshop: Problem parsing TIFF files [that are too big]

From: Isaac Kohn (ikohn@UIC.EDU)
Date: Wed Dec 12 2001 - 19:30:01 CST

  • Next message: Scott Wajon: "Archival colour spaces"

    Message-Id: <200112130130.fBD1UUo28516@sitelicense.arizona.edu>
    Date:         Wed, 12 Dec 2001 19:30:01 -0600
    From: Isaac Kohn <mailto:ikohn@UIC.EDU>
    Subject:      Re: Photoshop: Problem parsing TIFF files [that are too big]
    To: mailto:IMAGELIB@LISTSERV.ARIZONA.EDU
    

    <pre> Tim,

    Thanks for your note. After sending my initial message, I figured out the 30,000 pixel limit -- by good ol' fashioned trial and error. A couple of other applications I tried (including Jasc PSP) have the same restriction. If it's part of the TIFF spec, I guess it makes sense.

    Anyway, I used ImageMagick to cut the image into bite-sized pieces, which will have to do for the moment.

    Thanks for your help.

    --Isaac K.

    On Wed, 12 Dec 2001, Tim Au Yeung wrote:

    > Hello Isaac,
    >
    > Photoshop only supports images 2 GB in size with a maximum dimension of
    > 30,000 pixels by 30,000 pixels. Even though your image is within size
    > limits, it exceeds the dimension limit. I'm not aware of a work-around aside
    > from using something else to split the image, opening the two halves in
    > Photoshop, doing the work and reassembling in something else. Or you could
    > look for an app that handles infinitely large images (has no maximum size).
    >
    > As far as the TIFF specification goes, if you're reading the actual binary
    > data, you need to check the first two bytes before looking at anything else
    > as they tell you what byte order the file uses. Once you determine that, the
    > normal tag consists of a 2-byte field that indicates which tag, another
    > 2-byte field that indicates the length of the value, then 8 bytes
    > representing the value itself. In the case of the BitsPerSample tag, the tag
    > is (hex) 102, is a SHORT value, and has a value of 8,8,8 for a baseline RGB
    > TIFF.
    >
    > If you're interested, you can go on Adobe's site and download the PDF
    > containing the TIFF 6.0 specification or I could e-mail it to you if you'd
    > like.
    >
    > Tim
    > --------------------------------
    > Tim Au Yeung
    > Manager, Digitization Initiatives
    > Information Resources
    > University of Calgary
    > voice: (403) 220-8975
    > e-mail: ytau (at) ucalgary.ca
    >
    > > I was searching the web for information about a problem I've encountered,
    > > and I came across this list. It seems that there was a discussion related
    > > to my problem in Oct 1998, but the issue was never resolved. I thought
    > > perhaps someone could enlighten me.
    > >
    > > I'm dealing with a program that generates a handful of TIFF files.
    > > Unfortunately I didn't write the program and I don't have access to the
    > > source code. In any case, it seems that the TIFF's it produces are
    > > readable by Photoshop (5.5) only until they exceed a certain size.
    > >
    > > Example: I have here two TIFFs that have almost identical headers. One is
    > > 85 x 105 pixels, and the other is 85 x 43810 pixels. I don't know much
    > > about the TIFF spec, but... here are the relevant snippets of the header
    > > tags:
    > >
    > > ImageWidth: 85
    > > ImageLength: 105
    > > BitsPerSample: 0x00c8 (??? 24-bit should give 0x0018)
    > > StripOffsets: 300
    > > SamplesPerPixel: 3
    > > RowsPerStrip: 105
    > > StripByteCounts: 26775 (ie 85 x 105 x 3)
    > > filesize is 80,625 (ie 3 x StripByteCounts + StripOffsets)
    > >
    > > ImageWidth: 85
    > > ImageLength: 43810
    > > BitsPerSample: 0x00c8
    > > StripOffsets: 300
    > > SamplesPerPixel: 3
    > > RowsPerStrip: 43810
    > > StripByteCounts: 11171550 (85 x 43810 x 3)
    > > filesize is 11171850 (ie StripByteCounts + StripOffsets)
    > >
    > > Note that the StripByteCounts tag in the larger image seems to be
    > > calculated exactly as in the smaller image, yet the filesize does not bear
    > > the same relationship to the StripByteCounts value. It's almost as if the
    > > larger image only has 8 bits of color data per sample, as opposed to the
    > > smaller image, which clearly has 24 bits (ie 3 bytes) per sample.
    > >
    > > No problems with the small image, but on attempting to open the large one,
    > > Photoshop spits out "Could not open the document because of a problem
    > > parsing the TIFF file." Interestingly enough, even the large TIFF is
    > > perfectly readable in Microsoft's "Imaging for Windows" applet, but no
    > > matter what I do (resave, etc), I can't get the mailto:$*@#$! image to open in
    > > Photoshop.
    > >
    > > If anyone knows the technical details of TIFF formatting or has any useful
    > > advice at all, I would appreciate it very much.
    > >
    > > Thanks in advance.
    > > --Isaac K.
    > >
    >

    </pre>



    This archive was generated by hypermail 2b29 : Wed Dec 12 2001 - 19:36:11 CST