[vigra] Fix for transparent alpha bug in 16bit and EXR output
bpostle
bpostle at fedoraproject.org
Mon Feb 2 22:42:09 UTC 2015
commit 75dfb59cff15663e0a21df67c5f48a02c6dfb205
Author: Bruno Postle <bruno at postle.net>
Date: Mon Feb 2 22:41:58 2015 +0000
Fix for transparent alpha bug in 16bit and EXR output
vigra.spec | 8 +++++++-
vigra.transparent-alpha-fix.patch | 22 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/vigra.spec b/vigra.spec
index 7b5fc8d..1bac004 100644
--- a/vigra.spec
+++ b/vigra.spec
@@ -2,7 +2,7 @@
Summary: Generic Programming for Computer Vision
Name: vigra
Version: 1.10.0
-Release: 7%{?dist}
+Release: 8%{?dist}
License: MIT
Group: Development/Libraries
Source0: http://hci.iwr.uni-heidelberg.de/%{name}/%{name}-%{version}-src.tar.gz
@@ -15,6 +15,8 @@ BuildRequires: cmake boost-devel doxygen
BuildRequires: hdf5-devel python-sphinx numpy-f2py boost-python OpenEXR-devel
%endif
Patch0: vigra.rhbz987048.shebang.patch
+# https://github.com/ukoethe/vigra/pull/212
+Patch1: vigra.transparent-alpha-fix.patch
%description
VIGRA stands for "Vision with Generic Algorithms". It's a novel computer vision
@@ -50,6 +52,7 @@ The vigra-python package provides python bindings for vigra
%prep
%setup -q
%patch0 -p1 -b .rhbz987048.shebang.patch
+%patch1 -p1 -b .transparent-alpha-fix.patch
%build
%if ! 0%{?rhel}
@@ -103,6 +106,9 @@ rm -rf %{buildroot}
%endif
%changelog
+* Mon Feb 02 2015 Bruno Postle <bruno at postle.net> - 1.10.0-8
+- Fix for transparent alpha bug in 16bit and EXR output
+
* Tue Jan 27 2015 Petr Machata <pmachata at redhat.com> - 1.10.0-7
- Rebuild for boost 1.57.0
diff --git a/vigra.transparent-alpha-fix.patch b/vigra.transparent-alpha-fix.patch
new file mode 100644
index 0000000..9e2026d
--- /dev/null
+++ b/vigra.transparent-alpha-fix.patch
@@ -0,0 +1,22 @@
+From c3fb6c90ab8b4243b752919d0e491df2a2d4f047 Mon Sep 17 00:00:00 2001
+From: Chris Spiel <cspiel at freenet.de>
+Date: Mon, 13 Oct 2014 16:08:50 +0200
+Subject: [PATCH] Fix an off-by-one error in function exportImageAlpha.
+
+---
+ include/vigra/impexalpha.hxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/vigra/impexalpha.hxx b/include/vigra/impexalpha.hxx
+index 0426d67..41299fc 100644
+--- a/include/vigra/impexalpha.hxx
++++ b/include/vigra/impexalpha.hxx
+@@ -789,7 +789,7 @@ namespace vigra
+
+ encoder->setPixelType(pixel_type);
+
+- vigra_precondition(isBandNumberSupported(encoder->getFileType(), image_accessor.size(image_upper_left)),
++ vigra_precondition(isBandNumberSupported(encoder->getFileType(), image_accessor.size(image_upper_left) + 1U),
+ "exportImageAlpha(): file format does not support requested number of bands (color channels)");
+
+ const range_t image_source_range(find_source_value_range(export_info,
More information about the scm-commits
mailing list