Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1680
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Sep 13, 2019
1 parent e1a16b5 commit cbc6012
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4109,12 +4109,12 @@ High Dynamic Range Imagery
Install documentation: $wantdocs
Memory Allocation Library:
Memory allocation library:
JEMalloc --with-jemalloc=$with_jemalloc $have_jemalloc
TCMalloc --with-tcmalloc=$with_tcmalloc $have_tcmalloc
UMem --with-umem=$with_umem $have_umem
Delegate Library Configuration:
Delegate library configuration:
BZLIB --with-bzlib=$with_bzlib $have_bzlib
Autotrace --with-autotrace=$with_autotrace $have_autotrace
DJVU --with-djvu=$with_djvu $have_djvu
Expand Down Expand Up @@ -4150,19 +4150,19 @@ Delegate Library Configuration:
ZLIB --with-zlib=$with_zlib $have_zlib
ZSTD --with-zstd=$with_zstd $have_zstd
Delegate Program Configuration:
Delegate program configuration:
GhostPCL None $PCLDelegate ($PCLVersion)
GhostXPS None $XPSDelegate ($XPSVersion)
Ghostscript None $PSDelegate ($GSVersion)
Font Configuration:
Font configuration:
Apple fonts --with-apple-font-dir=$with_apple_font_dir $result_apple_font_dir
Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
URW-base35 fonts --with-urw-base35-font-dir=$with_urw_base35_font_dir $result_urw_base35_font_dir
Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
X11 Configuration:
X11 configuration:
X_CFLAGS = $X_CFLAGS
X_PRE_LIBS = $X_PRE_LIBS
X_LIBS = $X_LIBS
Expand Down
19 changes: 10 additions & 9 deletions magick/colorspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,6 @@ MagickExport MagickBooleanType RGBTransformImage(Image *image,
return(status);
}
case LinearGRAYColorspace:
{
if ((image->intensity != Rec601LuminancePixelIntensityMethod) &&
(image->intensity != Rec709LuminancePixelIntensityMethod))
image->intensity=Rec709LuminancePixelIntensityMethod;
}
case GRAYColorspace:
{
/*
Expand Down Expand Up @@ -425,6 +420,13 @@ MagickExport MagickBooleanType RGBTransformImage(Image *image,
}
for (x=0; x < (ssize_t) image->columns; x++)
{
MagickRealType
gray;

gray=(MagickRealType) GetPixelIntensity(image,q);
if ((image->intensity == Rec601LumaPixelIntensityMethod) ||
(image->intensity == Rec709LumaPixelIntensityMethod))
gray=DecodePixelGamma(gray);
SetPixelGray(q,ClampToQuantum(GetPixelIntensity(image,q)));
q++;
}
Expand Down Expand Up @@ -1979,6 +1981,7 @@ MagickExport MagickBooleanType TransformRGBImage(Image *image,
return(MagickFalse);
return(status);
}
case LinearGRAYColorspace:
case GRAYColorspace:
case Rec601LumaColorspace:
case Rec709LumaColorspace:
Expand Down Expand Up @@ -2025,13 +2028,11 @@ MagickExport MagickBooleanType TransformRGBImage(Image *image,
MagickRealType
gray;

gray=(MagickRealType) GetPixelGray(q);
gray=(MagickRealType) GetPixelIntensity(image,q);
if ((image->intensity == Rec601LuminancePixelIntensityMethod) ||
(image->intensity == Rec709LuminancePixelIntensityMethod))
gray=EncodePixelGamma(gray);
SetPixelRed(q,ClampToQuantum(gray));
SetPixelGreen(q,ClampToQuantum(gray));
SetPixelBlue(q,ClampToQuantum(gray));
SetPixelGray(q,ClampToQuantum(gray));
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
Expand Down

0 comments on commit cbc6012

Please sign in to comment.