[cairo] 32k limit with image surface?
M Joonas Pihlaja
jpihlaja at cc.helsinki.fi
Thu Jul 30 14:59:57 PDT 2009
On Thu, 30 Jul 2009, Bill Spitzak wrote:
> I beg to differ. Tiled TIFF files are a pita to deal with when reading them
> in. They pretty much require the entire image to be read into memory before
> any can be accessed.
>
> Yes in theory they could be random-accessed but that only works if the units
> the program uses is an integer division or multiple of whatever tile size the
> image is using. Needless to say we don't even bother checking if this is true
> as it is false 99.9999% of the time.
Sounds like your TIFF reader code could do with some love. Nowhere in
the TIFF spec does it say that image dimensions must be multiples of
the tile dimensions. The rightmost and bottommost tiles are zero
padded to account for the discrepancy to image width/height. In any
case, random access to tiles works just fine since TIFF images contain
a tile index just for that purpose.
Cheers,
Joonas
More information about the cairo
mailing list