From: cristy Date: Wed, 29 Aug 2012 00:45:37 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5042 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0a657e13c4aefba39c51292005427b47277869d;p=imagemagick --- diff --git a/MagickCore/color.c b/MagickCore/color.c index e40626442..1e89d095a 100644 --- a/MagickCore/color.c +++ b/MagickCore/color.c @@ -2434,7 +2434,8 @@ MagickExport MagickBooleanType QueryColorCompliance(const char *name, if (p == (const ColorInfo *) NULL) return(MagickFalse); color->colorspace=sRGBColorspace; - color->alpha_trait=p->color.alpha != OpaqueAlpha ? MagickTrue : MagickFalse; + color->alpha_trait=p->color.alpha != OpaqueAlpha ? BlendPixelTrait : + UndefinedPixelTrait; color->red=(double) p->color.red; color->green=(double) p->color.green; color->blue=(double) p->color.blue; diff --git a/MagickCore/image.c b/MagickCore/image.c index ec4388ede..28fabc725 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -1665,9 +1665,6 @@ MagickExport MagickBooleanType IsHighDynamicRangeImage(const Image *image, } for (x=0; x < (ssize_t) image->columns; x++) { - PixelTrait - traits; - register ssize_t i; @@ -1681,7 +1678,10 @@ MagickExport MagickBooleanType IsHighDynamicRangeImage(const Image *image, double pixel; - traits=GetPixelChannelTraits(image,i); + PixelTrait + traits; + + traits=GetPixelChannelTraits(image,(PixelChannel) i); if (traits == UndefinedPixelTrait) continue; pixel=(double) p[i]; diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index 31a76aa21..6bde21aa0 100644 --- a/MagickCore/magick-config.h +++ b/MagickCore/magick-config.h @@ -12,9 +12,7 @@ /* #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 @@ -1191,9 +1189,7 @@ #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 @@ -1222,9 +1218,7 @@ #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 @@ -1236,7 +1230,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/lib64/freetype-freeworld:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/tracker-0.14:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2" +#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib64/freetype-freeworld:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib64/tracker-0.14:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2" #endif /* The archive extension */ @@ -1535,9 +1529,7 @@ #endif /* 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 */ @@ -1546,9 +1538,7 @@ /* #undef WITH_DMALLOC */ /* Define if you have wmflite library */ -#ifndef MAGICKCORE_WMFLITE_DELEGATE -#define MAGICKCORE_WMFLITE_DELEGATE 1 -#endif +/* #undef WMFLITE_DELEGATE */ /* Define if you have wmf library */ /* #undef WMF_DELEGATE */ diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c index 1d88162dd..4bf130a48 100644 --- a/MagickCore/pixel.c +++ b/MagickCore/pixel.c @@ -3992,7 +3992,7 @@ static inline double MagickMax(const double x,const double y) return(y); } -static inline void CatromWeights(const double x,double **weights) +static inline void CatromWeights(const double x,double (*weights)[4]) { double alpha, @@ -4019,7 +4019,7 @@ static inline void CatromWeights(const double x,double **weights) (*weights)[2]=x-(*weights)[3]-gamma; } -static inline void SplineWeights(const double x,double **weights) +static inline void SplineWeights(const double x,double (*weights)[4]) { double alpha, diff --git a/MagickCore/quantize.c b/MagickCore/quantize.c index b8e259777..fe2e30d6c 100644 --- a/MagickCore/quantize.c +++ b/MagickCore/quantize.c @@ -751,7 +751,8 @@ static inline void SetAssociatedAlpha(const Image *image,CubeInfo *cube_info) MagickBooleanType associate_alpha; - associate_alpha=image->alpha_trait; + associate_alpha=image->alpha_trait == BlendPixelTrait ? MagickTrue : + MagickFalse; if (cube_info->quantize_info->colorspace == TransparentColorspace) associate_alpha=MagickFalse; if ((cube_info->quantize_info->number_colors == 2) && diff --git a/MagickCore/version.h b/MagickCore/version.h index 1d09dc478..b75c549e7 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,7 +27,7 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2012 ImageMagick Studio LLC" -#define MagickSVNRevision "Unversioned" +#define MagickSVNRevision "9117:9136M" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c index a9c203b8c..4b518b321 100644 --- a/MagickCore/xwindow.c +++ b/MagickCore/xwindow.c @@ -479,8 +479,8 @@ MagickPrivate MagickBooleanType XAnnotateImage(Display *display, x, y; - MagickBooleanType - matte; + PixelTrait + alpha_trait; Pixmap annotate_pixmap; @@ -695,11 +695,11 @@ MagickPrivate MagickBooleanType XAnnotateImage(Display *display, Composite text onto the image. */ (void) XParseGeometry(annotate_info->geometry,&x,&y,&width,&height); - matte=image->alpha_trait; + alpha_trait=image->alpha_trait; (void) CompositeImage(image,annotate_image, - annotate_image->alpha_trait == BlendPixelTrait ? OverCompositeOp : CopyCompositeOp, - MagickTrue,(ssize_t) x,(ssize_t) y,exception); - image->alpha_trait=matte; + annotate_image->alpha_trait == BlendPixelTrait ? OverCompositeOp : + CopyCompositeOp,MagickTrue,(ssize_t) x,(ssize_t) y,exception); + image->alpha_trait=alpha_trait; annotate_image=DestroyImage(annotate_image); return(MagickTrue); } @@ -2318,8 +2318,8 @@ MagickPrivate MagickBooleanType XDrawImage(Display *display, x, y; - MagickBooleanType - matte; + PixelTrait + alpha_trait; Pixmap draw_pixmap; @@ -2639,10 +2639,10 @@ MagickPrivate MagickBooleanType XDrawImage(Display *display, (ssize_t) x,(ssize_t) y,exception); else { - matte=image->alpha_trait; + alpha_trait=image->alpha_trait; (void) CompositeImage(image,draw_image,OverCompositeOp,MagickTrue, (ssize_t) x,(ssize_t) y,exception); - image->alpha_trait=matte; + image->alpha_trait=alpha_trait; } draw_image=DestroyImage(draw_image); return(MagickTrue); diff --git a/MagickWand/drawing-wand.c b/MagickWand/drawing-wand.c index ce07484ff..e1e284085 100644 --- a/MagickWand/drawing-wand.c +++ b/MagickWand/drawing-wand.c @@ -401,7 +401,8 @@ static void MvgAppendColor(DrawingWand *wand,const PixelInfo *packet) GetPixelInfo(wand->image,&pixel); pixel.colorspace=sRGBColorspace; - pixel.alpha_trait=packet->alpha != OpaqueAlpha ? MagickTrue : MagickFalse; + pixel.alpha_trait=packet->alpha != OpaqueAlpha ? BlendPixelTrait : + UndefinedPixelTrait; pixel.red=(double) packet->red; pixel.green=(double) packet->green; pixel.blue=(double) packet->blue; @@ -2465,7 +2466,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand) { if (CurrentContext->fill.alpha != OpaqueAlpha) pixel.alpha_trait=CurrentContext->fill.alpha != OpaqueAlpha ? - MagickTrue : MagickFalse; + BlendPixelTrait : UndefinedPixelTrait; pixel=CurrentContext->fill; GetColorTuple(&pixel,MagickTrue,value); (void) SetXMLTreeContent(child,value); @@ -2531,7 +2532,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand) { if (CurrentContext->stroke.alpha != OpaqueAlpha) pixel.alpha_trait=CurrentContext->stroke.alpha != OpaqueAlpha ? - MagickTrue : MagickFalse; + BlendPixelTrait : UndefinedPixelTrait; pixel=CurrentContext->stroke; GetColorTuple(&pixel,MagickTrue,value); (void) SetXMLTreeContent(child,value); @@ -2624,7 +2625,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand) { if (CurrentContext->undercolor.alpha != OpaqueAlpha) pixel.alpha_trait=CurrentContext->undercolor.alpha != OpaqueAlpha ? - MagickTrue : MagickFalse; + BlendPixelTrait : UndefinedPixelTrait; pixel=CurrentContext->undercolor; GetColorTuple(&pixel,MagickTrue,value); (void) SetXMLTreeContent(child,value); diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index 53ec38801..6f644a7ea 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -10013,12 +10013,12 @@ WandExport MagickBooleanType MagickSetImageMatte(MagickWand *wand, assert(wand->signature == WandSignature); if( IfMagickTrue(wand->debug) ) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - if (wand->images == (Image *) NULL) ThrowWandException(WandError,"ContainsNoImages",wand->name); - if( IfMagickFalse(wand->images->alpha_trait) && IsMagickTrue(matte)) + if ((wand->images->alpha_trait != BlendPixelTrait) && IsMagickTrue(matte)) (void) SetImageAlpha(wand->images,OpaqueAlpha,wand->exception); - wand->images->alpha_trait=matte; + wand->images->alpha_trait=matte != MagickFalse ? BlendPixelTrait : + UndefinedPixelTrait; return(MagickTrue); } diff --git a/MagickWand/pixel-wand.c b/MagickWand/pixel-wand.c index 1556390b2..f41c39f62 100644 --- a/MagickWand/pixel-wand.c +++ b/MagickWand/pixel-wand.c @@ -2150,8 +2150,8 @@ WandExport void PixelSetQuantumPixel(const Image *image,const Quantum *pixel, wand->pixel.blue=(double) GetPixelBlue(image,pixel); wand->pixel.black=(double) GetPixelBlack(image,pixel); wand->pixel.alpha=(double) GetPixelAlpha(image,pixel); - wand->pixel.alpha_trait=GetPixelAlpha(image,pixel) != OpaqueAlpha ? MagickTrue : - MagickFalse; + wand->pixel.alpha_trait=GetPixelAlpha(image,pixel) != OpaqueAlpha ? + BlendPixelTrait : UndefinedPixelTrait; } /* diff --git a/coders/bmp.c b/coders/bmp.c index a99115bd0..6b31d6073 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -841,7 +841,8 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) image->rows=(size_t) MagickAbsoluteValue(bmp_info.height); image->depth=bmp_info.bits_per_pixel <= 8 ? bmp_info.bits_per_pixel : 8; if ((bmp_info.bits_per_pixel == 16) || (bmp_info.bits_per_pixel == 32)) - image->alpha_trait=bmp_info.alpha_mask != 0 ? MagickTrue : MagickFalse; + image->alpha_trait=bmp_info.alpha_mask != 0 ? BlendPixelTrait : + UndefinedPixelTrait; if ((bmp_info.number_colors != 0) || (bmp_info.bits_per_pixel < 16)) { size_t diff --git a/coders/dds.c b/coders/dds.c index 503924577..e37794f2e 100644 --- a/coders/dds.c +++ b/coders/dds.c @@ -241,9 +241,8 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) MagickBooleanType status, cubemap = MagickFalse, - volume = MagickFalse, - matte; - + volume = MagickFalse; + CompressionType compression; @@ -253,6 +252,9 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) DDSDecoder *decoder; + PixelTrait + alpha_trait; + size_t n, num_images; @@ -297,12 +299,12 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) compression = NoCompression; if (dds_info.pixelformat.flags & DDPF_ALPHAPIXELS) { - matte = MagickTrue; + alpha_trait = BlendPixelTrait; decoder = ReadUncompressedRGBA; } else { - matte = MagickTrue; + alpha_trait = UndefinedPixelTrait; decoder = ReadUncompressedRGB; } } @@ -312,7 +314,7 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) { case FOURCC_DXT1: { - matte = MagickFalse; + alpha_trait = UndefinedPixelTrait; compression = DXT1Compression; decoder = ReadDXT1; break; @@ -320,7 +322,7 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) case FOURCC_DXT3: { - matte = MagickTrue; + alpha_trait = BlendPixelTrait; compression = DXT3Compression; decoder = ReadDXT3; break; @@ -328,7 +330,7 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) case FOURCC_DXT5: { - matte = MagickTrue; + alpha_trait = BlendPixelTrait; compression = DXT5Compression; decoder = ReadDXT5; break; @@ -379,7 +381,7 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) image=SyncNextImageInList(image); } - image->alpha_trait = matte; + image->alpha_trait=alpha_trait; image->compression = compression; image->columns = dds_info.width; image->rows = dds_info.height; diff --git a/coders/dib.c b/coders/dib.c index 0872aaed6..31fa29029 100644 --- a/coders/dib.c +++ b/coders/dib.c @@ -535,7 +535,8 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception) dib_info.green_mask=ReadBlobLSBLong(image); dib_info.blue_mask=ReadBlobLSBLong(image); } - image->alpha_trait=dib_info.bits_per_pixel == 32 ? MagickTrue : MagickFalse; + image->alpha_trait=dib_info.bits_per_pixel == 32 ? BlendPixelTrait : + UndefinedPixelTrait; image->columns=(size_t) MagickAbsoluteValue(dib_info.width); image->rows=(size_t) MagickAbsoluteValue(dib_info.height); image->depth=8; diff --git a/coders/djvu.c b/coders/djvu.c index 5074b0d12..00a43c8c4 100644 --- a/coders/djvu.c +++ b/coders/djvu.c @@ -662,7 +662,7 @@ static Image *ReadOneDJVUImage(LoadContext* lc,const int pagenum, /* fixme: MAGICKCORE_QUANTUM_DEPTH ?*/ image->depth = 8UL; /* i only support that? */ - image->alpha_trait = MagickTrue; + image->alpha_trait = BlendPixelTrait; /* is this useful? */ } #if DEBUG diff --git a/coders/gif.c b/coders/gif.c index 0ba987fe8..74bb837fa 100644 --- a/coders/gif.c +++ b/coders/gif.c @@ -1253,7 +1253,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) image->ticks_per_second=100; image->dispose=(DisposeType) dispose; image->iterations=iterations; - image->alpha_trait=opacity >= 0 ? MagickTrue : MagickFalse; + image->alpha_trait=opacity >= 0 ? BlendPixelTrait : UndefinedPixelTrait; delay=0; dispose=0; iterations=1; diff --git a/coders/jp2.c b/coders/jp2.c index d9c3008e2..e70d69143 100644 --- a/coders/jp2.c +++ b/coders/jp2.c @@ -536,7 +536,8 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception) /* Convert JPEG 2000 pixels. */ - image->alpha_trait=number_components > 3 ? MagickTrue : MagickFalse; + image->alpha_trait=number_components > 3 ? BlendPixelTrait : + UndefinedPixelTrait; maximum_component_depth=0; for (i=0; i < (ssize_t) number_components; i++) { diff --git a/coders/pcx.c b/coders/pcx.c index 38c107b1e..0b1e6496a 100644 --- a/coders/pcx.c +++ b/coders/pcx.c @@ -431,7 +431,8 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) } } if (image->storage_class == DirectClass) - image->alpha_trait=pcx_info.planes > 3 ? MagickTrue : MagickFalse; + image->alpha_trait=pcx_info.planes > 3 ? BlendPixelTrait : + UndefinedPixelTrait; else if ((pcx_info.version == 5) || ((pcx_info.bits_per_pixel*pcx_info.planes) == 1)) diff --git a/coders/pict.c b/coders/pict.c index 8b3e77a0c..a55687ce1 100644 --- a/coders/pict.c +++ b/coders/pict.c @@ -1076,7 +1076,7 @@ static Image *ReadPICTImage(const ImageInfo *image_info, ReadPixmap(pixmap); tile_image->depth=1UL*pixmap.component_size; tile_image->alpha_trait=pixmap.component_count == 4 ? - MagickTrue : MagickFalse; + BlendPixelTrait : UndefinedPixelTrait; tile_image->resolution.x=(double) pixmap.horizontal_resolution; tile_image->resolution.y=(double) pixmap.vertical_resolution; tile_image->units=PixelsPerInchResolution; diff --git a/coders/png.c b/coders/png.c index 2fb2231aa..fa2cf4d51 100644 --- a/coders/png.c +++ b/coders/png.c @@ -3015,7 +3015,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, image->alpha_trait=(((int) ping_color_type == PNG_COLOR_TYPE_RGB_ALPHA) || ((int) ping_color_type == PNG_COLOR_TYPE_GRAY_ALPHA) || (png_get_valid(ping,ping_info,PNG_INFO_tRNS))) ? - MagickTrue : MagickFalse; + BlendPixelTrait : UndefinedPixelTrait; for (y=0; y < (ssize_t) image->rows; y++) { @@ -3129,10 +3129,11 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, " Converting grayscale pixels to pixel packets"); image->alpha_trait=ping_color_type == PNG_COLOR_TYPE_GRAY_ALPHA ? - MagickTrue : MagickFalse; + BlendPixelTrait : UndefinedPixelTrait; quantum_scanline=(Quantum *) AcquireQuantumMemory(image->columns, - (image->alpha_trait ? 2 : 1)*sizeof(*quantum_scanline)); + (image->alpha_trait == BlendPixelTrait? 2 : 1)* + sizeof(*quantum_scanline)); if (quantum_scanline == (Quantum *) NULL) png_error(ping,"Memory allocation failed"); @@ -3322,7 +3323,8 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, quantum_scanline=(Quantum *) RelinquishMagickMemory(quantum_scanline); } - image->alpha_trait=found_transparent_pixel; + image->alpha_trait=found_transparent_pixel ? BlendPixelTrait : + UndefinedPixelTrait; if (logging != MagickFalse) { @@ -3344,13 +3346,13 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, if (image->storage_class == PseudoClass) { - MagickBooleanType - matte; + PixelTrait + alpha_trait; - matte=image->alpha_trait; + alpha_trait=image->alpha_trait; image->alpha_trait=UndefinedPixelTrait; (void) SyncImage(image,exception); - image->alpha_trait=matte; + image->alpha_trait=alpha_trait; } png_read_end(ping,end_info); @@ -3611,7 +3613,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, image->alpha_trait=(((int) ping_color_type == PNG_COLOR_TYPE_RGB_ALPHA) || ((int) ping_color_type == PNG_COLOR_TYPE_GRAY_ALPHA) || (png_get_valid(ping,ping_info,PNG_INFO_tRNS))) ? - MagickTrue : MagickFalse; + BlendPixelTrait : UndefinedPixelTrait; /* Set more properties for identify to retrieve */ { @@ -8991,7 +8993,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, quantum_info = (QuantumInfo *) NULL; number_colors=0; image_colors=(int) image->colors; - image_matte=image->alpha_trait; + image_matte=image->alpha_trait == BlendPixelTrait ? MagickTrue : MagickFalse; mng_info->IsPalette=image->storage_class == PseudoClass && image_colors <= 256 && image->colormap != NULL; @@ -10233,7 +10235,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (image_matte != MagickFalse && image->alpha_trait != BlendPixelTrait) { /* Add an opaque matte channel */ - image->alpha_trait = MagickTrue; + image->alpha_trait = BlendPixelTrait; (void) SetImageAlpha(image,OpaqueAlpha,exception); if (logging != MagickFalse) diff --git a/coders/psd.c b/coders/psd.c index 4e8040bea..2dcc26415 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -832,7 +832,8 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception) image=DestroyImageList(image); return((Image *) NULL); } - image->alpha_trait=psd_info.channels >= 4 ? MagickTrue : MagickFalse; + image->alpha_trait=psd_info.channels >= 4 ? BlendPixelTrait : + UndefinedPixelTrait; if (psd_info.mode == LabMode) SetImageColorspace(image,LabColorspace,exception); psd_info.color_channels=3; @@ -840,7 +841,8 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception) { psd_info.color_channels=4; SetImageColorspace(image,CMYKColorspace,exception); - image->alpha_trait=psd_info.channels >= 5 ? MagickTrue : MagickFalse; + image->alpha_trait=psd_info.channels >= 5 ? BlendPixelTrait : + UndefinedPixelTrait; } if ((psd_info.mode == BitmapMode) || (psd_info.mode == GrayscaleMode) || (psd_info.mode == DuotoneMode)) @@ -848,7 +850,8 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception) psd_info.color_channels=1; if (AcquireImageColormap(image,256,exception) == MagickFalse) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); - image->alpha_trait=psd_info.channels >= 2 ? MagickTrue : MagickFalse; + image->alpha_trait=psd_info.channels >= 2 ? BlendPixelTrait : + UndefinedPixelTrait; if (image->debug != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), " Image colormap allocated"); @@ -989,8 +992,9 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception) MagickOffsetType layer_offset; - image->alpha_trait=psd_info.channels > psd_info.color_channels ? MagickTrue : MagickFalse; - + image->alpha_trait=psd_info.channels > psd_info.color_channels ? + BlendPixelTrait : UndefinedPixelTrait; + if (image->debug != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), image->alpha_trait ? " image has matte" : " image has no matte"); diff --git a/coders/rla.c b/coders/rla.c index 1579a0dc1..823061777 100644 --- a/coders/rla.c +++ b/coders/rla.c @@ -252,7 +252,8 @@ static Image *ReadRLAImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Initialize image structure. */ - image->alpha_trait=rla_info.number_matte_channels != 0 ? MagickTrue : MagickFalse; + image->alpha_trait=rla_info.number_matte_channels != 0 ? BlendPixelTrait : + UndefinedPixelTrait; image->columns=1UL*rla_info.active_window.right-rla_info.active_window.left+1; image->rows=1UL*rla_info.active_window.top-rla_info.active_window.bottom+1; if (image_info->ping != MagickFalse) diff --git a/coders/rle.c b/coders/rle.c index 506447dcb..55eef4a7e 100644 --- a/coders/rle.c +++ b/coders/rle.c @@ -212,7 +212,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception) image->columns=ReadBlobLSBShort(image); image->rows=ReadBlobLSBShort(image); flags=(MagickStatusType) ReadBlobByte(image); - image->alpha_trait=flags & 0x04 ? MagickTrue : MagickFalse; + image->alpha_trait=flags & 0x04 ? BlendPixelTrait : UndefinedPixelTrait; number_planes=1UL*ReadBlobByte(image); bits_per_pixel=1UL*ReadBlobByte(image); number_colormaps=1UL*ReadBlobByte(image); diff --git a/coders/sgi.c b/coders/sgi.c index bfcd7025c..d9385de69 100644 --- a/coders/sgi.c +++ b/coders/sgi.c @@ -530,7 +530,8 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Initialize image structure. */ - image->alpha_trait=iris_info.depth == 4 ? MagickTrue : MagickFalse; + image->alpha_trait=iris_info.depth == 4 ? BlendPixelTrait : + UndefinedPixelTrait; image->columns=iris_info.columns; image->rows=iris_info.rows; /* diff --git a/coders/sun.c b/coders/sun.c index e5b220ffb..c117e2a5f 100644 --- a/coders/sun.c +++ b/coders/sun.c @@ -383,7 +383,8 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) default: ThrowReaderException(CoderError,"ColormapTypeNotSupported"); } - image->alpha_trait=sun_info.depth == 32 ? MagickTrue : MagickFalse; + image->alpha_trait=sun_info.depth == 32 ? BlendPixelTrait : + UndefinedPixelTrait; image->columns=sun_info.width; image->rows=sun_info.height; if (image_info->ping != MagickFalse) diff --git a/coders/tga.c b/coders/tga.c index b2e7e465e..8f16b9072 100644 --- a/coders/tga.c +++ b/coders/tga.c @@ -228,7 +228,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception) image->rows=tga_info.height; alpha_bits=(tga_info.attributes & 0x0FU); image->alpha_trait=(alpha_bits > 0) || (tga_info.bits_per_pixel == 32) ? - MagickTrue : MagickFalse; + BlendPixelTrait : UndefinedPixelTrait; if ((tga_info.image_type != TGAColormap) && (tga_info.image_type != TGARLEColormap)) image->depth=(size_t) ((tga_info.bits_per_pixel <= 8) ? 8 : diff --git a/coders/viff.c b/coders/viff.c index 11d8f7eda..6932b2c29 100644 --- a/coders/viff.c +++ b/coders/viff.c @@ -485,9 +485,10 @@ static Image *ReadVIFFImage(const ImageInfo *image_info, /* Initialize image structure. */ - image->alpha_trait=viff_info.number_data_bands == 4 ? MagickTrue : MagickFalse; - image->storage_class= - (viff_info.number_data_bands < 3 ? PseudoClass : DirectClass); + image->alpha_trait=viff_info.number_data_bands == 4 ? BlendPixelTrait : + UndefinedPixelTrait; + image->storage_class=(viff_info.number_data_bands < 3 ? PseudoClass : + DirectClass); image->columns=viff_info.rows; image->rows=viff_info.columns; if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0)) diff --git a/config/ImageMagick.rdf b/config/ImageMagick.rdf index 8065c5fbe..cda530537 100644 --- a/config/ImageMagick.rdf +++ b/config/ImageMagick.rdf @@ -5,7 +5,7 @@ ImageMagick ImageMagick: convert, edit, and compose images. - 2012-08-27 + 2012-08-28 ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. @@ -57,7 +57,7 @@ Examples of ImageMagick Usage shows how to use ImageMagick from the command-line stable - 2012-08-27 + 2012-08-28 7.0.0 -0 diff --git a/config/configure.xml b/config/configure.xml index 66c2f6533..010f87d1b 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -11,7 +11,7 @@ - +