1997.02.19 16:18 "Small bug in tif_jpg.c", by Thomas Deweese

1997.02.19 16:18 "Small bug in tif_jpg.c", by Thomas Deweese

I ran into a problem where writting a stripped jpeg'd tiff file would screw up. The basic problem had to do with the number of rows to write. Here is my fix:

For stripped images this limits the number of rows written to the imagelength (as per the spec). For tiled images it continues until the end of the tile.

diff of tif_jpg.c:

1150,1155d1149
<         if (!isTiled(tif))
<           {
<             if (tif->tif_row+nrows >= tif->tif_dir.td_imagelength)
<               nrows = tif->tif_dir.td_imagelength - tif->tif_row;
<           }

-- 
                                                        Thomas DeWeese
deweese@kodak.com
                        "The only difference between theory and practice is
                         that in theory there isn't any." -- unknown