EV_BACKEND_REGISTER_WITH_CODE (TiffDocument, tiff_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
- tiff_document_document_thumbnails_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
- tiff_document_document_file_exporter_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ tiff_document_document_thumbnails_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
+ tiff_document_document_file_exporter_iface_init);
});
static TIFFErrorHandler orig_error_handler = NULL;
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 */