rpms/evince/F-8 tiff.patch,NONE,1.1 evince.spec,1.96,1.97
Matthias Clasen (mclasen)
fedora-extras-commits at redhat.com
Fri Nov 16 04:09:53 UTC 2007
Author: mclasen
Update of /cvs/extras/rpms/evince/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22747
Modified Files:
evince.spec
Added Files:
tiff.patch
Log Message:
fix rendering of tiff images
tiff.patch:
--- NEW FILE tiff.patch ---
diff -up evince-2.20.1/backend/tiff/tiff-document.c.tiff evince-2.20.1/backend/tiff/tiff-document.c
--- evince-2.20.1/backend/tiff/tiff-document.c.tiff 2007-10-15 16:12:12.000000000 -0400
+++ evince-2.20.1/backend/tiff/tiff-document.c 2007-11-15 23:02:08.000000000 -0500
@@ -210,6 +210,7 @@ tiff_document_render (EvDocument *d
float x_res, y_res;
gint rowstride, bytes;
guchar *pixels = NULL;
+ guchar *p;
GdkPixbuf *pixbuf;
GdkPixbuf *scaled_pixbuf;
GdkPixbuf *rotated_pixbuf;
@@ -271,6 +272,21 @@ tiff_document_render (EvDocument *d
ORIENTATION_TOPLEFT, 1);
pop_handlers ();
+ /* Convert the format returned by libtiff to
+ * what cairo expects
+ */
+ while (p < pixels + bytes) {
+ uint32 pixel = *(uint32 *)p;
+ int r = TIFFGetR(pixel);
+ int g = TIFFGetG(pixel);
+ int b = TIFFGetB(pixel);
+ int a = TIFFGetA(pixel);
+ *p++ = b;
+ *p++ = g;
+ *p++ = r;
+ *p++ = a;
+ }
+
rotated_surface = ev_document_misc_surface_rotate_and_scale (surface,
(width * rc->scale) + 0.5,
(height * rc->scale * (x_res / y_res)) + 0.5,
Index: evince.spec
===================================================================
RCS file: /cvs/extras/rpms/evince/F-8/evince.spec,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- evince.spec 16 Oct 2007 03:42:45 -0000 1.96
+++ evince.spec 16 Nov 2007 04:09:19 -0000 1.97
@@ -5,7 +5,7 @@
Name: evince
Version: 2.20.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Document viewer
License: GPLv2+ and GFDL+
@@ -13,6 +13,8 @@
URL: http://www.gnome.org/projects/evince/
Source0: http://download.gnome.org/sources/%{name}/2.20/%{name}-%{version}.tar.bz2
Patch0: evince-0.6.0-print-error.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=497279
+Patch1: tiff.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk2-devel >= %{gtk2_version}
@@ -50,6 +52,7 @@
%prep
%setup -q
%patch0 -p1 -b .print-error
+%patch1 -p1 -b .tiff
%build
intltoolize --force
@@ -151,6 +154,9 @@
%changelog
+* Thu Nov 15 2007 Matthias Clasen <mclasen at redhat.com> - 2.20.1-2
+- Fix rendering of tiff images (#385671)
+
* Mon Oct 15 2007 Matthias Clasen <mclasen at redhat.com> - 2.20.1-1
- Update to 2.20.1 (bug fixes and translation updates)
More information about the fedora-extras-commits
mailing list