From: cristy Date: Thu, 19 Jan 2012 18:32:39 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6341 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fad60c95ffc2ea3de9e5f0eaaeaaa3d008289683;p=imagemagick --- diff --git a/Magick++/lib/Magick++/Options.h b/Magick++/lib/Magick++/Options.h index 430bd29db..1b3220840 100644 --- a/Magick++/lib/Magick++/Options.h +++ b/Magick++/lib/Magick++/Options.h @@ -259,6 +259,10 @@ namespace Magick void view ( const std::string &view_ ); std::string view ( void ) const; + // Virtual pixel method. + void virtualPixelMethod ( VirtualPixelMethod virtual_pixel_method_ ); + VirtualPixelMethod virtualPixelMethod ( void ) const; + // X11 display name void x11Display ( const std::string &display_ ); std::string x11Display ( void ) const; diff --git a/Magick++/lib/Options.cpp b/Magick++/lib/Options.cpp index 8711a52cf..1ded7bc7a 100644 --- a/Magick++/lib/Options.cpp +++ b/Magick++/lib/Options.cpp @@ -792,6 +792,15 @@ bool Magick::Options::verbose ( void ) const return static_cast(_imageInfo->verbose); } +void Magick::Options::virtualPixelMethod ( VirtualPixelMethod virtual_pixel_method_ ) +{ + _imageInfo->virtual_pixel_method = virtual_pixel_method_; +} +Magick::VirtualPixelMethod Magick::Options::virtualPixelMethod ( void ) const +{ + return static_cast(_imageInfo->virtual_pixel_method); +} + void Magick::Options::view ( const std::string &view_ ) { if ( view_.length() == 0 ) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 3bdd75ed6..40e4ced06 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1270,7 +1270,7 @@ static void DrawBoundingRectangles(Image *image,const DrawInfo *draw_info, coordinates; clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info); - (void) QueryColorCompliance("#000F",AllCompliance,&clone_info->fill, + (void) QueryColorCompliance("#0000",AllCompliance,&clone_info->fill, exception); resolution.x=DefaultResolution; resolution.y=DefaultResolution; @@ -1420,7 +1420,7 @@ MagickExport MagickBooleanType DrawClipPath(Image *image, (void) SetImageClipMask(image,clip_mask,exception); clip_mask=DestroyImage(clip_mask); } - (void) QueryColorCompliance("#000F",AllCompliance, + (void) QueryColorCompliance("#0000",AllCompliance, &image->clip_mask->background_color,exception); image->clip_mask->background_color.alpha=(Quantum) TransparentAlpha; (void) SetImageBackgroundColor(image->clip_mask,exception); @@ -3495,7 +3495,7 @@ MagickExport MagickBooleanType DrawPatternPath(Image *image, image_info->size=AcquireString(geometry); *pattern=AcquireImage(image_info,exception); image_info=DestroyImageInfo(image_info); - (void) QueryColorCompliance("#000000FF",AllCompliance, + (void) QueryColorCompliance("#00000000",AllCompliance, &(*pattern)->background_color,exception); (void) SetImageBackgroundColor(*pattern,exception); if (image->debug != MagickFalse) @@ -4755,9 +4755,9 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info) (void) ResetMagickMemory(draw_info,0,sizeof(*draw_info)); GetAffineMatrix(&draw_info->affine); exception=AcquireExceptionInfo(); - (void) QueryColorCompliance("#0000",AllCompliance,&draw_info->fill, + (void) QueryColorCompliance("#000F",AllCompliance,&draw_info->fill, exception); - (void) QueryColorCompliance("#FFFF",AllCompliance,&draw_info->stroke, + (void) QueryColorCompliance("#FFF0",AllCompliance,&draw_info->stroke, exception); draw_info->stroke_width=1.0; draw_info->alpha=OpaqueAlpha; diff --git a/MagickCore/resize.c b/MagickCore/resize.c index 3ab7c5532..628f57fcc 100644 --- a/MagickCore/resize.c +++ b/MagickCore/resize.c @@ -1159,8 +1159,12 @@ MagickPrivate ResizeFilter *AcquireResizeFilter(const Image *image, MagickExport Image *AdaptiveResizeImage(const Image *image, const size_t columns,const size_t rows, ExceptionInfo *exception) { - return(InterpolativeResizeImage(image,columns,rows,MeshInterpolatePixel, - exception)); + Image + *resize_image; + + resize_image=InterpolativeResizeImage(image,columns,rows,MeshInterpolatePixel, + exception); + return(resize_image); } /* @@ -1572,9 +1576,8 @@ MagickExport Image *InterpolativeResizeImage(const Image *image, progress=0; image_view=AcquireCacheView(image); resize_view=AcquireCacheView(resize_image); - scale.x=(MagickRealType)image->columns/resize_image->columns; - scale.y=(MagickRealType)image->rows/resize_image->rows; - + scale.x=(double) image->columns/resize_image->columns; + scale.y=(double) image->rows/resize_image->rows; #if defined(MAGICKCORE_OPENMP_SUPPORT) #pragma omp parallel for schedule(static,1) shared(progress,status) #endif @@ -1600,7 +1603,7 @@ MagickExport Image *InterpolativeResizeImage(const Image *image, { offset.x=((MagickRealType) x+0.5)*scale.x-0.5; status=InterpolatePixelChannels(image,image_view,resize_image,method, - offset.x,offset.y,q,exception); + offset.x,offset.y,q,exception); q+=GetPixelChannels(resize_image); } if (SyncCacheViewAuthenticPixels(resize_view,exception) == MagickFalse) diff --git a/MagickCore/version.h b/MagickCore/version.h index 2420df1d0..3d9165424 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -34,7 +34,7 @@ extern "C" { #define MagickLibAddendum "-0" #define MagickLibInterface 7 #define MagickLibMinInterface 7 -#define MagickReleaseDate "2012-01-18" +#define MagickReleaseDate "2012-01-19" #define MagickChangeDate "20110801" #define MagickAuthoritativeURL "http://www.imagemagick.org" #if defined(MAGICKCORE_OPENMP_SUPPORT) diff --git a/coders/histogram.c b/coders/histogram.c index f3495397d..aa88e979d 100644 --- a/coders/histogram.c +++ b/coders/histogram.c @@ -292,13 +292,12 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info, /* Initialize histogram image. */ - (void) QueryColorCompliance("#000",AllCompliance, + (void) QueryColorCompliance("#000000",AllCompliance, &histogram_image->background_color,exception); (void) SetImageBackgroundColor(histogram_image,exception); for (x=0; x < (ssize_t) histogram_image->columns; x++) { - q=GetAuthenticPixels(histogram_image,x,0,1,histogram_image->rows, - exception); + q=GetAuthenticPixels(histogram_image,x,0,1,histogram_image->rows,exception); if (q == (Quantum *) NULL) break; if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) diff --git a/coders/svg.c b/coders/svg.c index 3e969b6b8..0c4f87eb6 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -1657,15 +1657,15 @@ static void SVGStartElement(void *context,const xmlChar *name, if (LocaleCompare(value,"currentColor") == 0) { (void) FormatLocaleFile(svg_info->file, - "fill '%s'\n",color); + "fill '%s'\n",color); break; } - if (LocaleCompare(value,"#000000FF") == 0) + if (LocaleCompare(value,"#00000000") == 0) (void) FormatLocaleFile(svg_info->file, - "fill '#000000'\n"); + "fill '#000000'\n"); else (void) FormatLocaleFile(svg_info->file,"fill '%s'\n", - value); + value); break; } if (LocaleCompare(keyword,"fillcolor") == 0) @@ -1747,18 +1747,18 @@ static void SVGStartElement(void *context,const xmlChar *name, } if (LocaleCompare(keyword,"stroke") == 0) { - if (LocaleCompare(value,"currentColor") == 0) - { - (void) FormatLocaleFile(svg_info->file, - "stroke '%s'\n",color); - break; - } - if (LocaleCompare(value,"#000000FF") == 0) + if (LocaleCompare(value,"currentColor") == 0) + { + (void) FormatLocaleFile(svg_info->file, + "stroke '%s'\n",color); + break; + } + if (LocaleCompare(value,"#00000000") == 0) (void) FormatLocaleFile(svg_info->file, - "fill '#000000'\n"); + "fill '#000000'\n"); else (void) FormatLocaleFile(svg_info->file, - "stroke '%s'\n",value); + "stroke '%s'\n",value); break; } if (LocaleCompare(keyword,"stroke-antialiasing") == 0) diff --git a/config/configure.xml b/config/configure.xml index 619c3a8f9..c85d287e5 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -11,7 +11,7 @@ - +