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
January 2010

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

2010.01.07 17:42 "create simple tiff", by Kavallieratou Ergina
2010.01.07 18:05 "Re: create simple tiff", by Bob Friesenhahn
2010.01.07 18:25 "Re: create simple tiff", by Kavallieratou Ergina
2010.01.07 19:47 "Re: create simple tiff", by Bob Friesenhahn
2010.01.07 23:51 "Re: create simple tiff", by Kavallieratou Ergina
2010.01.08 00:13 "can please anybody help?", by Kavallieratou Ergina
2010.01.08 00:39 "Re: can please anybody help?", by Brad Hards

2010.01.08 00:39 "Re: can please anybody help?", by Brad Hards

On Friday 08 January 2010 11:13:10 Kavallieratou Ergina wrote:
>  I repeat more correctly here.
> Can anybody please comment on my code?
> Gin
This doesn't appear to be the full code (i.e. this isn't a complete example of 
what you're doing).

> struct gen
> {
> unsigned char ** data;
> unsigned short int width;
> unsigned short int height;
> unsigned short int bits_per_pixel;
> };
> 
> stuct gen imagen;
struct, not stuct

What are you initialising this structure with? This part is critical to 
understanding what you are doing.
 
> TIFF *out= TIFFOpen("ar.tif", "w");
> 
> TIFFSetField (out, TIFFTAG_IMAGEWIDTH, imagen->width);
> TIFFSetField(out, TIFFTAG_IMAGELENGTH, imagen->height);
> TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1);
> TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1);
> TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
> TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
> TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
> BYTE *bits;
> for (int y = 0; y < imagen->height; y++)
> {
> bits= imagen->data[y];
This is taking data[0], data[1], data[2]. Do you mean to take a pointer
to a scanline here? If so, perhaps it has to be y*imagen->width or something 
like that.

Brad