|AWARE [SYSTEMS]||Imaging expertise for the Delphi developer|
|TIFF and LibTiff Mailing List Archive|
LibTiff Mailing List
2006.08.24 13:38 "Re: How to save in tiff format file?", by Gerben Vos
> for the SaveTiffFile(), have already tested and able > to save a tiff file, what has really bother about ne > is still the intialisation of the array, sImg. > for (int i = 0; i < Gheight; i++) > for(int j = 0; j < Gwidth; j++) > sImg[i * Gwidth + j] = (unsigned char)(j * i); This initialization is OK, if what you want is a swirly test pattern. If you want to copy the data from another image, it would perhaps be something like (depending on how that image data is stored): for (int i = 0; i < Gheight; i++) for(int j = 0; j < Gwidth; j++) sImg[i * Gwidth + j] = origImg[i * Gwidth + j]; It all depends on what you are trying to do. You haven't told us that yet, or maybe you did tell us that a long time ago and I forgot. > I have doubt here: > Can I say that for most of the time when saving the > the tiff file, the intialisation of the array for the > tiff image to save in, is the same? Sorry, I don't understand you. What do you mean? Gerben Vos.