]> www.fi.muni.cz Git - evince.git/blobdiff - backend/tiff/tiff-document.c
Updated Portuguese translation.
[evince.git] / backend / tiff / tiff-document.c
index 8452f79d030b90d2a8eb9ca0343adbcf9b21a636..86170e270b7f290d728cf9ba237086d52977ca8f 100644 (file)
@@ -215,9 +215,6 @@ tiff_document_render (EvDocument      *document,
        gint rowstride, bytes;
        guchar *pixels = NULL;
        guchar *p;
-       GdkPixbuf *pixbuf;
-       GdkPixbuf *scaled_pixbuf;
-       GdkPixbuf *rotated_pixbuf;
        cairo_surface_t *surface;
        cairo_surface_t *rotated_surface;
        static const cairo_user_data_key_t key;
@@ -249,11 +246,15 @@ tiff_document_render (EvDocument      *document,
        if (width <= 0 || height <= 0)
                return NULL;                
 
+#ifdef HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH
+       rowstride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, width);
+#else
        rowstride = width * 4;
        if (rowstride / 4 != width)
                /* overflow */
                return NULL;                
-        
+#endif
+       
        bytes = height * rowstride;
        if (bytes / rowstride != height)
                /* overflow */