[xiph-commits] r17856 - trunk/theora/examples

giles at svn.xiph.org giles at svn.xiph.org
Sat Feb 19 22:15:01 PST 2011


Author: giles
Date: 2011-02-19 22:15:01 -0800 (Sat, 19 Feb 2011)
New Revision: 17856

Modified:
   trunk/theora/examples/tiff2theora.c
Log:
TIFFReadRGBAImage doesn't actually return errors unless you ask it to.

The final argument to TIFFReadRGBAImage is 'stopOnError'. That is,
if it's not true then the function will return success even if
loading the actual image data failed. As such, copying the example
code out of the documentation wasn't really what we wanted.

Modified: trunk/theora/examples/tiff2theora.c
===================================================================
--- trunk/theora/examples/tiff2theora.c	2011-02-19 01:01:34 UTC (rev 17855)
+++ trunk/theora/examples/tiff2theora.c	2011-02-20 06:15:01 UTC (rev 17856)
@@ -410,7 +410,7 @@
     TIFFClose(tiff);
     return 1;
   }
-  if(!TIFFReadRGBAImage(tiff, width, height, raster, 0)) {
+  if(!TIFFReadRGBAImage(tiff, width, height, raster, 1)) {
     fprintf(stderr, "%s: error: couldn't read tiff data.\n", pathname);
     free(raster);
     TIFFClose(tiff);



More information about the commits mailing list