From cdc4bc0f069826e3011dc73df9fcd1f55254b3c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 16 Nov 2008 15:37:03 +0000 Subject: [PATCH] - fix building ImageMagick with HDRI enabled Changed files: dx-ImageMagic.patch -> 1.2 --- dx-ImageMagic.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dx-ImageMagic.patch b/dx-ImageMagic.patch index ba8f794..5349233 100644 --- a/dx-ImageMagic.patch +++ b/dx-ImageMagic.patch @@ -29,3 +29,19 @@ AC_DEFINE(HAVE_LIBMAGICK, 1, [Define to 1 if you have the ImageMagick libraries]) AC_MSG_RESULT(yes) have_magick='yes' +diff -urN dx-4.4.4/src/exec/dxmods/_im_image.c dx-4.4.4-new/src/exec/dxmods/_im_image.c +--- dx-4.4.4/src/exec/dxmods/_im_image.c 2006-01-05 17:55:43.000000000 -0500 ++++ dx-4.4.4-new/src/exec/dxmods/_im_image.c 2008-05-11 01:09:15.000000000 -0400 +@@ -999,8 +999,11 @@ + /* Opacities in colormap is wrong; use direct color map */ + if ( image->matte ) + for ( x = 0; x < width; x++ ) +- omap[*(indexes2++)] = ( 1.0 - ++ { ++ int omap_index = *(indexes2++); // if Magick has HDRI, Quantum is a float ++ omap[(omap_index < 0 ? 0 : omap_index)] = ( 1.0 - // clamp if negative + ((float) (pixies++)->opacity) / MaxRGB ); ++ } + } + } else + DXErrorGoto( ERROR_INTERNAL, "unexpected image field format" ); -- 2.44.0