[Python-modules-commits] r11827 - in packages/gamera/trunk/debian (3 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Sat Feb 20 16:35:01 UTC 2010


    Date: Saturday, February 20, 2010 @ 16:34:59
  Author: jwilk
Revision: 11827

Fix TIFF export on 64-bit machines (closes: #570559).

Added:
  packages/gamera/trunk/debian/patches/tiff-support-64bit.diff
Modified:
  packages/gamera/trunk/debian/changelog
  packages/gamera/trunk/debian/patches/series

Modified: packages/gamera/trunk/debian/changelog
===================================================================
--- packages/gamera/trunk/debian/changelog	2010-02-20 14:06:32 UTC (rev 11826)
+++ packages/gamera/trunk/debian/changelog	2010-02-20 16:34:59 UTC (rev 11827)
@@ -8,8 +8,9 @@
   * Run tests at build time.
     + Build-depend on python-codespeak-lib, python-imaging and
       python-imaging-dbg.
+  * Fix TIFF export on 64-bit machines (closes: #570559).
 
- -- Jakub Wilk <jwilk at debian.org>  Fri, 19 Feb 2010 16:21:23 +0100
+ -- Jakub Wilk <jwilk at debian.org>  Sat, 20 Feb 2010 17:33:33 +0100
 
 gamera (3.2.3-2) unstable; urgency=low
 

Modified: packages/gamera/trunk/debian/patches/series
===================================================================
--- packages/gamera/trunk/debian/patches/series	2010-02-20 14:06:32 UTC (rev 11826)
+++ packages/gamera/trunk/debian/patches/series	2010-02-20 16:34:59 UTC (rev 11827)
@@ -1,3 +1,4 @@
+tiff-support-64bit.diff
 gendoc-use-wxversion.diff
 gendoc-draw-text.diff
 fix-paths.diff

Added: packages/gamera/trunk/debian/patches/tiff-support-64bit.diff
===================================================================
--- packages/gamera/trunk/debian/patches/tiff-support-64bit.diff	                        (rev 0)
+++ packages/gamera/trunk/debian/patches/tiff-support-64bit.diff	2010-02-20 16:34:59 UTC (rev 11827)
@@ -0,0 +1,24 @@
+Description: Fix TIFF export on 64-bit machines.
+Author: Jakub Wilk <jwilk at debian.org>
+Bug: http://tech.groups.yahoo.com/group/gamera-devel/message/1939
+Bug-Debian: http://bugs.debian.org/570559
+
+Index: gamera-3.2.4/include/plugins/tiff_support.hpp
+===================================================================
+--- gamera-3.2.4.orig/include/plugins/tiff_support.hpp	2010-02-20 16:38:27.000000000 +0100
++++ gamera-3.2.4/include/plugins/tiff_support.hpp	2010-02-20 16:52:35.000000000 +0100
+@@ -218,12 +218,13 @@
+     template<class T>
+     void operator()(const T& matrix, TIFF* tif) {
+       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
++      assert(TIFFScanlineSize(tif) & 3 == 0);
+       tdata_t buf = _TIFFmalloc(TIFFScanlineSize(tif));
+       if (!buf)
+         throw std::runtime_error("Error allocating scanline");
+       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
+       std::bitset<32> bits;
+-      unsigned long* data = (unsigned long *)buf;
++      uint32* data = (uint32 *)buf;
+       bool little_endian = byte_order_little_endian();
+       typename T::const_vec_iterator it = matrix.vec_begin();
+       for (size_t i = 0; i < matrix.nrows(); i++) {




More information about the Python-modules-commits mailing list