[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#403273: No support for png with 16 bits per channel



Package: xautomation
Version: 0.96-5
Severity: normal
Tags: patch

When using patextract on a PNG with 16 bits per channel, the pixels end up mangled
(colors distorted & twice as wide).  The attached patch fixes the problem for me.

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-1-k7
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages xautomation depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libpng12-0                   1.2.13-4    PNG library - runtime
ii  libx11-6                     2:1.0.3-4   X11 client-side library
ii  libxtst6                     1:1.0.1-5   X11 Testing -- Resource extension 

xautomation recommends no packages.

-- no debconf information
--- xautomation-0.96/image.c	2003-12-15 14:44:01.000000000 -0400
+++ xautomation-0.96+16bit/image.c	2006-12-15 16:52:35.000000000 -0400
@@ -211,7 +211,7 @@
    }
   
   png_init_io( png, in );
-  png_read_png( png, info, PNG_TRANSFORM_EXPAND, NULL);
+  png_read_png( png, info, PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_STRIP_16, NULL);
 
   /* These don't do proper cleanup... */
   channels = png_get_channels( png, info );

Reply to: