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 2009

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

2009.05.07 08:14 "[Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by <masui.ikuhisa@jsol.co.jp>
2009.05.08 03:52 "Re: [Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by Frank Warmerdam
2009.05.08 12:30 "Re: [Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by <masui.ikuhisa@jsol.co.jp>
2009.05.08 13:47 "Re: [Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by Frank Warmerdam
2009.05.11 03:03 "Re: [Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by <masui.ikuhisa@jsol.co.jp>
2009.05.11 06:17 "Re: [Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by Frank Warmerdam
2009.05.11 11:22 "Re: [Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by <masui.ikuhisa@jsol.co.jp>
2009.05.11 14:32 "Re: [Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by Frank Warmerdam
2009.05.12 12:19 "Re: [Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by <masui.ikuhisa@jsol.co.jp>

2009.05.07 08:14 "[Q] TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff.", by <masui.ikuhisa@jsol.co.jp>

I am japanese. my name is I.masui.
I must be good at English and forgive the thing that cannot be written. 

It is a question on TIFFReadRGBAImage (about read COMPRESSION_JPEG imagefile) of libtiff. 

======= (*Quotation  http://www.libtiff.org/libtiff.html) =======
#include "tiffio.h"
main(int argc, char* argv[])
{
    TIFF* tif = TIFFOpen(argv[1], "r");
    if (tif) {
	uint32 w, h;
	size_t npixels;
	uint32* raster;

	TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
	TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
	npixels = w * h;
	raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32));
	if (raster != NULL) {
	    if (TIFFReadRGBAImage(tif, w, h, raster, 0)) {
			// OK(when   COMPRESSION_CCITTFAX4).
	    }
		 else {
			// error (when COMPRESSION_JPEG) <<<<<<<<
		 }
	    _TIFFfree(raster);
	}
	TIFFClose(tif);
    }
    exit(0);
}
  (note. COMPRESSION_CCITTFAX4,COMPRESSION_JPEG is got by
		       "uint16 compress; TIFFGetField(m_tif, TIFFTAG_COMPRESSION, &compress);"
======================================================================

It becomes an error by "TIFFReadRGBAImage" at "COMPRESSION_JPEG"-ImageFile(TIFF) 
though it is possible to read at "COMPRESSION_CCITTFAX4"-ImageFile(TIFF)
by the above-mentioned reading method. 

How can I read at COMPRESSION_JPEG? <<<<<<<<


<end>