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
July 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.07.16 14:33 "reading an 8 bit image", by Joe Tracy
2009.07.17 17:28 "Re: reading an 8 bit image", by Michael Persons
2009.07.20 15:55 "Re: reading an 8 bit image", by Michael Persons
2009.07.20 17:38 "Re: reading an 8 bit image", by Joe Tracy

2009.07.20 15:55 "Re: reading an 8 bit image", by Michael Persons

Yes without analyzing it completely (i.e. there may be even more issues),
there is also a problem with adjusting for the current line (j*w).
When offsetting into the "raster" buffer to correctly compensate for which
line / row of the image is being processed, the j*w would need to change to
j*w*4 (i.e. current line* width * bytesPerPixel)

note:
(My original post bounced because it was too large so I changed to plain
text and the pictures below were lost)

-michael

________________________________________
From: Joe Tracy [mailto:JTracy@akimn.com] 
Sent: Friday, July 17, 2009 11:16 AM
To: Persons, Michael; tiff@lists.maptools.org
Subject: RE: reading an 8 bit image

Thank you Michael.  The was the answer.  However it did not work in the code
I was using.  I had to emulate my GDI code, then change samples to 4.

This is the original code I was using:


Changing the ptr increment to 4 did not work.

This is the GDI code that works fine, samples (from the tiff header) = 1:



So I changed the code I originally sent to emulate this pointer iteration
(and increment the raster pointer directly), but had to ignore the samples
from the tif header and set it to 4.  then it works fine.



Thanks,
Joe