From: cristy Date: Wed, 11 Jan 2012 13:03:13 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6408 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8d636784204aa4d970c212b156bffc387836b93;p=imagemagick --- diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 5b69b4e74..66bd66487 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -525,13 +525,13 @@ void Magick::Image::border( const Geometry &geometry_ ) void Magick::Image::channel ( const ChannelType channel_ ) { modifyImage(); - ChannelType channel_mask = SetPixelChannelMask( image(), channel_ ); ExceptionInfo exceptionInfo; GetExceptionInfo( &exceptionInfo ); - SeparateImage ( image(), &exceptionInfo ); + MagickCore::Image* newImage = + SeparateImage( image(), channel_, &exceptionInfo); + replaceImage( newImage ); throwException( exceptionInfo ); (void) DestroyExceptionInfo( &exceptionInfo ); - (void) SetPixelChannelMapMask( image(), channel_mask ); } // Set or obtain modulus channel depth diff --git a/MagickCore/ImageMagick.h b/MagickCore/ImageMagick.h index 2579ab7b8..622329c38 100644 --- a/MagickCore/ImageMagick.h +++ b/MagickCore/ImageMagick.h @@ -1,5 +1,5 @@ /* - Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization + Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available. You may not use this file except in compliance with the License. diff --git a/MagickCore/api.h b/MagickCore/api.h index ca55f0d0d..0caf8e204 100644 --- a/MagickCore/api.h +++ b/MagickCore/api.h @@ -1,5 +1,5 @@ /* - Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization + Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available. You may not use this file except in compliance with the License. diff --git a/MagickCore/composite.c b/MagickCore/composite.c index ea9a82dd0..1e80992df 100644 --- a/MagickCore/composite.c +++ b/MagickCore/composite.c @@ -1259,6 +1259,7 @@ MagickExport MagickBooleanType CompositeImage(Image *image, continue; switch (compose) { + case AlphaCompositeOp: case ChangeMaskCompositeOp: case CopyAlphaCompositeOp: case DstAtopCompositeOp: @@ -1422,7 +1423,8 @@ MagickExport MagickBooleanType CompositeImage(Image *image, composite_traits=GetPixelChannelMapTraits(composite_image,channel); if (traits == UndefinedPixelTrait) continue; - if ((compose != IntensityCompositeOp) && + if ((compose != AlphaCompositeOp) && + (compose != IntensityCompositeOp) && (composite_traits == UndefinedPixelTrait)) continue; /* @@ -1446,6 +1448,11 @@ MagickExport MagickBooleanType CompositeImage(Image *image, */ switch (compose) { + case AlphaCompositeOp: + { + pixel=Sa; + break; + } case AtopCompositeOp: case CopyBlackCompositeOp: case CopyBlueCompositeOp: diff --git a/MagickCore/composite.h b/MagickCore/composite.h index c8f69bc9c..b0b88ca4e 100644 --- a/MagickCore/composite.h +++ b/MagickCore/composite.h @@ -24,6 +24,7 @@ extern "C" { typedef enum { + AlphaCompositeOp, AtopCompositeOp, BlendCompositeOp, BlurCompositeOp, diff --git a/MagickCore/distort.c b/MagickCore/distort.c index 099475ed3..e02d4a6d8 100644 --- a/MagickCore/distort.c +++ b/MagickCore/distort.c @@ -1519,9 +1519,6 @@ MagickExport Image *DistortResizeImage(const Image *image, } else { - ChannelType - channel_mask; - Image *resize_alpha; @@ -1532,9 +1529,7 @@ MagickExport Image *DistortResizeImage(const Image *image, distort alpha channel separately */ - channel_mask=SetPixelChannelMask(tmp_image,AlphaChannel); - (void) SeparateImage(tmp_image,exception); - SetPixelChannelMapMask(tmp_image,channel_mask); + (void) SetImageAlphaChannel(tmp_image,ExtractAlphaChannel,exception); (void) SetImageAlphaChannel(tmp_image,OpaqueAlphaChannel,exception); resize_alpha=DistortImage(tmp_image,AffineDistortion,12,distort_args, MagickTrue,exception), diff --git a/MagickCore/image.c b/MagickCore/image.c index 3caccbd52..a79f843ed 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -2204,22 +2204,30 @@ MagickExport MagickBooleanType ResetImagePage(Image *image,const char *page) % % The format of the SeparateImage method is: % -% MagickBooleanType SeparateImage(Image *image,ExceptionInfo *exception) +% Image *SeparateImage(const Image *image,const ChannelType channel, +% ExceptionInfo *exception) % % A description of each parameter follows: % % o image: the image. % +% o channel: the image channel. +% % o exception: return any errors or warnings in this structure. % */ -MagickExport MagickBooleanType SeparateImage(Image *image, - ExceptionInfo *exception) +MagickExport Image *SeparateImage(const Image *image, + const ChannelType channel_type,ExceptionInfo *exception) { +#define GetChannelBit(mask,bit) (((size_t) (mask) >> (size_t) (bit)) & 0x01) #define SeparateImageTag "Separate/Image" CacheView - *image_view; + *image_view, + *separate_view; + + Image + *separate_image; MagickBooleanType status; @@ -2230,23 +2238,40 @@ MagickExport MagickBooleanType SeparateImage(Image *image, ssize_t y; + /* + Initialize spread image attributes. + */ assert(image != (Image *) NULL); assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse) - return(MagickFalse); + assert(exception != (ExceptionInfo *) NULL); + assert(exception->signature == MagickSignature); + separate_image=CloneImage(image,image->columns,image->rows,MagickTrue, + exception); + if (separate_image == (Image *) NULL) + return((Image *) NULL); + if (SetImageStorageClass(separate_image,DirectClass,exception) == MagickFalse) + { + separate_image=DestroyImage(separate_image); + return((Image *) NULL); + } + separate_image->colorspace=GRAYColorspace; /* - Separate image channels. + Separate image. */ status=MagickTrue; progress=0; image_view=AcquireCacheView(image); + separate_view=AcquireCacheView(separate_image); #if defined(MAGICKCORE_OPENMP_SUPPORT) - #pragma omp parallel for schedule(static,4) shared(progress,status) + #pragma omp parallel for schedule(static,4) shared(progress,status) omp_throttle(1) #endif for (y=0; y < (ssize_t) image->rows; y++) { + register const Quantum + *restrict p; + register Quantum *restrict q; @@ -2255,8 +2280,10 @@ MagickExport MagickBooleanType SeparateImage(Image *image, if (status == MagickFalse) continue; - q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception); - if (q == (Quantum *) NULL) + p=GetCacheViewVirtualPixels(image_view,0,y,image->columns,1,exception); + q=QueueCacheViewAuthenticPixels(separate_view,0,y,separate_image->columns,1, + exception); + if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL)) { status=MagickFalse; continue; @@ -2266,6 +2293,7 @@ MagickExport MagickBooleanType SeparateImage(Image *image, register ssize_t i; + SetPixelChannel(separate_image,GrayPixelChannel,0,q); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { PixelChannel @@ -2273,21 +2301,18 @@ MagickExport MagickBooleanType SeparateImage(Image *image, PixelTrait traits; - - register ssize_t - j; - + channel=GetPixelChannelMapChannel(image,i); traits=GetPixelChannelMapTraits(image,channel); - if (traits == UndefinedPixelTrait) + if ((traits == UndefinedPixelTrait) || + (GetChannelBit(channel_type,channel) == 0)) continue; - if ((traits & UpdatePixelTrait) != 0) - for (j=0; j < (ssize_t) GetPixelChannels(image); j++) - q[j]=q[i]; + SetPixelChannel(separate_image,GrayPixelChannel,p[i],q); } - q+=GetPixelChannels(image); + p+=GetPixelChannels(image); + q+=GetPixelChannels(separate_image); } - if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse) + if (SyncCacheViewAuthenticPixels(separate_view,exception) == MagickFalse) status=MagickFalse; if (image->progress_monitor != (MagickProgressMonitor) NULL) { @@ -2295,16 +2320,16 @@ MagickExport MagickBooleanType SeparateImage(Image *image, proceed; #if defined(MAGICKCORE_OPENMP_SUPPORT) - #pragma omp critical (MagickCore_SeparateImage) + #pragma omp critical (MagickCore_SeparateImage) #endif proceed=SetImageProgress(image,SeparateImageTag,progress++,image->rows); if (proceed == MagickFalse) status=MagickFalse; } } + separate_view=DestroyCacheView(separate_view); image_view=DestroyCacheView(image_view); - (void) SetImageColorspace(image,RGBColorspace,exception); - return(status); + return(separate_image); } /* @@ -2335,9 +2360,6 @@ MagickExport MagickBooleanType SeparateImage(Image *image, */ MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception) { - ChannelType - channel_mask; - Image *images, *separate_image; @@ -2360,20 +2382,12 @@ MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception) channel=GetPixelChannelMapChannel(image,i); traits=GetPixelChannelMapTraits(image,channel); - if (traits == UndefinedPixelTrait) + if ((traits == UndefinedPixelTrait) || + ((traits & UpdatePixelTrait) == 0)) continue; - if ((traits & UpdatePixelTrait) != 0) - { - separate_image=CloneImage(image,0,0,MagickTrue,exception); - if (separate_image != (Image *) NULL) - { - channel_mask=SetPixelChannelMask(separate_image, - (ChannelType) (1 << i)); - (void) SeparateImage(separate_image,exception); - (void) SetPixelChannelMapMask(separate_image,channel_mask); - AppendImageToList(&images,separate_image); - } - } + separate_image=SeparateImage(image,(ChannelType) (1 << channel),exception); + if (separate_image != (Image *) NULL) + AppendImageToList(&images,separate_image); } return(images); } @@ -2412,9 +2426,6 @@ MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception) MagickExport MagickBooleanType SetImageAlphaChannel(Image *image, const AlphaChannelType alpha_type,ExceptionInfo *exception) { - ChannelType - channel_mask; - MagickBooleanType status; @@ -2490,32 +2501,17 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image, case CopyAlphaChannel: { /* - Special usage case for SeparateImage(): copy grayscale color to - the alpha channel. + Copy pixel intensity to the alpha channel. */ - channel_mask=SetPixelChannelMask(image,GrayChannel); - status=SeparateImage(image,exception); - (void) SetPixelChannelMask(image,channel_mask); - image->matte=MagickTrue; /* make sure transparency is now on! */ + status=CompositeImage(image,IntensityCompositeOp,image,0,0,exception); if (alpha_type == ShapeAlphaChannel) - { - PixelInfo - background; - - /* - Reset all color channels to background color. - */ - background=image->background_color; - (void) LevelImageColors(image,&background,&background,MagickTrue, - exception); - } + (void) LevelImageColors(image,&image->background_color, + &image->background_color,MagickTrue,exception); break; } case ExtractAlphaChannel: { - channel_mask=SetPixelChannelMask(image,AlphaChannel); - status=SeparateImage(image,exception); - (void) SetPixelChannelMask(image,channel_mask); + status=CompositeImage(image,AlphaCompositeOp,image,0,0,exception); image->matte=MagickFalse; break; } @@ -3967,7 +3963,7 @@ MagickExport MagickBooleanType StripImage(Image *image,ExceptionInfo *exception) static inline Quantum PushColormapIndex(Image *image,const Quantum index, MagickBooleanType *range_exception) { - if (index < image->colors) + if ((size_t) index < image->colors) return(index); *range_exception=MagickTrue; return(0); @@ -4257,11 +4253,10 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, image->type=(ImageType) ParseCommandOption(MagickTypeOptions,MagickFalse, option); option=GetImageOption(image_info,"units"); + units=image_info->units; if (option != (const char *) NULL) units=(ResolutionType) ParseCommandOption(MagickResolutionOptions, MagickFalse,option); - else - units = image_info->units; if (units != UndefinedResolution) { if (image->units != units) diff --git a/MagickCore/image.h b/MagickCore/image.h index 2c039b133..2326778eb 100644 --- a/MagickCore/image.h +++ b/MagickCore/image.h @@ -499,6 +499,7 @@ extern MagickExport Image *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *, ExceptionInfo *), *ReferenceImage(Image *), + *SeparateImage(const Image *,const ChannelType,ExceptionInfo *), *SeparateImages(const Image *,ExceptionInfo *), *SmushImages(const Image *,const MagickBooleanType,const ssize_t, ExceptionInfo *); @@ -518,7 +519,6 @@ extern MagickExport MagickBooleanType ListMagickInfo(FILE *,ExceptionInfo *), ModifyImage(Image **,ExceptionInfo *), ResetImagePage(Image *,const char *), - SeparateImage(Image *,ExceptionInfo *), SetImageAlpha(Image *,const Quantum,ExceptionInfo *), SetImageAlphaChannel(Image *,const AlphaChannelType,ExceptionInfo *), SetImageBackgroundColor(Image *,ExceptionInfo *), diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index 3db76f669..d618a68e8 100644 --- a/MagickCore/magick-config.h +++ b/MagickCore/magick-config.h @@ -12,7 +12,9 @@ /* #undef AUTOTRACE_DELEGATE */ /* Define if coders and filters are to be built as modules. */ -/* #undef BUILD_MODULES */ +#ifndef MAGICKCORE_BUILD_MODULES +#define MAGICKCORE_BUILD_MODULES 1 +#endif /* Define if you have the bzip2 library */ #ifndef MAGICKCORE_BZLIB_DELEGATE @@ -219,7 +221,9 @@ #endif /* Define to 1 if you have the header file. */ -/* #undef HAVE_CL_CL_H */ +#ifndef MAGICKCORE_HAVE_CL_CL_H +#define MAGICKCORE_HAVE_CL_CL_H 1 +#endif /* Define to 1 if you have the header file. */ #ifndef MAGICKCORE_HAVE_COMPLEX_H @@ -1188,7 +1192,9 @@ #endif /* Define if you have JBIG library */ -/* #undef JBIG_DELEGATE */ +#ifndef MAGICKCORE_JBIG_DELEGATE +#define MAGICKCORE_JBIG_DELEGATE 1 +#endif /* Define if you have JPEG version 2 "Jasper" library */ #ifndef MAGICKCORE_JP2_DELEGATE @@ -1229,7 +1235,7 @@ /* 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/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib64/tracker-0.12:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2" +#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/alliance/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/lib64/kicad:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mpich2/lib/:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/openmotif:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tracker-0.12:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2" #endif /* The archive extension */ @@ -1283,7 +1289,9 @@ /* #undef NO_MINUS_C_MINUS_O */ /* Define if you have OPENEXR library */ -/* #undef OPENEXR_DELEGATE */ +#ifndef MAGICKCORE_OPENEXR_DELEGATE +#define MAGICKCORE_OPENEXR_DELEGATE 1 +#endif /* Name of package */ #ifndef MAGICKCORE_PACKAGE @@ -1353,7 +1361,9 @@ #endif /* Define if you have RSVG library */ -/* #undef RSVG_DELEGATE */ +#ifndef MAGICKCORE_RSVG_DELEGATE +#define MAGICKCORE_RSVG_DELEGATE 1 +#endif /* Define to the type of arg 1 for `select'. */ #ifndef MAGICKCORE_SELECT_TYPE_ARG1 @@ -1581,7 +1591,9 @@ /* #undef _MINIX */ /* Define this for the OpenCL Accelerator */ -/* #undef _OPENCL */ +#ifndef MAGICKCORE__OPENCL +#define MAGICKCORE__OPENCL 1 +#endif /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ diff --git a/MagickCore/magick-type.h b/MagickCore/magick-type.h index 5a81890f9..2b18b5e67 100644 --- a/MagickCore/magick-type.h +++ b/MagickCore/magick-type.h @@ -140,34 +140,6 @@ typedef MagickSizeType QuantumAny; #define ExceptionInfo MagickExceptionInfo #endif -typedef enum -{ - UndefinedChannel = 0x0000, - RedChannel = 0x0001, - GrayChannel = 0x0001, - CyanChannel = 0x0001, - GreenChannel = 0x0002, - MagentaChannel = 0x0002, - BlueChannel = 0x0004, - YellowChannel = 0x0004, - BlackChannel = 0x0008, - AlphaChannel = 0x0010, - OpacityChannel = 0x0010, - IndexChannel = 0x0020, - MaskChannel = 0x0040, - MetaChannel = 0x0080, - CompositeChannels = 0x002F, - AllChannels = 0x7ffffff, - /* - Special purpose channel types. - */ - TrueAlphaChannel = 0x0100, /* extract actual alpha channel from opacity */ - RGBChannels = 0x0200, /* set alpha from grayscale mask in RGB */ - GrayChannels = 0x0400, - SyncChannels = 0x1000, /* channels should be modified equally */ - DefaultChannels = ((AllChannels | SyncChannels) &~ AlphaChannel) -} ChannelType; - typedef enum { UndefinedClass, diff --git a/MagickCore/pixel.h b/MagickCore/pixel.h index 3bf7a9c68..e7a6f7134 100644 --- a/MagickCore/pixel.h +++ b/MagickCore/pixel.h @@ -27,6 +27,34 @@ extern "C" { #define MaxPixelChannels 32 #undef index +typedef enum +{ + UndefinedChannel = 0x0000, + RedChannel = 0x0001, + GrayChannel = 0x0001, + CyanChannel = 0x0001, + GreenChannel = 0x0002, + MagentaChannel = 0x0002, + BlueChannel = 0x0004, + YellowChannel = 0x0004, + BlackChannel = 0x0008, + AlphaChannel = 0x0010, + OpacityChannel = 0x0010, + IndexChannel = 0x0020, + MaskChannel = 0x0040, + MetaChannel = 0x0080, + CompositeChannels = 0x002F, + AllChannels = 0x7ffffff, + /* + Special purpose channel types. + */ + TrueAlphaChannel = 0x0100, /* extract actual alpha channel from opacity */ + RGBChannels = 0x0200, /* set alpha from grayscale mask in RGB */ + GrayChannels = 0x0400, + SyncChannels = 0x1000, /* channels should be modified equally */ + DefaultChannels = ((AllChannels | SyncChannels) &~ AlphaChannel) +} ChannelType; /* must correspond to PixelChannel */ + typedef enum { UndefinedInterpolatePixel, @@ -61,7 +89,7 @@ typedef enum IntensityPixelChannel = MaxPixelChannels, CompositePixelChannel = MaxPixelChannels, SyncPixelChannel = MaxPixelChannels+1 -} PixelChannel; +} PixelChannel; /* must correspond to ChannelType */ typedef enum { diff --git a/MagickCore/version.h b/MagickCore/version.h index b0f1cd235..785ef90de 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,14 +27,14 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2012 ImageMagick Studio LLC" -#define MagickSVNRevision "6328" +#define MagickSVNRevision "exported" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 #define MagickLibAddendum "-0" #define MagickLibInterface 7 #define MagickLibMinInterface 7 -#define MagickReleaseDate "2012-01-06" +#define MagickReleaseDate "2012-01-11" #define MagickChangeDate "20110801" #define MagickAuthoritativeURL "http://www.imagemagick.org" #if defined(MAGICKCORE_OPENMP_SUPPORT) diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index 4cd47b5dd..608aba801 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -8408,22 +8408,33 @@ WandExport MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand, % % The format of the MagickSeparateImage method is: % -% MagickBooleanType MagickSeparateImage(MagickWand *wand) +% MagickBooleanType MagickSeparateImage(MagickWand *wand, +% const ChannelType channel) % % A description of each parameter follows: % % o wand: the magick wand. % +% o channel: the channel. +% */ -WandExport MagickBooleanType MagickSeparateImage(MagickWand *wand) +WandExport MagickBooleanType MagickSeparateImage(MagickWand *wand, + const ChannelType channel) { + Image + *separate_image; + assert(wand != (MagickWand *) NULL); assert(wand->signature == WandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if (wand->images == (Image *) NULL) ThrowWandException(WandError,"ContainsNoImages",wand->name); - return(SeparateImage(wand->images,wand->exception)); + separate_image=SeparateImage(wand->images,channel,wand->exception); + if (separate_image == (Image *) NULL) + return(MagickFalse); + ReplaceImageInList(&wand->images,separate_image); + return(MagickTrue); } /* diff --git a/MagickWand/magick-image.h b/MagickWand/magick-image.h index d86c9dced..8a1272859 100644 --- a/MagickWand/magick-image.h +++ b/MagickWand/magick-image.h @@ -229,7 +229,7 @@ extern WandExport MagickBooleanType const double,const double), MagickSelectiveBlurImage(MagickWand *,const double,const double,const double, const double), - MagickSeparateImage(MagickWand *), + MagickSeparateImage(MagickWand *,const ChannelType), MagickSepiaToneImage(MagickWand *,const double), MagickSetImage(MagickWand *,const MagickWand *), MagickSetImageAlphaChannel(MagickWand *,const AlphaChannelType), diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index e73ce104e..4dcffd095 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -9152,9 +9152,7 @@ Mogrify(ref,...) { if (attribute_flag[0] != 0) channel=(ChannelType) argument_list[0].integer_reference; - channel_mask=SetPixelChannelMask(image,channel); - (void) SeparateImage(image,exception); - (void) SetPixelChannelMask(image,channel_mask); + image=SeparateImage(image,channel,exception); break; } case 63: /* Stereo */ @@ -9763,9 +9761,7 @@ Mogrify(ref,...) { if (attribute_flag[0] != 0) channel=(ChannelType) argument_list[0].integer_reference; - channel_mask=SetPixelChannelMask(image,channel); - (void) SeparateImage(image,exception); - (void) SetPixelChannelMask(image,channel_mask); + image=SeparateImage(image,channel,exception); break; } case 87: /* Splice */ diff --git a/PerlMagick/t/read.t b/PerlMagick/t/read.t index c5df066b0..f0123dacb 100644 --- a/PerlMagick/t/read.t +++ b/PerlMagick/t/read.t @@ -126,7 +126,7 @@ testReadCompare('input_p5.pgm', 'reference/read/input_pgm_p5.miff', q//, 0.0, 0. print("Apple Macintosh QuickDraw/PICT file ...\n"); ++$test; -testReadCompare('input.pict', 'reference/read/input_pict.miff', q//, 0.0, 0.0); +testReadCompare('input.pict', 'reference/read/input_pict.miff', q//, 0.06, 1.06); print("Alias/Wavefront RLE image format ...\n"); ++$test; diff --git a/PerlMagick/t/write.t b/PerlMagick/t/write.t index d672e7c9f..0766be0fe 100644 --- a/PerlMagick/t/write.t +++ b/PerlMagick/t/write.t @@ -127,7 +127,7 @@ print("Apple Macintosh QuickDraw/PICT file ...\n"); testReadWrite( 'PICT:input.pict', 'PICT:output.pict', q//, - '6a4a257921582768b774aeeac549b7c0c0b51f665395eddf921cce53a0ad2a33'); + '9cadd5855f595a7440821a01e77609f2adde95a228b13fdc906d16069e4daaaa'); print("Portable pixmap format (color), ASCII format ...\n"); ++$test;