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
May 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.05.23 11:03 "Question to TIFF mailing list", by Alexey Aushev
2006.05.23 12:13 "Question to TIFF mailing list", by Gerben Vos

2006.05.23 12:13 "Question to TIFF mailing list", by Gerben Vos

Alexey Aushev wrote:
>
> I'm novice at TIFF coding. Would you say me, please, why my output 24-bit
> color image has no this IFD part? Here is the simpliest example of output
> of 10x10 image, using TIFFWriteEncodedStrip().

Your IFD is perfect. You even showed it to us in the tiffdump output! No
problem there.

But you are a bit confused about the image data.

> uint32 *raster;

char *raster;

> if ((raster = (uint32 *) malloc(sizeof (uint32) * width * height * 3)) ==
> NULL)

if ((raster = (char *) malloc(width * height * 3)) == NULL)


> for (unsigned int i=0; i<width*height; i++)
> {
>         raster[i] = 0xffacacac;
> }

for (unsigned int i=0; i<width*height * 3; i += 3)
{
        raster[i] = 0xac;
        raster[i + 1] = 0xac;
        raster[i + 2] = 0xac;

        // To use this test, add #include <stdlib.h> at the top of the
        program.
        //raster[i] = rand() & 0xFF;
        //raster[i + 1] = rand() & 0xFF;
        //raster[i + 2] = rand() & 0xFF;
}

Hope this helps,
				Gerben Vos.