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
December 2004

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

2004.12.07 11:25 "Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 11:32 "Re: Fetching pixel data from 4bit tiff", by Joris Van Damme
2004.12.07 11:38 "Re: Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 11:48 "Re: Fetching pixel data from 4bit tiff", by Joris Van Damme
2004.12.07 11:57 "Re: Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 12:21 "Re: Fetching pixel data from 4bit tiff", by Joris Van Damme
2004.12.07 13:02 "Re: Fetching pixel data from 4bit tiff", by Joris Van Damme
2004.12.07 14:50 "Re: Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 15:52 "Re: Fetching pixel data from 4bit tiff", by Bob Friesenhahn
2004.12.07 16:46 "Re: Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 17:04 "Re: Fetching pixel data from 4bit tiff", by Bob Friesenhahn
2004.12.07 20:00 "Re: Fetching pixel data from 4bit tiff", by Joris Van Damme
2004.12.07 20:41 "Re: Fetching pixel data from 4bit tiff", by Bob Friesenhahn

2004.12.07 12:21 "Re: Fetching pixel data from 4bit tiff", by Joris Van Damme

Dan,

> TIFF Directory at offset 0x8

That certainly is indeed a grayscale TIFF.

> Basically I'm trying to take a sample of pixels across the middle of the
> image, both horizontal and vertical (yes I know the sample algo is wrong for
> the horizontal.. I've yet to get to that :) )

I'm no C guru myself (Delphi coder instead), but from a quick scan through the
code, it seems that the initialization, loop condition, and increment of i in
both loops is wrong. Try this instead:

for (i =TheImage.width/2*4;
      i < (TheImage.width*TheImage.height*4);
      i +=TheImage.width*4) {
for (i =TheImage.width*(TheImage.height/2)*4;
      i <TheImage.width*(TheImage.height/2+1)*4;
      i+=4) {

Quite possible I made a mistake myself, though, I'm not a C coder, sorry.

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html