2011.09.01 11:45 "[Tiff] test.tiff: Error, can't allocate space for image buffer.", by Mathieu Malaterre

2011.09.01 11:45 "[Tiff] test.tiff: Error, can't allocate space for image buffer.", by Mathieu Malaterre

Dear all,

I am trying to extract the first image of a multiframes TIFF image. According to tiffcp documentation one should use:

$ tiffcp test.tiff,0 out.tiff

However it keeps on failing with:

test.tiff: Error, can't allocate space for image buffer.

The strangest thing is that it works with the next image:

$ tiffcp test.tiff,1 out.tiff
$ tiffinfo out.tiff

TIFF Directory at offset 0x1ddbe (122302)
    Subfile Type: (0 = 0x0)
    Image Width: 1024 Image Length: 696
    Bits/Sample: 8
    Compression Scheme: JPEG
    Photometric Interpretation: YCbCr
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 3
    Rows/Strip: 16
    Planar Configuration: single image plane

  Reference Black/White:
     0:     0   255
     1:   128   255
     2:   128   255

ImageDescription: Aperio ImageComp v8.0.22 110400x75134 -> 1024x696 - |AppMag = 40|StripeWidth = 2034|ScanScope ID = SS1203|Filename = 11161|Title = none|Date = 02/14/07|Time = 00:39:27|User = f3e05499-1e13-49ce-add0-de1c3c85e6da|MPP = 0.2544|Left = 18.847906|Top = 19.581955|LineCameraSkew = -0.000865|LineAreaXOffset = 0.035360|LineAreaYOffset = -0.004219|DSR ID = hooke|ImageID = 11161|OriginalWidth = 115000|Originalheight = 75284|Filtered = 3

JPEG Tables: (574 bytes)

Here is the output of tiffinfo of my input image:

...
TIFF Directory at offset 0x62f99276 (1660523126)
  Subfile Type: (0 = 0x0)
  Image Width: 110400 Image Length: 75134 Image Depth: 1
  Tile Width: 240 Tile Length: 240
  Bits/Sample: 8
  Compression Scheme: 33003 (0x80eb)
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Planar Configuration: single image plane

ImageDescription: Aperio Image Library v8.0.22 115000x75284 [0,150 110400x75134] (240x240) J2K/MIL Q=70|AppMag = 40|StripeWidth = 2034|ScanScope ID = SS1203|Filename = 11161|Title = none|Date = 02/14/07|Time = 00:39:27|User = f3e05499-1e13-49ce-add0-de1c3c85e6da|MPP = 0.2544|Left = 18.847906|Top = 19.581955|LineCameraSkew = -0.000865|LineAreaXOffset = 0.035360|LineAreaYOffset = -0.004219|DSR ID = hooke|ImageID = 11161|OriginalWidth = 115000|Originalheight = 75284|Filtered = 3

...

I am using libtiff 3.9.5 and 4.0.0~beta7 on a Linux/debian machine.

Thanks for suggestions,
--
Mathieu