ILboolean readScanlines(ILuint *image, ILint width, ILint height, CHANNEL *channel, ILuint alpha) { ILint i; ILuint *scan; (void)alpha; for (i = height - 1; i >= 0; i--) { scan = image + i * width; if (!readScanline((ILubyte *)scan, width, channel, alpha ? 4 : 3)) { ilSetError(IL_ILLEGAL_FILE_VALUE); return IL_FALSE; } } return IL_TRUE; }
ExifStatus ExifStripImage::readImage( ExifImageDesc &imgDesc ) { if (checkRead(0) != EXIF_OK) return EXIF_FILE_READ_ERROR ; ExifStatus status = EXIF_OK ; exif_uint32 length = imgDesc.numberOfRows ; uint8* buf = imgDesc.components[0].theData ; for (unsigned int row=0; row<length; row++) { if( (status = readScanline(buf, row) ) != EXIF_OK ) return status ; buf += imgDesc.components[0].lineStride ; } return status ; }