]> www.fi.muni.cz Git - evince.git/blobdiff - backend/tiff/tiff-document.c
tiff: Set stopOnError to zero on TIFFReadRGBAImageOriented() calls
[evince.git] / backend / tiff / tiff-document.c
index 1be2aecebfec467f99334b09236031d8bd97ff50..ca40397111d18c8b18a52e294b27a2ca8fb8e28c 100644 (file)
@@ -91,7 +91,21 @@ tiff_document_load (EvDocument  *document,
                return FALSE;
        
        push_handlers ();
+
+#ifdef G_OS_WIN32
+{
+       wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, error);
+       if (wfilename == NULL) {
+               return FALSE;
+       }
+
+       tiff = TIFFOpenW (wfilename, "r");
+
+       g_free (wfilename);
+}
+#else
        tiff = TIFFOpen (filename, "r");
+#endif
        if (tiff) {
                guint32 w, h;
                
@@ -279,7 +293,7 @@ tiff_document_render (EvDocument      *document,
        TIFFReadRGBAImageOriented (tiff_document->tiff,
                                   width, height,
                                   (uint32 *)pixels,
-                                  orientation, 1);
+                                  orientation, 0);
        pop_handlers ();
 
        /* Convert the format returned by libtiff to
@@ -364,7 +378,7 @@ tiff_document_get_thumbnail (EvDocument      *document,
        TIFFReadRGBAImageOriented (tiff_document->tiff,
                                   width, height,
                                   (uint32 *)pixels,
-                                  ORIENTATION_TOPLEFT, 1);
+                                  ORIENTATION_TOPLEFT, 0);
        pop_handlers ();
 
        scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf,