AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2009

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2009.02.12 13:23 "Bug in tif_luv.c (and a fix)", by <lilysoft2000@hotmail.com>
2009.02.12 16:26 "Re: Bug in tif_luv.c (and a fix)", by Frank Warmerdam

2009.02.12 16:26 "Re: Bug in tif_luv.c (and a fix)", by Frank Warmerdam

Ive wrote:
> This effects only Photometric LogLUV images that are tiled. I guess LogLUV was
> quite rarely used and all the example images from Greg Ward's side are in
> strips, but with the current HDRI hype I stumbled across a HDR LogLUV tiff that
> crashed my application.
> So the bug may be there for quite some time, but it definitely is in
> tiff-4.0beta3 and tiff_3.9.0beta.
> 
> 
> In tif_luv.c the functions LogL16InitState and LogLuvInitState contain the
> statement (at line 1250 & 1347)
> 
> sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_rowsperstrip);
> 
> this should be replaced by
> 
> if (!(isTiled(tif)))
>     sp->tbuflen = multiply(td->td_imagewidth, td->td_rowsperstrip);
> else
>     sp->tbuflen = multiply(td->td_tilewidth, td->td_tilelength);
> 
> and all works fine again.
> 
> 
> Note that Greg Wards LogLUV code already contained correct functions to be glued
> with tiled images and tiled LogLUV images are absolutely valid.
> I can provide an example tiff that shows the bug if someone needs it.

Ive,

I have filed this in bugzilla as:

   http://bugzilla.maptools.org/show_bug.cgi?id=2005

Would you happen to have a modest sized test image I can use to reproduce
the bug and confirm the fix?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent