X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Ftiff%2Ftiff-document.c;h=ca40397111d18c8b18a52e294b27a2ca8fb8e28c;hb=fb0eb3a6b1c9103c75bfe6a844ada3b3d873569c;hp=1be2aecebfec467f99334b09236031d8bd97ff50;hpb=6ac3eb8adb9f4bb8c59c832e7d83334243d90cd5;p=evince.git diff --git a/backend/tiff/tiff-document.c b/backend/tiff/tiff-document.c index 1be2aece..ca403971 100644 --- a/backend/tiff/tiff-document.c +++ b/backend/tiff/tiff-document.c @@ -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,