Enlightenment CVS committal

Author  : kwo
Project : e17
Module  : libs/imlib2

Dir     : e17/libs/imlib2/src/modules/loaders


Modified Files:
        loader_tiff.c 


Log Message:
Remove restriction to 8 bits per sample (suggested by David A. Gatwood, bug 
374).
Set stopOnError (seems like the proper thing to do?).

===================================================================
RCS file: /cvs/e/e17/libs/imlib2/src/modules/loaders/loader_tiff.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- loader_tiff.c       4 Feb 2008 19:37:46 -0000       1.10
+++ loader_tiff.c       4 Feb 2008 19:38:53 -0000       1.11
@@ -175,7 +175,7 @@
         return 0;
      }
    strcpy(txt, "Cannot begin reading tiff");
-   if (!TIFFRGBAImageBegin((TIFFRGBAImage *) & rgba_image, tif, 0, txt))
+   if (!TIFFRGBAImageBegin((TIFFRGBAImage *) & rgba_image, tif, 1, txt))
      {
         TIFFClose(tif);
         return 0;
@@ -249,25 +249,17 @@
                   rgba_image.rgba.put.separate = put_separate_and_raster;
                }
           }
-/*     if (rgba_image.rgba.samplesperpixel == 8)*/
-        if (rgba_image.rgba.bitspersample == 8)
-          {
-             if (!TIFFRGBAImageGet((TIFFRGBAImage *) & rgba_image,
-                                   rast, width, height))
-               {
-                  _TIFFfree(rast);
-                  free(im->data);
-                  im->data = NULL;
-                  TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
-                  TIFFClose(tif);
 
-                  return 0;
-               }
-          }
-        else
+        if (!TIFFRGBAImageGet((TIFFRGBAImage *) & rgba_image,
+                              rast, width, height))
           {
-             printf("channel bits == %i\n",
-                    (int)rgba_image.rgba.samplesperpixel);
+             _TIFFfree(rast);
+             free(im->data);
+             im->data = NULL;
+             TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
+             TIFFClose(tif);
+
+             return 0;
           }
 
         _TIFFfree(rast);



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to