diff --git a/coders/aai.c b/coders/aai.c
index 5448479..53d3de4 100644
--- a/coders/aai.c
+++ b/coders/aai.c
@@ -364,8 +364,7 @@
/*
Write AAI header.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobLSBLong(image,(unsigned int) image->columns);
(void) WriteBlobLSBLong(image,(unsigned int) image->rows);
/*
diff --git a/coders/art.c b/coders/art.c
index acf33b9..077fa49 100644
--- a/coders/art.c
+++ b/coders/art.c
@@ -311,8 +311,7 @@
return(status);
if ((image->columns > 65535UL) || (image->rows > 65535UL))
ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) SetImageType(image,BilevelType,exception);
image->endian=MSBEndian;
image->depth=1;
diff --git a/coders/avs.c b/coders/avs.c
index 84752a0..b4aa5e7 100644
--- a/coders/avs.c
+++ b/coders/avs.c
@@ -360,8 +360,7 @@
/*
Write AVS header.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobMSBLong(image,(unsigned int) image->columns);
(void) WriteBlobMSBLong(image,(unsigned int) image->rows);
/*
diff --git a/coders/bgr.c b/coders/bgr.c
index 0fbe74e..ce0b81c 100644
--- a/coders/bgr.c
+++ b/coders/bgr.c
@@ -1106,8 +1106,7 @@
/*
Convert MIFF to BGR raster pixels.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if ((LocaleCompare(image_info->magick,"BGRA") == 0) &&
(image->alpha_trait != BlendPixelTrait))
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
diff --git a/coders/bmp.c b/coders/bmp.c
index 52819bb..c232825 100644
--- a/coders/bmp.c
+++ b/coders/bmp.c
@@ -1565,8 +1565,7 @@
/*
Initialize BMP raster file header.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) ResetMagickMemory(&bmp_info,0,sizeof(bmp_info));
bmp_info.file_size=14+12;
if (type > 2)
diff --git a/coders/cip.c b/coders/cip.c
index b998dfb..5b42ca2 100644
--- a/coders/cip.c
+++ b/coders/cip.c
@@ -235,8 +235,7 @@
(void) FormatLocaleString(buffer,MaxTextExtent,"<Depth>2</Depth>\n");
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<Data>");
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
p=GetVirtualPixels(image,0,y,image->columns,1,exception);
diff --git a/coders/dds.c b/coders/dds.c
index 488f385..9b8bd7e 100644
--- a/coders/dds.c
+++ b/coders/dds.c
@@ -2561,9 +2561,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
-
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
pixelFormat=DDPF_FOURCC;
compression=FOURCC_DXT5;
diff --git a/coders/dib.c b/coders/dib.c
index a491fa6..d759cd9 100644
--- a/coders/dib.c
+++ b/coders/dib.c
@@ -1015,8 +1015,7 @@
/*
Initialize DIB raster file header.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (image->storage_class == DirectClass)
{
/*
diff --git a/coders/fax.c b/coders/fax.c
index 403d06d..be9b921 100644
--- a/coders/fax.c
+++ b/coders/fax.c
@@ -331,8 +331,7 @@
/*
Convert MIFF to monochrome.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
status=HuffmanEncodeImage(write_info,image,image,exception);
if (GetNextImageInList(image) == (Image *) NULL)
break;
diff --git a/coders/fits.c b/coders/fits.c
index f06a744..7ba4d88 100644
--- a/coders/fits.c
+++ b/coders/fits.c
@@ -643,8 +643,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Allocate image memory.
*/
diff --git a/coders/fpx.c b/coders/fpx.c
index a2c2f12..0f9b756 100644
--- a/coders/fpx.c
+++ b/coders/fpx.c
@@ -853,8 +853,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) CloseBlob(image);
/*
Initialize FPX toolkit.
diff --git a/coders/gif.c b/coders/gif.c
index a4986b2..cbd5bb6 100644
--- a/coders/gif.c
+++ b/coders/gif.c
@@ -1582,8 +1582,7 @@
one=1;
do
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
opacity=(-1);
if (IsImageOpaque(image,exception) != MagickFalse)
{
diff --git a/coders/gray.c b/coders/gray.c
index 226d47f..21737c1 100644
--- a/coders/gray.c
+++ b/coders/gray.c
@@ -413,8 +413,7 @@
/*
Write grayscale pixels.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
quantum_type=GrayQuantum;
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
diff --git a/coders/hrz.c b/coders/hrz.c
index 8170cb3..61d888a 100644
--- a/coders/hrz.c
+++ b/coders/hrz.c
@@ -307,8 +307,7 @@
hrz_image=ResizeImage(image,256,240,image->filter,exception);
if (hrz_image == (Image *) NULL)
return(MagickFalse);
- if (IssRGBCompatibleColorspace(hrz_image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(hrz_image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(hrz_image,sRGBColorspace,exception);
/*
Allocate memory for pixels.
*/
diff --git a/coders/html.c b/coders/html.c
index 3d3f970..257cef8 100644
--- a/coders/html.c
+++ b/coders/html.c
@@ -250,8 +250,7 @@
if (status == MagickFalse)
return(status);
(void) CloseBlob(image);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
*url='\0';
if ((LocaleCompare(image_info->magick,"FTP") == 0) ||
(LocaleCompare(image_info->magick,"HTTP") == 0))
diff --git a/coders/icon.c b/coders/icon.c
index c631e27..7ea44af 100644
--- a/coders/icon.c
+++ b/coders/icon.c
@@ -1001,8 +1001,7 @@
/*
Initialize ICON raster file header.
*/
- if (IssRGBCompatibleColorspace(next->colorspace) == MagickFalse)
- (void) TransformImageColorspace(next,sRGBColorspace,exception);
+ (void) TransformImageColorspace(next,sRGBColorspace,exception);
icon_info.file_size=14+12+28;
icon_info.offset_bits=icon_info.file_size;
icon_info.compression=BI_RGB;
diff --git a/coders/ipl.c b/coders/ipl.c
index 96a35a5..58ca555 100644
--- a/coders/ipl.c
+++ b/coders/ipl.c
@@ -577,10 +577,7 @@
ipl_info.time = 1;
ipl_info.width = (unsigned int) image->columns;
ipl_info.height = (unsigned int) image->rows;
-
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
-
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if(IssRGBCompatibleColorspace(image->colorspace) != MagickFalse) { ipl_info.colors = 3; }
else{ ipl_info.colors = 1; }
diff --git a/coders/jbig.c b/coders/jbig.c
index 2b9f484..f2320e8 100644
--- a/coders/jbig.c
+++ b/coders/jbig.c
@@ -450,8 +450,7 @@
/*
Allocate pixel data.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
number_packets=(image->columns+7)/8;
pixel_info=AcquireVirtualMemory(number_packets,image->rows*sizeof(*pixels));
if (pixel_info == (MemoryInfo *) NULL)
diff --git a/coders/jp2.c b/coders/jp2.c
index 2730dfa..4c6737c 100644
--- a/coders/jp2.c
+++ b/coders/jp2.c
@@ -899,8 +899,7 @@
}
else
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (IsGrayColorspace(image->colorspace) != MagickFalse)
{
channels=1;
diff --git a/coders/jpeg.c b/coders/jpeg.c
index 0c85022..7c742de 100644
--- a/coders/jpeg.c
+++ b/coders/jpeg.c
@@ -2162,8 +2162,7 @@
}
default:
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (image_info->type == TrueColorType)
break;
if (IsImageGray(image,exception) != MagickFalse)
diff --git a/coders/map.c b/coders/map.c
index d589cce..a2b7926 100644
--- a/coders/map.c
+++ b/coders/map.c
@@ -375,8 +375,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Allocate colormap.
*/
diff --git a/coders/mat.c b/coders/mat.c
index 321db1a..1503990 100644
--- a/coders/mat.c
+++ b/coders/mat.c
@@ -1230,8 +1230,7 @@
scene=0;
do
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
is_gray = IsImageGray(image,exception);
z = is_gray ? 0 : 3;
diff --git a/coders/mono.c b/coders/mono.c
index 38e1163..9797219 100644
--- a/coders/mono.c
+++ b/coders/mono.c
@@ -314,8 +314,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Convert image to a bi-level image.
*/
diff --git a/coders/mtv.c b/coders/mtv.c
index 136def4..e5a0276 100644
--- a/coders/mtv.c
+++ b/coders/mtv.c
@@ -366,8 +366,7 @@
/*
Allocate memory for pixels.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
pixels=(unsigned char *) AcquireQuantumMemory((size_t) image->columns,
3UL*sizeof(*pixels));
if (pixels == (unsigned char *) NULL)
diff --git a/coders/otb.c b/coders/otb.c
index 777eb99..b195a7b 100644
--- a/coders/otb.c
+++ b/coders/otb.c
@@ -334,8 +334,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Convert image to a bi-level image.
*/
diff --git a/coders/palm.c b/coders/palm.c
index 83abfed..05d691a 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -733,8 +733,7 @@
scene=0;
do
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
count=GetNumberColors(image,NULL,exception);
for (bits_per_pixel=1; (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
if (image_info->depth > 100)
diff --git a/coders/pcd.c b/coders/pcd.c
index a9f1422..0355e98 100644
--- a/coders/pcd.c
+++ b/coders/pcd.c
@@ -1016,8 +1016,7 @@
tile_image=bordered_image;
}
(void) TransformImage(&tile_image,(char *) NULL,tile_geometry,exception);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(tile_image,YCCColorspace,exception);
+ (void) TransformImageColorspace(tile_image,YCCColorspace,exception);
downsample_image=ResizeImage(tile_image,tile_image->columns/2,
tile_image->rows/2,TriangleFilter,exception);
if (downsample_image == (Image *) NULL)
diff --git a/coders/pcl.c b/coders/pcl.c
index ab410b8..6797c3c 100644
--- a/coders/pcl.c
+++ b/coders/pcl.c
@@ -725,11 +725,10 @@
one=1;
do
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Initialize the printer.
*/
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobString(image,"\033E"); /* printer reset */
(void) WriteBlobString(image,"\033*r3F"); /* set presentation mode */
(void) FormatLocaleString(buffer,MaxTextExtent,"\033*r%.20gs%.20gT",
diff --git a/coders/pcx.c b/coders/pcx.c
index 173398f..f688128 100644
--- a/coders/pcx.c
+++ b/coders/pcx.c
@@ -889,8 +889,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
page_table=(MagickOffsetType *) NULL;
if ((LocaleCompare(image_info->magick,"DCX") == 0) ||
((GetNextImageInList(image) != (Image *) NULL) &&
diff --git a/coders/pdb.c b/coders/pdb.c
index 4516cf5..9ac6868 100644
--- a/coders/pdb.c
+++ b/coders/pdb.c
@@ -747,8 +747,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (image -> colors <= 2 || GetImageType( image, exception ) == BilevelType) { /* TS */
bits_per_pixel = 1;
} else if (image -> colors <= 4) {
diff --git a/coders/pdf.c b/coders/pdf.c
index ee6bae8..b7a3b9a 100644
--- a/coders/pdf.c
+++ b/coders/pdf.c
@@ -1221,7 +1221,7 @@
scene=0;
do
{
- compression=UndefinedCompression;
+ compression=image->compression;
if (image_info->compression != UndefinedCompression)
compression=image_info->compression;
switch (compression)
@@ -1280,10 +1280,7 @@
break;
}
if (compression == JPEG2000Compression)
- {
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
- }
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Scale relative to dots-per-inch.
*/
diff --git a/coders/pict.c b/coders/pict.c
index 73f23cb..6fef4a6 100644
--- a/coders/pict.c
+++ b/coders/pict.c
@@ -1402,9 +1402,7 @@
(void) SetImageExtent(image,
MagickMax(image->columns,tile_image->columns),
MagickMax(image->rows,tile_image->rows),exception);
- if (IssRGBCompatibleColorspace(tile_image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,tile_image->colorspace,
- exception);
+ (void) TransformImageColorspace(image,tile_image->colorspace,exception);
(void) CompositeImage(image,tile_image,CopyCompositeOp,MagickTrue,
frame.left,frame.right,exception);
image->compression=tile_image->compression;
@@ -1620,8 +1618,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Initialize image info.
*/
diff --git a/coders/pnm.c b/coders/pnm.c
index d9719af..28aec4d 100644
--- a/coders/pnm.c
+++ b/coders/pnm.c
@@ -1839,8 +1839,7 @@
/*
Convert image to a PNM image.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (image->depth <= 8)
(void) WriteBlobString(image,"255\n");
else
@@ -2060,8 +2059,7 @@
/*
Convert image to a PNM image.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (image->depth > 32)
image->depth=32;
(void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double)
diff --git a/coders/ps.c b/coders/ps.c
index 90c1e0a..d228071 100644
--- a/coders/ps.c
+++ b/coders/ps.c
@@ -1366,6 +1366,9 @@
**labels,
page_geometry[MaxTextExtent];
+ CompressionType
+ compression;
+
const char
**s,
*value;
@@ -1449,6 +1452,9 @@
if (status == MagickFalse)
return(status);
(void) ResetMagickMemory(&bounds,0,sizeof(bounds));
+ compression=image->compression;
+ if (image_info->compression != UndefinedCompression)
+ compression=image_info->compression;
page=1;
scene=0;
do
@@ -1456,8 +1462,7 @@
/*
Scale relative to dots-per-inch.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
delta.x=DefaultResolution;
delta.y=DefaultResolution;
resolution.x=image->resolution.x;
@@ -1901,9 +1906,9 @@
*/
(void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n0\n%d\n",
(double) image->columns,(double) image->rows,
- image_info->compression == RLECompression ? 1 : 0);
+ compression == RLECompression ? 1 : 0);
(void) WriteBlobString(image,buffer);
- switch (image_info->compression)
+ switch (compression)
{
case RLECompression:
{
@@ -2029,7 +2034,7 @@
(void) FormatLocaleString(buffer,MaxTextExtent,
"%.20g %.20g\n%d\n%d\n0\n",(double) image->columns,(double)
image->rows,image->storage_class == PseudoClass ? 1 : 0,
- image_info->compression == RLECompression ? 1 : 0);
+ compression == RLECompression ? 1 : 0);
(void) WriteBlobString(image,buffer);
/*
Dump number of colors and colormap.
@@ -2045,7 +2050,7 @@
ScaleQuantumToChar(ClampToQuantum(image->colormap[i].blue)));
(void) WriteBlobString(image,buffer);
}
- switch (image_info->compression)
+ switch (compression)
{
case RLECompression:
{
diff --git a/coders/ps2.c b/coders/ps2.c
index 814f745..623af8c 100644
--- a/coders/ps2.c
+++ b/coders/ps2.c
@@ -469,7 +469,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- compression=UndefinedCompression;
+ compression=image->compression;
if (image_info->compression != UndefinedCompression)
compression=image_info->compression;
switch (compression)
diff --git a/coders/ps3.c b/coders/ps3.c
index f5222f6..0ed7244 100644
--- a/coders/ps3.c
+++ b/coders/ps3.c
@@ -885,7 +885,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(MagickFalse);
- compression=UndefinedCompression;
+ compression=image->compression;
if (image_info->compression != UndefinedCompression)
compression=image_info->compression;
switch (compression)
diff --git a/coders/psd.c b/coders/psd.c
index 54f1d19..a6e4bfa 100644
--- a/coders/psd.c
+++ b/coders/psd.c
@@ -2471,8 +2471,7 @@
(image->colorspace != CMYKColorspace)) &&
(image_info->colorspace != CMYKColorspace))
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobMSBShort(image,(unsigned short)
(image->storage_class == PseudoClass ? IndexedMode : RGBMode));
}
diff --git a/coders/rgb.c b/coders/rgb.c
index d33092b..0b929ba 100644
--- a/coders/rgb.c
+++ b/coders/rgb.c
@@ -1109,8 +1109,7 @@
/*
Convert MIFF to RGB raster pixels.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if ((LocaleCompare(image_info->magick,"RGBA") == 0) &&
(image->alpha_trait != BlendPixelTrait))
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
diff --git a/coders/rgf.c b/coders/rgf.c
index 5fe0da0..7c21407 100644
--- a/coders/rgf.c
+++ b/coders/rgf.c
@@ -340,18 +340,15 @@
assert(exception->signature == MagickSignature);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
- return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ return(status);
(void) TransformImageColorspace(image,sRGBColorspace,exception);
if((image->columns > 255L) || (image->rows > 255L))
ThrowWriterException(ImageError,"Dimensions must be less than 255x255");
-
/*
Write header (just the image dimensions)
*/
(void) WriteBlobByte(image,image->columns & 0xff);
(void) WriteBlobByte(image,image->rows & 0xff);
-
/*
Convert MIFF to bit pixels.
*/
diff --git a/coders/sgi.c b/coders/sgi.c
index 45e0412..d3c9a42 100644
--- a/coders/sgi.c
+++ b/coders/sgi.c
@@ -927,8 +927,7 @@
/*
Initialize SGI raster file header.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) ResetMagickMemory(&iris_info,0,sizeof(iris_info));
iris_info.magic=0x01DA;
compression=image->compression;
diff --git a/coders/sun.c b/coders/sun.c
index e33e0f3..4cdc1ea 100644
--- a/coders/sun.c
+++ b/coders/sun.c
@@ -762,8 +762,7 @@
/*
Initialize SUN raster file header.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
sun_info.magic=0x59a66a95;
if ((image->columns != (unsigned int) image->columns) ||
(image->rows != (unsigned int) image->rows))
diff --git a/coders/tga.c b/coders/tga.c
index f1576a9..cf45396 100644
--- a/coders/tga.c
+++ b/coders/tga.c
@@ -721,8 +721,7 @@
*/
if ((image->columns > 65535L) || (image->rows > 65535L))
ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
targa_info.id_length=0;
value=GetImageProperty(image,"comment",exception);
if (value != (const char *) NULL)
diff --git a/coders/tiff.c b/coders/tiff.c
index d443b3f..64a6c22 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -2999,8 +2999,7 @@
}
}
}
- if ((photometric == PHOTOMETRIC_RGB) &&
- (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse))
+ if (photometric == PHOTOMETRIC_RGB)
(void) TransformImageColorspace(image,sRGBColorspace,exception);
switch (image->endian)
{
diff --git a/coders/uil.c b/coders/uil.c
index 5d524a3..6811499 100644
--- a/coders/uil.c
+++ b/coders/uil.c
@@ -214,8 +214,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
transparent=MagickFalse;
i=0;
p=(const Quantum *) NULL;
diff --git a/coders/vicar.c b/coders/vicar.c
index b428da6..22f3a6a 100644
--- a/coders/vicar.c
+++ b/coders/vicar.c
@@ -457,8 +457,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Write header.
*/
diff --git a/coders/viff.c b/coders/viff.c
index cd756d2..5095ba2 100644
--- a/coders/viff.c
+++ b/coders/viff.c
@@ -981,8 +981,7 @@
/*
Initialize VIFF image structure.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
DisableMSCWarning(4310)
viff_info.identifier=(char) 0xab;
RestoreMSCWarning
diff --git a/coders/wbmp.c b/coders/wbmp.c
index 2981a13..3e1e572 100644
--- a/coders/wbmp.c
+++ b/coders/wbmp.c
@@ -378,8 +378,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Convert image to a bi-level image.
*/
diff --git a/coders/webp.c b/coders/webp.c
index a159522..f02c133 100644
--- a/coders/webp.c
+++ b/coders/webp.c
@@ -583,8 +583,7 @@
/*
Allocate memory for pixels.
*/
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
pixel_info=AcquireVirtualMemory(image->columns,image->rows*
sizeof(*picture.argb));
if (pixel_info == (MemoryInfo *) NULL)
diff --git a/coders/xbm.c b/coders/xbm.c
index 6283639..9594425 100644
--- a/coders/xbm.c
+++ b/coders/xbm.c
@@ -511,8 +511,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Write X bitmap header.
*/
diff --git a/coders/xpm.c b/coders/xpm.c
index 1a9be12..941b006 100644
--- a/coders/xpm.c
+++ b/coders/xpm.c
@@ -634,8 +634,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
SetGeometry(image,&geometry);
(void) ParseMetaGeometry(PiconGeometry,&geometry.x,&geometry.y,
&geometry.width,&geometry.height);
diff --git a/coders/xwd.c b/coders/xwd.c
index d1b3c22..01c950d 100644
--- a/coders/xwd.c
+++ b/coders/xwd.c
@@ -647,8 +647,7 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Initialize XWD file header.
*/