modifyImage();
if ( colorSpace_ != RGBColorspace &&
+ colorSpace_ != sRGBColorspace &&
colorSpace_ != TransparentColorspace &&
colorSpace_ != GRAYColorspace )
{
if (image()->colorspace != RGBColorspace &&
+ image()->colorspace != sRGBColorspace &&
image()->colorspace != TransparentColorspace &&
image()->colorspace != GRAYColorspace)
{
}
if ( colorSpace_ == RGBColorspace ||
+ colorSpace_ == sRGBColorspace ||
colorSpace_ == TransparentColorspace ||
colorSpace_ == GRAYColorspace )
{
extern "C" {
#endif
+#include <MagickCore/image.h>
#include <MagickCore/image-private.h>
#include <MagickCore/pixel.h>
-static inline MagickBooleanType IsGrayColorspace(
- const ColorspaceType colorspace)
-{
- if ((colorspace == GRAYColorspace) || (colorspace == Rec601LumaColorspace) ||
- (colorspace == Rec709LumaColorspace))
- return(MagickTrue);
- return(MagickFalse);
-}
-
static inline void ConvertRGBToCMYK(PixelInfo *pixel)
{
MagickRealType
pixel->black=QuantumRange*black;
}
+static inline MagickBooleanType IsGrayColorspace(
+ const ColorspaceType colorspace)
+{
+ if ((colorspace == GRAYColorspace) || (colorspace == Rec601LumaColorspace) ||
+ (colorspace == Rec709LumaColorspace))
+ return(MagickTrue);
+ return(MagickFalse);
+}
+
+static inline MagickBooleanType IsRGBColorspace(
+ const ColorspaceType colorspace)
+{
+ if ((IsGrayColorspace(colorspace) != MagickFalse) ||
+ (colorspace == RGBColorspace) || (colorspace == TransparentColorspace))
+ return(MagickTrue);
+ return(MagickFalse);
+}
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
}
if (image->colorspace == colorspace)
return(MagickTrue);
- if ((colorspace == RGBColorspace) || (colorspace == TransparentColorspace))
+ if ((colorspace == RGBColorspace) ||
+ (colorspace == sRGBColorspace) ||
+ (colorspace == TransparentColorspace))
return(TransformRGBImage(image,image->colorspace));
status=MagickTrue;
- if ((image->colorspace != RGBColorspace) &&
- (image->colorspace != TransparentColorspace) &&
- (image->colorspace != GRAYColorspace))
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
status=TransformRGBImage(image,image->colorspace);
if (RGBTransformImage(image,colorspace) == MagickFalse)
status=MagickFalse;
}
case PaletteType:
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,RGBColorspace);
if ((image->storage_class == DirectClass) || (image->colors > 256))
{
}
case PaletteBilevelMatteType:
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,RGBColorspace);
if (image->matte == MagickFalse)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel);
}
case PaletteMatteType:
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,RGBColorspace);
if (image->matte == MagickFalse)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel);
}
case TrueColorType:
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,RGBColorspace);
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass);
}
case TrueColorMatteType:
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,RGBColorspace);
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass);
{
if (image->colorspace != CMYKColorspace)
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,RGBColorspace);
status=TransformImageColorspace(image,CMYKColorspace);
}
{
if (image->colorspace != CMYKColorspace)
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,RGBColorspace);
status=TransformImageColorspace(image,CMYKColorspace);
}
/* #undef AUTOTRACE_DELEGATE */
/* Define if coders and filters are to be built as modules. */
-#ifndef MAGICKCORE_BUILD_MODULES
-#define MAGICKCORE_BUILD_MODULES 1
-#endif
+/* #undef BUILD_MODULES */
/* Define if you have the bzip2 library */
#ifndef MAGICKCORE_BZLIB_DELEGATE
#endif
/* Define if you have DJVU library */
-#ifndef MAGICKCORE_DJVU_DELEGATE
-#define MAGICKCORE_DJVU_DELEGATE 1
-#endif
+/* #undef DJVU_DELEGATE */
/* Directory where ImageMagick documents live. */
#ifndef MAGICKCORE_DOCUMENTATION_PATH
#endif
/* Define if you have FFTW library */
-#ifndef MAGICKCORE_FFTW_DELEGATE
-#define MAGICKCORE_FFTW_DELEGATE 1
-#endif
+/* #undef FFTW_DELEGATE */
/* Location of filter modules */
#ifndef MAGICKCORE_FILTER_PATH
#endif
/* Define if you have the <lcms2.h> header file. */
-/* #undef HAVE_LCMS2_H */
+#ifndef MAGICKCORE_HAVE_LCMS2_H
+#define MAGICKCORE_HAVE_LCMS2_H 1
+#endif
/* Define if you have the <lcms2/lcms2.h> header file. */
/* #undef HAVE_LCMS2_LCMS2_H */
/* Define if you have the <lcms.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS_H
-#define MAGICKCORE_HAVE_LCMS_H 1
-#endif
+/* #undef HAVE_LCMS_H */
/* Define if you have the <lcms/lcms.h> header file. */
/* #undef HAVE_LCMS_LCMS_H */
#endif
/* Define if you have JBIG library */
-#ifndef MAGICKCORE_JBIG_DELEGATE
-#define MAGICKCORE_JBIG_DELEGATE 1
-#endif
+/* #undef JBIG_DELEGATE */
/* Define if you have JPEG version 2 "Jasper" library */
#ifndef MAGICKCORE_JP2_DELEGATE
#endif
/* Define if you have LQR library */
-#ifndef MAGICKCORE_LQR_DELEGATE
-#define MAGICKCORE_LQR_DELEGATE 1
-#endif
+/* #undef LQR_DELEGATE */
/* Define if using libltdl to support dynamically loadable modules */
#ifndef MAGICKCORE_LTDL_DELEGATE
/* Define to the system default library search path. */
#ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
#endif
/* The archive extension */
/* #undef NO_MINUS_C_MINUS_O */
/* Define if you have OPENEXR library */
-#ifndef MAGICKCORE_OPENEXR_DELEGATE
-#define MAGICKCORE_OPENEXR_DELEGATE 1
-#endif
+/* #undef OPENEXR_DELEGATE */
/* Define to the address where bug reports for this package should be sent. */
#ifndef MAGICKCORE_PACKAGE_BUGREPORT
#endif
/* Define if you have RSVG library */
-#ifndef MAGICKCORE_RSVG_DELEGATE
-#define MAGICKCORE_RSVG_DELEGATE 1
-#endif
+/* #undef RSVG_DELEGATE */
/* Define to the type of arg 1 for `select'. */
#ifndef MAGICKCORE_SELECT_TYPE_ARG1
/* Define if you have WEBP library */
-#ifndef MAGICKCORE_WEBP_DELEGATE
-#define MAGICKCORE_WEBP_DELEGATE 1
-#endif
+/* #undef WEBP_DELEGATE */
/* Define to use the Windows GDI32 library */
/* #undef WINGDI32_DELEGATE */
/* #undef WITH_DMALLOC */
/* Define if you have WMF library */
-#ifndef MAGICKCORE_WMF_DELEGATE
-#define MAGICKCORE_WMF_DELEGATE 1
-#endif
+/* #undef WMF_DELEGATE */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
bitmap_bits=(RGBQUAD *) GlobalLock((HGLOBAL) bitmap_bitsH);
if ( bitmap.bmBits == NULL )
bitmap.bmBits = bitmap_bits;
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
TransformImageColorspace(image,RGBColorspace);
/*
Extract crop image.
#include "MagickCore/attribute.h"
#include "MagickCore/cache.h"
#include "MagickCore/color.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/configure.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
(source_colorspace != LabColorspace) &&
(source_colorspace != XYZColorspace) &&
(source_colorspace != YCbCrColorspace) &&
- (image->colorspace != RGBColorspace))
+ (IsRGBColorspace(image->colorspace) == MagickFalse))
ThrowProfileException(ImageError,"ColorspaceColorProfileMismatch",
name);
switch (image->rendering_intent)
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/enhance.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
cube_info->quantize_info->colorspace);
else
if ((image->colorspace != GRAYColorspace) &&
- (image->colorspace != RGBColorspace) &&
+ (IsRGBColorspace(image->colorspace) == MagickFalse) &&
(image->colorspace != CMYColorspace))
(void) TransformImageColorspace((Image *) image,RGBColorspace);
if (AcquireImageColormap(image,cube_info->colors) == MagickFalse)
else
if ((image->colorspace != GRAYColorspace) &&
(image->colorspace != CMYColorspace) &&
- (image->colorspace != RGBColorspace))
+ (IsRGBColorspace(image->colorspace) == MagickFalse))
(void) TransformImageColorspace((Image *) image,RGBColorspace);
midpoint.red=(MagickRealType) QuantumRange/2.0;
midpoint.green=(MagickRealType) QuantumRange/2.0;
image->filename)
}
}
- if (colorspace != RGBColorspace)
+ if (IsRGBColorspace(colorspace) == MagickFalse)
(void) TransformImageColorspace(image,colorspace);
/*
Initialize histogram.
Classify using the fuzzy c-Means technique.
*/
status=Classify(image,extrema,cluster_threshold,WeightingExponent,verbose);
- if (colorspace != RGBColorspace)
+ if (IsRGBColorspace(colorspace) == MagickFalse)
(void) TransformImageColorspace(image,colorspace);
/*
Relinquish resources.
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision "exported"
+#define MagickSVNRevision "4693"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 5,0,0
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
/*
Write AAI header.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
(void) WriteBlobLSBLong(image,(unsigned int) image->columns);
(void) WriteBlobLSBLong(image,(unsigned int) image->rows);
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
(void) WriteBlobLSBShort(image,(unsigned short) image->columns);
(void) WriteBlobLSBShort(image,0);
(void) WriteBlobLSBShort(image,(unsigned short) image->rows);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
length=(image->columns+7)/8;
pixels=(unsigned char *) AcquireQuantumMemory(length,sizeof(*pixels));
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
/*
Write AVS header.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
(void) WriteBlobMSBLong(image,(unsigned int) image->columns);
(void) WriteBlobMSBLong(image,(unsigned int) image->rows);
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
/*
Convert MIFF to BGR raster pixels.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
if ((LocaleCompare(image_info->magick,"BGRA") == 0) &&
(image->matte == MagickFalse))
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
/*
Initialize BMP raster file header.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
(void) ResetMagickMemory(&bmp_info,0,sizeof(bmp_info));
bmp_info.file_size=14+12;
#include "MagickCore/cache.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
(void) FormatLocaleString(buffer,MaxTextExtent,"<Depth>2</Depth>\n");
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<Data>");
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
for (y=0; y < (ssize_t) image->rows; y++)
{
#include "MagickCore/colormap.h"
#include "MagickCore/colormap-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/draw.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
/*
Initialize DIB raster file header.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
if (image->storage_class == DirectClass)
{
#include "MagickCore/blob-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/compress.h"
/*
Convert MIFF to monochrome.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
status=HuffmanEncodeImage(write_info,image,image);
if (GetNextImageInList(image) == (Image *) NULL)
#include "MagickCore/cache.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Allocate image memory.
Initialize FPX toolkit.
*/
image->depth=8;
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
memory_limit=20000000;
fpx_status=FPX_SetToolkitMemoryLimit(&memory_limit);
#include "MagickCore/colormap.h"
#include "MagickCore/colormap-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
one=1;
do
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
opacity=(-1);
if (IsImageOpaque(image,&image->exception) != MagickFalse)
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
/*
Write grayscale pixels.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
quantum_type=GrayQuantum;
quantum_info=AcquireQuantumInfo(image_info,image);
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Write header.
&image->exception);
if (hrz_image == (Image *) NULL)
return(MagickFalse);
- if (hrz_image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(hrz_image->colorspace) == MagickFalse)
(void) TransformImageColorspace(hrz_image,RGBColorspace);
/*
Allocate memory for pixels.
#include "MagickCore/blob-private.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
if (status == MagickFalse)
return(status);
(void) CloseBlob(image);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
*url='\0';
if ((LocaleCompare(image_info->magick,"FTP") == 0) ||
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
ipl_info.width = (unsigned int) image->columns;
ipl_info.height = (unsigned int) image->rows;
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
- if(image->colorspace == RGBColorspace) { ipl_info.colors = 3; }
+ if(IsRGBColorspace(image->colorspace) == MagickTrue) { ipl_info.colors = 3; }
else{ ipl_info.colors = 1; }
ipl_info.size = (unsigned int) (28 +
/*
Allocate pixel data.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
number_packets=(image->columns+7)/8;
pixels=(unsigned char *) AcquireQuantumMemory(number_packets,
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/exception.h"
/*
Initialize JPEG 2000 API.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
jp2_stream=JP2StreamManager(image);
if (jp2_stream == (jas_stream_t *) NULL)
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
}
default:
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
break;
}
#include "MagickCore/colormap.h"
#include "MagickCore/colormap-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/histogram.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Allocate colormap.
#include "MagickCore/cache.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
scene=0;
do
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
is_gray = IsImageGray(image,&image->exception);
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Convert image to a bi-level image.
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
/*
Allocate memory for pixels.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
pixels=(unsigned char *) AcquireQuantumMemory((size_t) image->columns,
3UL*sizeof(*pixels));
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Convert image to a bi-level image.
#include "MagickCore/colormap-private.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/histogram.h"
scene=0;
do
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
count=GetNumberColors(image,NULL,&exception);
for (bits_per_pixel=1; (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
#include "MagickCore/cache.h"
#include "MagickCore/client.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/decorate.h"
#include "MagickCore/exception.h"
tile_image=bordered_image;
}
(void) TransformImage(&tile_image,(char *) NULL,tile_geometry);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(tile_image,YCCColorspace);
downsample_image=ResizeImage(tile_image,tile_image->columns/2,
tile_image->rows/2,TriangleFilter,1.0,&image->exception);
status=OpenBlob(image_info,pcd_image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(pcd_image,RGBColorspace);
/*
Write PCD image header.
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/delegate.h"
#include "MagickCore/draw.h"
one=1;
do
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Initialize the printer.
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
page_table=(MagickOffsetType *) NULL;
if ((LocaleCompare(image_info->magick,"DCX") == 0) ||
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
if (image -> colors <= 2 || GetImageType( image, &image -> exception ) == BilevelType) { /* TS */
sizeof(*scanline));
if (scanline == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Convert to GRAY raster scanline.
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/compress.h"
#include "MagickCore/constitute.h"
#include "MagickCore/delegate.h"
page.width=page.height;
page.height=swap;
}
- if (image_info->colorspace == RGBColorspace)
+ if (IsRGBColorspace(image_info->colorspace) != MagickFalse)
cmyk=MagickFalse;
/*
Create Ghostscript control file.
}
if (compression == JPEG2000Compression)
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
}
/*
#include "MagickCore/colormap.h"
#include "MagickCore/colormap-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/composite.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
(void) SetImageExtent(image,
MagickMax(image->columns,tile_image->columns),
MagickMax(image->rows,tile_image->rows));
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,tile_image->colorspace);
(void) CompositeImage(image,CopyCompositeOp,tile_image,frame.left,
frame.right);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Initialize image info.
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/enhance.h"
#include "MagickCore/exception.h"
}
}
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
}
if (format != '7')
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
(void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n",
(double) image->columns,(double) image->rows);
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/delegate.h"
#include "MagickCore/delegate-private.h"
}
}
(void) CloseBlob(image);
- if (image_info->colorspace == RGBColorspace)
+ if (IsRGBColorspace(image_info->colorspace) != MagickFalse)
cmyk=MagickFalse;
/*
Create Ghostscript control file.
/*
Scale relative to dots-per-inch.
*/
- if ((image->colorspace != RGBColorspace) &&
+ if ((IsRGBColorspace(image->colorspace) == MagickFalse) &&
(image->colorspace != CMYKColorspace))
(void) TransformImageColorspace(image,RGBColorspace);
delta.x=DefaultResolution;
#include "MagickCore/cache.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/enhance.h"
#include "MagickCore/exception.h"
}
case 4:
{
- if ((image->colorspace == RGBColorspace) && (channels > 3))
+ if ((IsRGBColorspace(image->colorspace) == MagickTrue) && (channels > 3))
break;
SetPixelAlpha(image,pixel,q);
break;
(image->colorspace != CMYKColorspace)) &&
(image_info->colorspace != CMYKColorspace))
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
(void) WriteBlobMSBShort(image,(unsigned short)
(image->storage_class == PseudoClass ? IndexedMode : RGBMode));
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
/*
Convert MIFF to RGB raster pixels.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
if ((LocaleCompare(image_info->magick,"RGBA") == 0) &&
(image->matte == MagickFalse))
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
/*
Initialize SGI raster file header.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
(void) ResetMagickMemory(&iris_info,0,sizeof(iris_info));
iris_info.magic=0x01DA;
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
/*
Initialize SUN raster file header.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
sun_info.magic=0x59a66a95;
if ((image->columns != (unsigned int) image->columns) ||
#include "MagickCore/colormap.h"
#include "MagickCore/colormap-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
*/
if ((image->columns > 65535L) || (image->rows > 65535L))
ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
targa_info.id_length=0;
value=GetImageProperty(image,"comment");
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/enhance.h"
#include "MagickCore/exception.h"
}
else
{
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
photometric=PHOTOMETRIC_RGB;
}
if (image_info->quality != UndefinedCompressionQuality)
(void) TIFFSetField(tiff,TIFFTAG_JPEGQUALITY,image_info->quality);
(void) TIFFSetField(tiff,TIFFTAG_JPEGCOLORMODE,JPEGCOLORMODE_RAW);
- if (image->colorspace == RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickTrue)
{
const char
*value;
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image-private.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
exception=(&image->exception);
transparent=MagickFalse;
#include "MagickCore/cache.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Write header.
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
/*
Initialize VIFF image structure.
*/
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
if (IsImageGray(image,&image->exception) != MagickFalse)
(void) SetImageStorageClass(image,DirectClass);
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Convert image to a bi-level image.
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Write X bitmap header.
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/geometry.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
SetGeometry(image,&geometry);
(void) ParseMetaGeometry(PiconGeometry,&geometry.x,&geometry.y,
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
opacity=(-1);
if (image->matte == MagickFalse)
#include "MagickCore/colormap.h"
#include "MagickCore/colormap-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
- if (image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,RGBColorspace);
/*
Initialize XWD file header.
<configure name="LIB_VERSION" value="0x700"/>
<configure name="LIB_VERSION_NUMBER" value="7,0,0,0"/>
<configure name="SVN_REVISION" value="4693" />
- <configure name="RELEASE_DATE" value="2011-07-05"/>
+ <configure name="RELEASE_DATE" value="2011-07-06"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
#include <ctype.h>
#include <math.h>
#include "MagickWand/MagickWand.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/string-private.h"
#include "validate.h"
\f
#if defined(MAGICKCORE_HDRI_SUPPORT)
fuzz+=0.003;
#endif
- if (reference_image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(reference_image->colorspace) == MagickFalse)
fuzz+=0.3;
fuzz+=MagickEpsilon;
difference_image=CompareImages(reference_image,reconstruct_image,
#if defined(MAGICKCORE_HDRI_SUPPORT)
fuzz+=0.003;
#endif
- if (reference_image->colorspace != RGBColorspace)
+ if (IsRGBColorspace(reference_image->colorspace) == MagickFalse)
fuzz+=0.3;
fuzz+=MagickEpsilon;
difference_image=CompareImages(reference_image,reconstruct_image,