Skip to content
Permalink
Browse files

No commit message

  • Loading branch information...
cristy
cristy committed Jan 9, 2015
1 parent 530f17f commit 450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
Showing with 16 additions and 14 deletions.
  1. +1 −1 MagickCore/composite.c
  2. +13 −0 MagickCore/pixel-accessor.h
  3. +0 −13 MagickCore/threshold.c
  4. +2 −0 coders/sun.c
@@ -2305,7 +2305,7 @@ if (0)
break;
}
}
q[i]=ClampToQuantum(pixel);
q[i]=ClampPixel(pixel);
}
p+=GetPixelChannels(composite_image);
channels=GetPixelChannels(composite_image);
@@ -31,6 +31,19 @@ extern "C" {

#undef index

static inline Quantum ClampPixel(const MagickRealType value)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
return((Quantum) value);
#else
if (value < 0.0)
return((Quantum) 0.0);
if (value >= (MagickRealType) QuantumRange)
return((Quantum) QuantumRange);
return((Quantum) value);
#endif
}

static inline Quantum GetPixela(const Image *restrict image,
const Quantum *restrict pixel)
{
@@ -685,19 +685,6 @@ MagickExport MagickBooleanType BlackThresholdImage(Image *image,
%
*/

static inline Quantum ClampPixel(const MagickRealType value)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
return((Quantum) value);
#else
if (value < 0.0f)
return(0.0);
if (value >= (MagickRealType) QuantumRange)
return((Quantum) QuantumRange);
return(value);
#endif
}

MagickExport MagickBooleanType ClampImage(Image *image,ExceptionInfo *exception)
{
#define ClampImageTag "Clamp/Image"
@@ -337,6 +337,8 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
}
switch (sun_info.maptype)
{
case RMT_NONE:
break;
case RMT_EQUAL_RGB:
{
unsigned char

0 comments on commit 450bd71

Please sign in to comment.
You can’t perform that action at this time.