2014.01.20 16:03 "[Tiff] R: WRITE BIGTIFF RGB", by

2014.01.20 08:46 "[Tiff] WRITE BIGTIFF RGB", by

Hi,

I’m italian and excuse me for my elementary english.
I’m C++ programmer and I’m built a code to create BIGTIFF.
I use Visual Studio Express 2012.

I installed the libtiff-4.1, but I’ve some problem to setting the bigtiff over 4GB, in fact the output image done an error when I try to open:

Can you help me, please?

I report my code:

TIFF* image=NULL;
uint64 image_tiff_height=35680;
uint64 image_tiff_width=64224;
if((image = TIFFOpen(perc_output, "w8")) == NULL) {
             /* printf("Could not open output.tif for writing\n");*/
                            return 0;
 }

TIFFSetField(image, TIFFTAG_IMAGEWIDTH,image_tiff_width);

TIFFSetField(image, TIFFTAG_IMAGELENGTH,image_tiff_height);

TIFFSetField(image, TIFFTAG_BITSPERSAMPLE,8); TIFFSetField(image, TIFFTAG_SAMPLESPERPIXEL,3);//The number of components per pixel

uint32 rowsperstrip =24;

TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, rowsperstrip); TIFFSetField(image, TIFFTAG_COMPRESSION,COMPRESSION_JPEG); TIFFSetField(image, TIFFTAG_JPEGQUALITY,90);

  TIFFSetField(image, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);

TIFFSetField(image, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);

TIFFSetField(image, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);

char page_number[20];
sprintf(page_number, "Page %d", 1);

TIFFSetField(image, TIFFTAG_SUBFILETYPE, FILETYPE_PAGE);

TIFFSetField(image, TIFFTAG_PAGENUMBER, 1, 1);

TIFFSetField(image, TIFFTAG_PAGENAME, page_number);

Best regard,
Mary