xp_comm_proj/ReadGeoTiff/libtiff/tif_getimage.c
/*
 * Read the specified image into an ABGR-format raster.
 */
Read the specified image into an ABGR-format raster.
Read the specified image into an ABGR - format raster .
int
TIFFReadRGBAImage(TIFF* tif,
    uint32 rwidth, uint32 rheight, uint32* raster, int stop)
{
    char emsg[1024];
    TIFFRGBAImage img;
    int ok;
    if (TIFFRGBAImageBegin(&img, tif, stop, emsg)) {
	ok = TIFFRGBAImageGet(&img, raster+(rheight-img.height)*rwidth,
	    rwidth, img.height);
	TIFFRGBAImageEnd(&img);
    } else {
	TIFFError(TIFFFileName(tif), emsg);
	ok = 0;
    }
    return (ok);
}
int TIFFReadRGBAImage ( TIFF * tif , uint32 rwidth , uint32 rheight , uint32 * raster , int stop ) { char emsg [ 1024 ] ; TIFFRGBAImage img ; int ok ; if ( TIFFRGBAImageBegin ( & img , tif , stop , emsg ) ) { ok = TIFFRGBAImageGet ( & img , raster + ( rheight - img . height ) * rwidth , rwidth , img . height ) ; TIFFRGBAImageEnd ( & img ) ; } else { TIFFError ( TIFFFileName ( tif ) , emsg ) ; ok = 0 ; } return ( ok ) ; }
Read the specified image into an ABGR-format raster.
Read the specified image into an ABGR - format raster .
/* XXX verify rwidth and rheight against width and height */