From: cristy Date: Wed, 23 Sep 2009 00:35:43 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~10648 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4582cbbbbf3cbb915fddcf7b2d7421e611588dbe;p=imagemagick --- diff --git a/Magick++/lib/Magick++/STL.h b/Magick++/lib/Magick++/STL.h index 0a424de41..fd2030bb0 100644 --- a/Magick++/lib/Magick++/STL.h +++ b/Magick++/lib/Magick++/STL.h @@ -109,8 +109,8 @@ namespace Magick // Annotate using specified text, bounding area, and placement // gravity annotateImage ( const std::string &text_, - const Geometry &geometry_, - const GravityType gravity_ ); + const Geometry &geometry_, + const GravityType gravity_ ); // Annotate with text using specified text, bounding area, // placement gravity, and rotation. @@ -122,7 +122,7 @@ namespace Magick // Annotate with text (bounding area is entire image) and // placement gravity. annotateImage ( const std::string &text_, - const GravityType gravity_ ); + const GravityType gravity_ ); void operator()( Image &image_ ) const; @@ -220,7 +220,7 @@ namespace Magick colorizeImage( const unsigned int opacityRed_, const unsigned int opacityGreen_, const unsigned int opacityBlue_, - const Color &penColor_ ); + const Color &penColor_ ); colorizeImage( const unsigned int opacity_, const Color &penColor_ ); @@ -264,13 +264,13 @@ namespace Magick { public: compositeImage( const Image &compositeImage_, - int xOffset_, - int yOffset_, - CompositeOperator compose_ = InCompositeOp ); + int xOffset_, + int yOffset_, + CompositeOperator compose_ = InCompositeOp ); compositeImage( const Image &compositeImage_, - const Geometry &offset_, - CompositeOperator compose_ = InCompositeOp ); + const Geometry &offset_, + CompositeOperator compose_ = InCompositeOp ); void operator()( Image &image_ ) const; @@ -450,22 +450,22 @@ namespace Magick // Uses current fuzz setting when determining color match. floodFillColorImage( const unsigned int x_, const unsigned int y_, - const Color &fillColor_ ); + const Color &fillColor_ ); floodFillColorImage( const Geometry &point_, - const Color &fillColor_ ); + const Color &fillColor_ ); // Flood-fill color across pixels starting at target-pixel and // stopping at pixels matching specified border color. // Uses current fuzz setting when determining color match. floodFillColorImage( const unsigned int x_, const unsigned int y_, - const Color &fillColor_, - const Color &borderColor_ ); + const Color &fillColor_, + const Color &borderColor_ ); floodFillColorImage( const Geometry &point_, - const Color &fillColor_, - const Color &borderColor_ ); + const Color &fillColor_, + const Color &borderColor_ ); void operator()( Image &image_ ) const; @@ -485,22 +485,22 @@ namespace Magick // Uses current fuzz setting when determining color match. floodFillTextureImage( const unsigned int x_, const unsigned int y_, - const Image &texture_ ); + const Image &texture_ ); floodFillTextureImage( const Geometry &point_, - const Image &texture_ ); + const Image &texture_ ); // Flood-fill texture across pixels starting at target-pixel and // stopping at pixels matching specified border color. // Uses current fuzz setting when determining color match. floodFillTextureImage( const unsigned int x_, const unsigned int y_, - const Image &texture_, - const Color &borderColor_ ); + const Image &texture_, + const Color &borderColor_ ); floodFillTextureImage( const Geometry &point_, - const Image &texture_, - const Color &borderColor_ ); + const Image &texture_, + const Color &borderColor_ ); void operator()( Image &image_ ) const; @@ -529,7 +529,7 @@ namespace Magick frameImage( const Geometry &geometry_ = frameGeometryDefault ); frameImage( const unsigned int width_, const unsigned int height_, - const int innerBevel_ = 6, const int outerBevel_ = 6 ); + const int innerBevel_ = 6, const int outerBevel_ = 6 ); void operator()( Image &image_ ) const; @@ -547,8 +547,8 @@ namespace Magick gammaImage( const double gamma_ ); gammaImage ( const double gammaRed_, - const double gammaGreen_, - const double gammaBlue_ ); + const double gammaGreen_, + const double gammaBlue_ ); void operator()( Image &image_ ) const; @@ -688,9 +688,9 @@ namespace Magick { public: matteFloodfillImage( const Color &target_ , - const unsigned int matte_, - const int x_, const int y_, - const PaintMethod method_ ); + const unsigned int matte_, + const int x_, const int y_, + const PaintMethod method_ ); void operator()( Image &image_ ) const; @@ -731,8 +731,8 @@ namespace Magick { public: modulateImage( const double brightness_, - const double saturation_, - const double hue_ ); + const double saturation_, + const double hue_ ); void operator()( Image &image_ ) const; @@ -802,7 +802,7 @@ namespace Magick { public: opaqueImage( const Color &opaqueColor_, - const Color &penColor_ ); + const Color &penColor_ ); void operator()( Image &image_ ) const; @@ -829,7 +829,7 @@ namespace Magick { public: raiseImage( const Geometry &geometry_ = raiseGeometryDefault, - const bool raisedFlag_ = false ); + const bool raisedFlag_ = false ); void operator()( Image &image_ ) const; @@ -939,7 +939,7 @@ namespace Magick { public: segmentImage( const double clusterThreshold_ = 1.0, - const double smoothingThreshold_ = 1.5 ); + const double smoothingThreshold_ = 1.5 ); void operator()( Image &image_ ) const; @@ -953,7 +953,7 @@ namespace Magick { public: shadeImage( const double clusterThreshold_ = 1.0, - const double smoothingThreshold_ = 1.5 ); + const double smoothingThreshold_ = 1.5 ); void operator()( Image &image_ ) const; @@ -993,7 +993,7 @@ namespace Magick { public: shearImage( const double xShearAngle_, - const double yShearAngle_ ); + const double yShearAngle_ ); void operator()( Image &image_ ) const; @@ -1107,7 +1107,7 @@ namespace Magick transformImage( const Geometry &imageGeometry_ ); transformImage( const Geometry &imageGeometry_, - const Geometry &cropGeometry_ ); + const Geometry &cropGeometry_ ); void operator()( Image &image_ ) const; @@ -1144,7 +1144,7 @@ namespace Magick { public: waveImage( const double amplitude_ = 25.0, - const double wavelength_ = 150.0 ); + const double wavelength_ = 150.0 ); void operator()( Image &image_ ) const; @@ -1568,7 +1568,7 @@ namespace Magick public: pixelColorImage( const unsigned int x_, const unsigned int y_, - const Color &color_); + const Color &color_); void operator()( Image &image_ ) const; @@ -1691,8 +1691,8 @@ namespace Magick { public: sigmoidalContrastImage( const unsigned int sharpen_, - const double contrast, - const double midpoint = QuantumRange / 2.0 ); + const double contrast, + const double midpoint = QuantumRange / 2.0 ); void operator()( Image &image_ ) const; @@ -1816,29 +1816,29 @@ namespace Magick // method in order to specify the entire container. template void linkImages( InputIterator first_, - InputIterator last_ ) { + InputIterator last_ ) { MagickCore::Image* previous = 0; int scene = 0; for ( InputIterator iter = first_; iter != last_; ++iter ) { - // Unless we reduce the reference count to one, the same image - // structure may occur more than once in the container, causing - // the linked list to fail. - iter->modifyImage(); + // Unless we reduce the reference count to one, the same image + // structure may occur more than once in the container, causing + // the linked list to fail. + iter->modifyImage(); - MagickCore::Image* current = iter->image(); + MagickCore::Image* current = iter->image(); - current->previous = previous; - current->next = 0; + current->previous = previous; + current->next = 0; - if ( previous != 0) - previous->next = current; + if ( previous != 0) + previous->next = current; - current->scene=scene; - ++scene; + current->scene=scene; + ++scene; - previous = current; + previous = current; } } @@ -1847,12 +1847,12 @@ namespace Magick // back to its pristine un-linked state. template void unlinkImages( InputIterator first_, - InputIterator last_ ) { + InputIterator last_ ) { for( InputIterator iter = first_; iter != last_; ++iter ) { - MagickCore::Image* image = iter->image(); - image->previous = 0; - image->next = 0; + MagickCore::Image* image = iter->image(); + image->previous = 0; + image->next = 0; } } @@ -1861,24 +1861,24 @@ namespace Magick // The options are copied into the object. template void insertImages( Container *sequence_, - MagickCore::Image* images_ ) { + MagickCore::Image* images_ ) { MagickCore::Image *image = images_; if ( image ) { - do - { - MagickCore::Image* next_image = image->next; - image->next = 0; - - if (next_image != 0) - next_image->previous=0; - - sequence_->push_back( Magick::Image( image ) ); - - image=next_image; - } while( image ); + do + { + MagickCore::Image* next_image = image->next; + image->next = 0; + + if (next_image != 0) + next_image->previous=0; + + sequence_->push_back( Magick::Image( image ) ); + + image=next_image; + } while( image ); - return; + return; } } @@ -1890,7 +1890,7 @@ namespace Magick template void animateImages( InputIterator first_, - InputIterator last_ ) { + InputIterator last_ ) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); linkImages( first_, last_ ); @@ -1905,15 +1905,15 @@ namespace Magick // vertical direction. template void appendImages( Image *appendedImage_, - InputIterator first_, - InputIterator last_, - bool stack_ = false) { + InputIterator first_, + InputIterator last_, + bool stack_ = false) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); linkImages( first_, last_ ); MagickCore::Image* image = MagickCore::AppendImages( first_->image(), - (MagickBooleanType) stack_, - &exceptionInfo ); + (MagickBooleanType) stack_, + &exceptionInfo ); unlinkImages( first_, last_ ); appendedImage_->replaceImage( image ); throwException( exceptionInfo ); @@ -1924,13 +1924,13 @@ namespace Magick // All the input images must be the same size in pixels. template void averageImages( Image *averagedImage_, - InputIterator first_, - InputIterator last_ ) { + InputIterator first_, + InputIterator last_ ) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); linkImages( first_, last_ ); MagickCore::Image* image = MagickCore::AverageImages( first_->image(), - &exceptionInfo ); + &exceptionInfo ); unlinkImages( first_, last_ ); averagedImage_->replaceImage( image ); throwException( exceptionInfo ); @@ -2147,7 +2147,7 @@ namespace Magick // template void displayImages( InputIterator first_, - InputIterator last_ ) { + InputIterator last_ ) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); linkImages( first_, last_ ); @@ -2162,13 +2162,13 @@ namespace Magick // This is useful for combining Photoshop layers into a single image. template void flattenImages( Image *flattendImage_, - InputIterator first_, - InputIterator last_ ) { + InputIterator first_, + InputIterator last_ ) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); linkImages( first_, last_ ); MagickCore::Image* image = MagickCore::MergeImageLayers( first_->image(), - FlattenLayer,&exceptionInfo ); + FlattenLayer,&exceptionInfo ); unlinkImages( first_, last_ ); flattendImage_->replaceImage( image ); throwException( exceptionInfo ); @@ -2181,48 +2181,50 @@ namespace Magick // true in order to evaluate quantization error. template void mapImages( InputIterator first_, - InputIterator last_, - const Image& mapImage_, - bool dither_ = false, - bool measureError_ = false ) { + InputIterator last_, + const Image& mapImage_, + bool dither_ = false, + bool measureError_ = false ) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); + MagickCore::QuantizeInfo quantizeInfo; + MagickCore::GetQuantizeInfo( &quantizeInfo ); + quantizeInfo = dither_ ? MagickCore::MagickTrue : MagickCore::MagickFalse; linkImages( first_, last_ ); - MagickCore::MapImages( first_->image(), - mapImage_.constImage(), - dither_ ? MagickCore::MagickTrue : MagickCore::MagickFalse); + MagickCore::RemapImages( &quantizeInfo, first_->image(), + mapImage_.constImage()); MagickCore::GetImageException( first_->image(), &exceptionInfo ); if ( exceptionInfo.severity != MagickCore::UndefinedException ) { - unlinkImages( first_, last_ ); - throwException( exceptionInfo ); + unlinkImages( first_, last_ ); + throwException( exceptionInfo ); } MagickCore::Image* image = first_->image(); while( image ) { - // Calculate quantization error - if ( measureError_ ) - { - MagickCore::GetImageQuantizeError( image ); - if ( image->exception.severity > MagickCore::UndefinedException ) - { - unlinkImages( first_, last_ ); - throwException( exceptionInfo ); - } - } - - // Udate DirectClass representation of pixels - MagickCore::SyncImage( image ); - if ( image->exception.severity > MagickCore::UndefinedException ) - { - unlinkImages( first_, last_ ); - throwException( exceptionInfo ); - } - - // Next image - image=image->next; + // Calculate quantization error + if ( measureError_ ) + { + MagickCore::GetImageQuantizeError( image ); + if ( image->exception.severity > MagickCore::UndefinedException ) + { + unlinkImages( first_, last_ ); + throwException( exceptionInfo ); + } + } + + // Udate DirectClass representation of pixels + MagickCore::SyncImage( image ); + if ( image->exception.severity > MagickCore::UndefinedException ) + { + unlinkImages( first_, last_ ); + throwException( exceptionInfo ); + } + + // Next image + image=image->next; } unlinkImages( first_, last_ ); @@ -2232,9 +2234,9 @@ namespace Magick // Create a composite image by combining several separate images. template void montageImages( Container *montageImages_, - InputIterator first_, - InputIterator last_, - const Montage &montageOpts_ ) { + InputIterator first_, + InputIterator last_, + const Montage &montageOpts_ ) { MagickCore::MontageInfo* montageInfo = static_cast(MagickCore::AcquireMagickMemory(sizeof(MagickCore::MontageInfo))); @@ -2256,11 +2258,11 @@ namespace Magick MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); MagickCore::Image *images = MagickCore::MontageImages( first_->image(), - montageInfo, - &exceptionInfo ); + montageInfo, + &exceptionInfo ); if ( images != 0 ) { - insertImages( montageImages_, images ); + insertImages( montageImages_, images ); } // Clean up any allocated data in montageInfo @@ -2275,7 +2277,7 @@ namespace Magick // Apply transparency to montage images if ( montageImages_->size() > 0 && montageOpts_.transparentColor().isValid() ) { - for_each( first_, last_, transparentImage( montageOpts_.transparentColor() ) ); + for_each( first_, last_, transparentImage( montageOpts_.transparentColor() ) ); } // Report any transparentImage() error @@ -2287,16 +2289,16 @@ namespace Magick // Morph a set of images template void morphImages( Container *morphedImages_, - InputIterator first_, - InputIterator last_, - unsigned int frames_ ) { + InputIterator first_, + InputIterator last_, + unsigned int frames_ ) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); // Build image list linkImages( first_, last_ ); MagickCore::Image* images = MagickCore::MorphImages( first_->image(), frames_, - &exceptionInfo); + &exceptionInfo); // Unlink image list unlinkImages( first_, last_ ); @@ -2314,13 +2316,13 @@ namespace Magick // Inlay a number of images to form a single coherent picture. template void mosaicImages( Image *mosaicImage_, - InputIterator first_, - InputIterator last_ ) { + InputIterator first_, + InputIterator last_ ) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); linkImages( first_, last_ ); MagickCore::Image* image = MagickCore::MergeImageLayers( first_->image(), - MosaicLayer,&exceptionInfo ); + MosaicLayer,&exceptionInfo ); unlinkImages( first_, last_ ); mosaicImage_->replaceImage( image ); throwException( exceptionInfo ); @@ -2331,34 +2333,34 @@ namespace Magick // Set measureError_ to true in order to measure quantization error template void quantizeImages( InputIterator first_, - InputIterator last_, - bool measureError_ = false ) { + InputIterator last_, + bool measureError_ = false ) { MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); linkImages( first_, last_ ); MagickCore::QuantizeImages( first_->quantizeInfo(), - first_->image() ); + first_->image() ); MagickCore::GetImageException( first_->image(), &exceptionInfo ); if ( exceptionInfo.severity > MagickCore::UndefinedException ) { - unlinkImages( first_, last_ ); - throwException( exceptionInfo ); + unlinkImages( first_, last_ ); + throwException( exceptionInfo ); } MagickCore::Image* image = first_->image(); while( image != 0 ) { - // Calculate quantization error - if ( measureError_ ) - MagickCore::GetImageQuantizeError( image ); + // Calculate quantization error + if ( measureError_ ) + MagickCore::GetImageQuantizeError( image ); - // Update DirectClass representation of pixels - MagickCore::SyncImage( image ); + // Update DirectClass representation of pixels + MagickCore::SyncImage( image ); - // Next image - image=image->next; + // Next image + image=image->next; } unlinkImages( first_, last_ ); @@ -2369,7 +2371,7 @@ namespace Magick // FIXME: need a way to specify options like size, depth, and density. template void readImages( Container *sequence_, - const std::string &imageSpec_ ) { + const std::string &imageSpec_ ) { MagickCore::ImageInfo *imageInfo = MagickCore::CloneImageInfo(0); imageSpec_.copy( imageInfo->filename, MaxTextExtent-1 ); imageInfo->filename[ imageSpec_.length() ] = 0; @@ -2383,13 +2385,13 @@ namespace Magick } template void readImages( Container *sequence_, - const Blob &blob_ ) { + const Blob &blob_ ) { MagickCore::ImageInfo *imageInfo = MagickCore::CloneImageInfo(0); MagickCore::ExceptionInfo exceptionInfo; MagickCore::GetExceptionInfo( &exceptionInfo ); MagickCore::Image *images = MagickCore::BlobToImage( imageInfo, - blob_.data(), - blob_.length(), &exceptionInfo ); + blob_.data(), + blob_.length(), &exceptionInfo ); MagickCore::DestroyImageInfo(imageInfo); insertImages( sequence_, images ); throwException( exceptionInfo ); @@ -2399,9 +2401,9 @@ namespace Magick // Write Images template void writeImages( InputIterator first_, - InputIterator last_, - const std::string &imageSpec_, - bool adjoin_ = true ) { + InputIterator last_, + const std::string &imageSpec_, + bool adjoin_ = true ) { first_->adjoin( adjoin_ ); @@ -2427,9 +2429,9 @@ namespace Magick // Write images to BLOB template void writeImages( InputIterator first_, - InputIterator last_, - Blob *blob_, - bool adjoin_ = true) { + InputIterator last_, + Blob *blob_, + bool adjoin_ = true) { first_->adjoin( adjoin_ ); @@ -2439,9 +2441,9 @@ namespace Magick MagickCore::GetExceptionInfo( &exceptionInfo ); size_t length = 2048; // Efficient size for small images void* data = MagickCore::ImagesToBlob( first_->imageInfo(), - first_->image(), - &length, - &exceptionInfo); + first_->image(), + &length, + &exceptionInfo); blob_->updateNoCopy( data, length, Magick::Blob::MallocAllocator ); unlinkImages( first_, last_ ); diff --git a/coders/msl.c b/coders/msl.c index 4c394d862..45711d70c 100644 --- a/coders/msl.c +++ b/coders/msl.c @@ -76,6 +76,7 @@ #include "magick/quantum-private.h" #include "magick/registry.h" #include "magick/resize.h" +#include "magick/resource_.h" #include "magick/segment.h" #include "magick/shear.h" #include "magick/signature.h" @@ -4265,9 +4266,6 @@ static void MSLStartElement(void *context,const xmlChar *tag, } if (LocaleCompare((const char *) tag, "profile") == 0) { - ImageInfo - *clone_info; - if (msl_info->image[n] == (Image *) NULL) { ThrowMSLException(OptionError,"NoImagesDefined", @@ -4965,51 +4963,12 @@ static void MSLStartElement(void *context,const xmlChar *tag, AppendImageToList(&msl_info->image[n],image); break; } - ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); - break; - } - case 'G': - case 'g': - { - if (LocaleCompare(keyword,"gravity") == 0) - { - option=ParseMagickOption(MagickGravityOptions,MagickFalse, - value); - if (option < 0) - ThrowMSLException(OptionError,"UnrecognizedGravityType", - value); - (void) SetImageOption(msl_info->image_info[n],keyword, - value); - break; - } - ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); - break; - } - case 'P': - case 'p': - { - if (LocaleCompare(keyword,"pointsize") == 0) - { - msl_info->image_info[n]->pointsize=atof(value); - break; - } - ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); - break; - } - case 'S': - case 's': - { - if (LocaleCompare(keyword,"size") == 0) - { - msl_info->image_info[n]->size=AcquireString(value); - break; - } - ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); + (void) SetMSLAttributes(msl_info,keyword,value); break; } default: { - ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); + (void) SetMSLAttributes(msl_info,keyword,value); break; } } @@ -7196,23 +7155,11 @@ static void MSLStartElement(void *context,const xmlChar *tag, MaxTextExtent); break; } - ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); - } - case 'Q': - case 'q': - { - if (LocaleCompare(keyword,"quality") == 0) - { - msl_info->image_info[n]->quality=atol(value); - msl_info->image[n]->quality= - msl_info->image_info[n]->quality; - break; - } - ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); + (void) SetMSLAttributes(msl_info,keyword,value); } default: { - ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); + (void) SetMSLAttributes(msl_info,keyword,value); break; } } @@ -7808,18 +7755,27 @@ ModuleExport unsigned long RegisterMSLImage(void) static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, const char *value) { + Image + *attributes; + DrawInfo *draw_info; ExceptionInfo *exception; + GeometryInfo + geometry_info; + Image *image; ImageInfo *image_info; + int + flags; + long n; @@ -7830,6 +7786,7 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, return(MagickTrue); exception=msl_info->exception; n=msl_info->n; + attributes=msl_info->attributes[n]; image_info=msl_info->image_info[n]; draw_info=msl_info->draw_info[n]; image=msl_info->image[n]; @@ -7857,7 +7814,40 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, alpha=ParseMagickOption(MagickAlphaOptions,MagickFalse,value); if (alpha < 0) ThrowMSLException(OptionError,"UnrecognizedType",value); - (void) SetImageAlphaChannel(image,(AlphaChannelType) alpha); + if (image != (Image *) NULL) + (void) SetImageAlphaChannel(image,(AlphaChannelType) alpha); + break; + } + if (LocaleCompare(keyword,"antialias") == 0) + { + long + antialias; + + antialias=ParseMagickOption(MagickBooleanOptions,MagickFalse,value); + if (antialias < 0) + ThrowMSLException(OptionError,"UnrecognizedGravityType",value); + image_info->antialias=(MagickBooleanType) antialias; + break; + } + if (LocaleCompare(keyword,"area-limit") == 0) + { + MagickSizeType + limit; + + limit=MagickResourceInfinity; + if (LocaleCompare(value,"unlimited") != 0) + limit=(MagickSizeType) StringToDouble(value,100.0); + (void) SetMagickResourceLimit(AreaResource,limit); + break; + } + if (LocaleCompare(keyword,"attenuate") == 0) + { + (void) SetImageOption(image_info,keyword,value); + break; + } + if (LocaleCompare(keyword,"authenticate") == 0) + { + (void) CloneString(&image_info->density,value); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); @@ -7872,6 +7862,25 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, exception); break; } + if (LocaleCompare(keyword,"bias") == 0) + { + if (image == (Image *) NULL) + break; + image->bias=StringToDouble(value,QuantumRange); + break; + } + if (LocaleCompare(keyword,"blue-primary") == 0) + { + if (image == (Image *) NULL) + break; + flags=ParseGeometry(value,&geometry_info); + image->chromaticity.blue_primary.x=geometry_info.rho; + image->chromaticity.blue_primary.y=geometry_info.sigma; + if ((flags & SigmaValue) == 0) + image->chromaticity.blue_primary.y= + image->chromaticity.blue_primary.x; + break; + } if (LocaleCompare(keyword,"bordercolor") == 0) { (void) QueryColorDatabase(value,&image_info->border_color, @@ -7902,6 +7911,28 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, (void) SetImageOption(image_info,keyword,value); break; } + if (LocaleCompare(keyword,"filename") == 0) + { + (void) CopyMagickString(image_info->filename,value,MaxTextExtent); + break; + } + ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); + break; + } + case 'G': + case 'g': + { + if (LocaleCompare(keyword,"gravity") == 0) + { + long + gravity; + + gravity=ParseMagickOption(MagickGravityOptions,MagickFalse,value); + if (gravity < 0) + ThrowMSLException(OptionError,"UnrecognizedGravityType",value); + (void) SetImageOption(image_info,keyword,value); + break; + } ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); break; } @@ -7910,8 +7941,7 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, { if (LocaleCompare(keyword,"id") == 0) { - (void) SetImageProperty(msl_info->attributes[n],keyword,NULL); - (void) SetImageProperty(msl_info->attributes[n],keyword,value); + (void) SetImageProperty(attributes,keyword,value); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); @@ -7939,12 +7969,26 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, { if (LocaleCompare(keyword,"pointsize") == 0) { + image_info->pointsize=atof(value); draw_info->pointsize=atof(value); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); break; } + case 'Q': + case 'q': + { + if (LocaleCompare(keyword,"quality") == 0) + { + image_info->quality=atol(value); + if (image == (Image *) NULL) + break; + image->quality=atol(value); + break; + } + break; + } case 'S': case 's': { diff --git a/wand/deprecate.h b/wand/deprecate.h index fb82d97a6..1b91ae751 100644 --- a/wand/deprecate.h +++ b/wand/deprecate.h @@ -33,71 +33,82 @@ typedef struct _DrawingWand *DrawContext; extern WandExport double - DrawGetFillAlpha(const DrawingWand *), - DrawGetStrokeAlpha(const DrawingWand *); + DrawGetFillAlpha(const DrawingWand *) magick_attribute((deprecated)), + DrawGetStrokeAlpha(const DrawingWand *) magick_attribute((deprecated)); extern WandExport DrawInfo - *DrawPeekGraphicWand(const DrawingWand *); + *DrawPeekGraphicWand(const DrawingWand *) magick_attribute((deprecated)); extern WandExport char - *MagickDescribeImage(MagickWand *), - *MagickGetImageAttribute(MagickWand *,const char *), - *PixelIteratorGetException(const PixelIterator *,ExceptionType *); + *MagickDescribeImage(MagickWand *) magick_attribute((deprecated)), + *MagickGetImageAttribute(MagickWand *,const char *) + magick_attribute((deprecated)), + *PixelIteratorGetException(const PixelIterator *,ExceptionType *) + magick_attribute((deprecated)); extern WandExport long - MagickGetImageIndex(MagickWand *); + MagickGetImageIndex(MagickWand *) magick_attribute((deprecated)); extern WandExport MagickBooleanType - MagickClipPathImage(MagickWand *,const char *,const MagickBooleanType), + MagickClipPathImage(MagickWand *,const char *,const MagickBooleanType) + magick_attribute((deprecated)), MagickColorFloodfillImage(MagickWand *,const PixelWand *,const double, - const PixelWand *,const long,const long), + const PixelWand *,const long,const long) magick_attribute((deprecated)), MagickGetImageChannelExtrema(MagickWand *,const ChannelType,unsigned long *, - unsigned long *), - MagickGetImageExtrema(MagickWand *,unsigned long *,unsigned long *), - MagickGetImageMatte(MagickWand *), + unsigned long *) magick_attribute((deprecated)), + MagickGetImageExtrema(MagickWand *,unsigned long *,unsigned long *) + magick_attribute((deprecated)), + MagickGetImageMatte(MagickWand *) magick_attribute((deprecated)), MagickGetImagePixels(MagickWand *,const long,const long,const unsigned long, - const unsigned long,const char *,const StorageType,void *), - MagickMapImage(MagickWand *,const MagickWand *,const MagickBooleanType), + const unsigned long,const char *,const StorageType,void *) + magick_attribute((deprecated)), + MagickMapImage(MagickWand *,const MagickWand *,const MagickBooleanType) + magick_attribute((deprecated)), MagickMatteFloodfillImage(MagickWand *,const double,const double, - const PixelWand *,const long,const long), + const PixelWand *,const long,const long) magick_attribute((deprecated)), MagickOpaqueImage(MagickWand *,const PixelWand *,const PixelWand *, - const double), + const double) magick_attribute((deprecated)), MagickPaintFloodfillImage(MagickWand *,const ChannelType,const PixelWand *, - const double,const PixelWand *,const long,const long), + const double,const PixelWand *,const long,const long) + magick_attribute((deprecated)), MagickPaintOpaqueImage(MagickWand *,const PixelWand *,const PixelWand *, - const double), + const double) magick_attribute((deprecated)), MagickPaintOpaqueImageChannel(MagickWand *,const ChannelType, - const PixelWand *,const PixelWand *,const double), + const PixelWand *,const PixelWand *,const double) + magick_attribute((deprecated)), MagickPaintTransparentImage(MagickWand *,const PixelWand *,const double, - const double), - MagickSetImageAttribute(MagickWand *,const char *,const char *), - MagickSetImageIndex(MagickWand *,const long), - MagickSetImageOption(MagickWand *,const char *,const char *,const char *), + const double) magick_attribute((deprecated)), + MagickSetImageAttribute(MagickWand *,const char *,const char *) + magick_attribute((deprecated)), + MagickSetImageIndex(MagickWand *,const long) magick_attribute((deprecated)), + MagickSetImageOption(MagickWand *,const char *,const char *,const char *) + magick_attribute((deprecated)), MagickSetImagePixels(MagickWand *,const long,const long,const unsigned long, - const unsigned long,const char *,const StorageType,const void *), + const unsigned long,const char *,const StorageType,const void *) + magick_attribute((deprecated)), MagickTransparentImage(MagickWand *,const PixelWand *,const double, - const double); + const double) magick_attribute((deprecated)); extern WandExport MagickWand - *MagickFlattenImages(MagickWand *), - *MagickMosaicImages(MagickWand *), + *MagickFlattenImages(MagickWand *) magick_attribute((deprecated)), + *MagickMosaicImages(MagickWand *) magick_attribute((deprecated)), *MagickRegionOfInterestImage(MagickWand *,const unsigned long, - const unsigned long,const long,const long); + const unsigned long,const long,const long) magick_attribute((deprecated)); extern WandExport MagickSizeType - MagickGetImageSize(MagickWand *); + MagickGetImageSize(MagickWand *) magick_attribute((deprecated)); extern WandExport PixelWand - **PixelGetNextRow(PixelIterator *); + **PixelGetNextRow(PixelIterator *) magick_attribute((deprecated)); extern WandExport unsigned char - *MagickWriteImageBlob(MagickWand *,size_t *); + *MagickWriteImageBlob(MagickWand *,size_t *) magick_attribute((deprecated)); extern WandExport void - DrawPopGraphicContext(DrawingWand *), - DrawPushGraphicContext(DrawingWand *), - DrawSetFillAlpha(DrawingWand *,const double), - DrawSetStrokeAlpha(DrawingWand *,const double); + DrawPopGraphicContext(DrawingWand *) magick_attribute((deprecated)), + DrawPushGraphicContext(DrawingWand *) magick_attribute((deprecated)), + DrawSetFillAlpha(DrawingWand *,const double) magick_attribute((deprecated)), + DrawSetStrokeAlpha(DrawingWand *,const double) magick_attribute((deprecated)); #endif