[cairo] 32k limit with image surface?

Bill Spitzak spitzak at gmail.com
Thu Jul 30 16:38:04 PDT 2009



M Joonas Pihlaja wrote:
> 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.

No I meant that the program reading the tiff may use it's own tiles 
internally and it is unlikely to be able to adjust their sizes to match 
the tiles used in the program. It is prepared to handle tiles that go 
off the edge of the image.


More information about the cairo mailing list