Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/663
  • Loading branch information
Cristy committed Aug 9, 2017
1 parent 04178de commit 1cc6f0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MagickCore/enhance.c
Expand Up @@ -45,6 +45,7 @@
#include "MagickCore/artifact.h"
#include "MagickCore/attribute.h"
#include "MagickCore/cache.h"
#include "MagickCore/cache-private.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/channel.h"
#include "MagickCore/color.h"
Expand Down Expand Up @@ -1047,6 +1048,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image,
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if (SyncImagePixelCache(image,exception) == MagickFalse)
return(MagickFalse);
if (SetImageGray(image,exception) != MagickFalse)
(void) SetImageColorspace(image,GRAYColorspace,exception);
black=(double *) AcquireQuantumMemory(GetPixelChannels(image),sizeof(*black));
Expand Down Expand Up @@ -1530,6 +1533,8 @@ MagickExport MagickBooleanType EqualizeImage(Image *image,
*/
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (SyncImagePixelCache(image,exception) == MagickFalse)
return(MagickFalse);
#if defined(MAGICKCORE_OPENCL_SUPPORT)
if (AccelerateEqualizeImage(image,exception) != MagickFalse)
return(MagickTrue);
Expand Down

0 comments on commit 1cc6f0c

Please sign in to comment.