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 2006

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

2006.07.21 12:40 "How to save in tiff format file?", by Toh Kc
2006.07.21 17:16 "Re: How to save a tiff format file?", by Bernie Pallek
2006.07.25 11:45 "Re: How to save in tiff format file?", by Gerben Vos
2006.07.25 13:41 "Re: How to save in tiff format file?", by Bernie Pallek
2006.07.30 10:36 "Re: How to save in tiff format file?", by Toh Kc
2006.07.31 13:39 "Re: How to save in tiff format file?", by Bernie Pallek
2006.08.02 02:09 "Re: How to save in tiff format file?", by Toh Kc
2006.08.02 10:14 "Re: How to save in tiff format file?", by Gerben Vos
2006.08.02 17:27 "Re: How to save in tiff format file?", by Bernie Pallek

2006.07.31 13:39 "Re: How to save in tiff format file?", by Bernie Pallek

Toh wrote:
>    I have tried the solution provided you all. It
> seems that my saved file nw look distorted. Think the
> problem now lies in the TIFF I am reading is in
> different format(by Gerben Vos.). The meaning of
> different format, does it mean by the intilaiasation
> of the array when reading the tiff file?
> 
> For background info: My Gheight & Gwidth got from
> function which is reading the image file. And the
> constant XSIZE & YSIZE is defined as 256. From my
> understanding, I know XSIZE must be equal to my Gwidth
> & YSIZE is equal to Gheight. So equate them to the
> same value. 

If you are trying to keep the original image dimensions, you should get rid
of your XSIZE and YSIZE definitions, and use the dimension values from the
original image (Gheight, Gwidth).  But you will probably want to allocate
your array dynamically, because you can't use variables to declare array
bounds.

e.g.
// (Gwidth and Gheight should already be set at this point)
unsigned char * array = new unsigned char[Gwidth * Gheight]; 
// don't forget to check if allocated okay, and also to 'delete [] array' at
the end of your function

Now we're starting to talk more about C/C++ than TIFF, so I'll stop here...
:-)