From 0d82aa3a262f2106ef607f76d816b12eb73eeec8 Mon Sep 17 00:00:00 2001 From: cristy Date: Tue, 22 Sep 2009 18:51:31 +0000 Subject: [PATCH] --- magick/deprecate.c | 24 ++-- magick/deprecate.h | 275 ++++++++++++++++++++++++++------------------- magick/image.c | 3 - 3 files changed, 167 insertions(+), 135 deletions(-) diff --git a/magick/deprecate.c b/magick/deprecate.c index a63ff1f44..752dc47dc 100644 --- a/magick/deprecate.c +++ b/magick/deprecate.c @@ -1814,7 +1814,7 @@ MagickExport MagickBooleanType FormatImageAttributeList(Image *image, #endif if (n < 0) value[MaxTextExtent-1]='\0'; - return(SetImageAttribute(image,key,value)); + return(SetImageProperty(image,key,value)); } MagickExport MagickBooleanType FormatImageAttribute(Image *image, @@ -1827,7 +1827,7 @@ MagickExport MagickBooleanType FormatImageAttribute(Image *image, operands; va_start(operands,format); - status=FormatImageAttributeList(image,key,format,operands); + status=FormatImagePropertyList(image,key,format,operands); va_end(operands); return(status); } @@ -1881,7 +1881,7 @@ MagickExport void FormatString(char *string,const char *format,...) operands; va_start(operands,format); - FormatStringList(string,format,operands); + FormatMagickStringList(string,MaxTextExtent,format,operands); va_end(operands); return; } @@ -3787,7 +3787,7 @@ MagickExport void LiberateSemaphoreInfo(SemaphoreInfo **semaphore_info) MagickExport void MagickIncarnate(const char *path) { (void) LogMagickEvent(DeprecateEvent,GetMagickModule(),"last use: v5.5.1"); - InitializeMagick(path); + MagickCoreGenesis(path,MagickFalse); } /* @@ -4484,7 +4484,11 @@ MagickExport MagickBooleanType PaintFloodfillImage(Image *image, MagickExport MagickBooleanType PaintOpaqueImage(Image *image, const MagickPixelPacket *target,const MagickPixelPacket *fill) { - return(PaintOpaqueImageChannel(image,DefaultChannels,target,fill)); + MagickBooleanType + status; + + status=OpaquePaintImageChannel(image,DefaultChannels,target,fill,MagickFalse); + return(status); } MagickExport MagickBooleanType PaintOpaqueImageChannel(Image *image, @@ -4910,9 +4914,6 @@ MagickExport unsigned int RandomChannelThresholdImage(Image *image,const char 1.2f, 0.4f, 0.9f, 1.3f, 0.2f}, threshold=128; - unsigned int - status; - unsigned long order; @@ -5050,13 +5051,6 @@ MagickExport unsigned int RandomChannelThresholdImage(Image *image,const char } if (SyncAuthenticPixels(image,exception) == MagickFalse) break; - if (QuantumTick(y,image->rows) != MagickFalse) - { - status=MagickMonitor(RandomChannelThresholdImageText,y,image->rows, - exception); - if (status == MagickFalse) - break; - } } random_info=DestroyRandomInfo(random_info); return(MagickTrue); diff --git a/magick/deprecate.h b/magick/deprecate.h index fac6a9082..31746b959 100644 --- a/magick/deprecate.h +++ b/magick/deprecate.h @@ -96,189 +96,230 @@ typedef struct _ImageAttribute } ImageAttribute; extern MagickExport char - *AllocateString(const char *), - *InterpretImageAttributes(const ImageInfo *,Image *,const char *), - *PostscriptGeometry(const char *), - *TranslateText(const ImageInfo *,Image *,const char *); + *AllocateString(const char *) magick_attribute((deprecated)), + *InterpretImageAttributes(const ImageInfo *,Image *,const char *) + magick_attribute((deprecated)), + *PostscriptGeometry(const char *) magick_attribute((deprecated)), + *TranslateText(const ImageInfo *,Image *,const char *) + magick_attribute((deprecated)); extern MagickExport const ImageAttribute *GetImageAttribute(const Image *,const char *), - *GetImageClippingPathAttribute(Image *), - *GetNextImageAttribute(const Image *); + *GetImageClippingPathAttribute(Image *) magick_attribute((deprecated)), + *GetNextImageAttribute(const Image *) magick_attribute((deprecated)); extern MagickExport const IndexPacket - *AcquireCacheViewIndexes(const CacheView *), - *AcquireIndexes(const Image *); + *AcquireCacheViewIndexes(const CacheView *) magick_attribute((deprecated)), + *AcquireIndexes(const Image *) magick_attribute((deprecated)); extern MagickExport const PixelPacket - *AcquirePixels(const Image *), + *AcquirePixels(const Image *) magick_attribute((deprecated)), *AcquireCacheViewPixels(const CacheView *,const long,const long, - const unsigned long,const unsigned long,ExceptionInfo *), + const unsigned long,const unsigned long,ExceptionInfo *) + magick_attribute((deprecated)), *AcquireImagePixels(const Image *,const long,const long,const unsigned long, - const unsigned long,ExceptionInfo *); + const unsigned long,ExceptionInfo *) magick_attribute((deprecated)); extern MagickExport Image - *AllocateImage(const ImageInfo *), - *ExtractSubimageFromImage(Image *,const Image *,ExceptionInfo *), - *GetImageFromMagickRegistry(const char *,long *id,ExceptionInfo *), - *GetImageList(const Image *,const long,ExceptionInfo *), - *GetNextImage(const Image *), - *GetPreviousImage(const Image *), - *FlattenImages(Image *,ExceptionInfo *), - *MosaicImages(Image *,ExceptionInfo *), - *PopImageList(Image **), - *ShiftImageList(Image **), + *AllocateImage(const ImageInfo *) magick_attribute((deprecated)), + *ExtractSubimageFromImage(Image *,const Image *,ExceptionInfo *) + magick_attribute((deprecated)), + *GetImageFromMagickRegistry(const char *,long *id,ExceptionInfo *) + magick_attribute((deprecated)), + *GetImageList(const Image *,const long,ExceptionInfo *) + magick_attribute((deprecated)), + *GetNextImage(const Image *) magick_attribute((deprecated)), + *GetPreviousImage(const Image *) magick_attribute((deprecated)), + *FlattenImages(Image *,ExceptionInfo *) magick_attribute((deprecated)), + *MosaicImages(Image *,ExceptionInfo *) magick_attribute((deprecated)), + *PopImageList(Image **) magick_attribute((deprecated)), + *ShiftImageList(Image **) magick_attribute((deprecated)), *SpliceImageList(Image *,const long,const unsigned long,const Image *, - ExceptionInfo *); + ExceptionInfo *) magick_attribute((deprecated)); extern MagickExport IndexPacket - *GetCacheViewIndexes(CacheView *), - *GetIndexes(const Image *), - ValidateColormapIndex(Image *,const unsigned long); + *GetCacheViewIndexes(CacheView *) magick_attribute((deprecated)), + *GetIndexes(const Image *) magick_attribute((deprecated)), + ValidateColormapIndex(Image *,const unsigned long) + magick_attribute((deprecated)); extern MagickExport int - GetImageGeometry(Image *,const char *,const unsigned int,RectangleInfo *), + GetImageGeometry(Image *,const char *,const unsigned int,RectangleInfo *) + magick_attribute((deprecated)), ParseImageGeometry(const char *,long *,long *,unsigned long *, - unsigned long *); + unsigned long *) magick_attribute((deprecated)); extern MagickExport long - GetImageListIndex(const Image *), + GetImageListIndex(const Image *) magick_attribute((deprecated)), SetMagickRegistry(const RegistryType,const void *,const size_t, - ExceptionInfo *); + ExceptionInfo *) magick_attribute((deprecated)); extern MagickExport MagickBooleanType AcquireOneCacheViewPixel(const CacheView *,const long,const long, - PixelPacket *,ExceptionInfo *), + PixelPacket *,ExceptionInfo *) magick_attribute((deprecated)), AcquireOneCacheViewVirtualPixel(const CacheView *,const VirtualPixelMethod, - const long,const long,PixelPacket *,ExceptionInfo *), - AffinityImage(const QuantizeInfo *,Image *,const Image *), - AffinityImages(const QuantizeInfo *,Image *,const Image *), - AllocateImageColormap(Image *,const unsigned long), - ClipPathImage(Image *,const char *,const MagickBooleanType), - CloneImageAttributes(Image *,const Image *), + const long,const long,PixelPacket *,ExceptionInfo *) + magick_attribute((deprecated)), + AffinityImage(const QuantizeInfo *,Image *,const Image *) + magick_attribute((deprecated)), + AffinityImages(const QuantizeInfo *,Image *,const Image *) + magick_attribute((deprecated)), + AllocateImageColormap(Image *,const unsigned long) + magick_attribute((deprecated)), + ClipPathImage(Image *,const char *,const MagickBooleanType) + magick_attribute((deprecated)), + CloneImageAttributes(Image *,const Image *) magick_attribute((deprecated)), ColorFloodfillImage(Image *,const DrawInfo *,const PixelPacket,const long, - const long,const PaintMethod), - DeleteImageAttribute(Image *,const char *), - DeleteMagickRegistry(const long), - DescribeImage(Image *,FILE *,const MagickBooleanType), + const long,const PaintMethod) magick_attribute((deprecated)), + DeleteImageAttribute(Image *,const char *) magick_attribute((deprecated)), + DeleteMagickRegistry(const long) magick_attribute((deprecated)), + DescribeImage(Image *,FILE *,const MagickBooleanType) + magick_attribute((deprecated)), FormatImageAttribute(Image *,const char *,const char *,...) - magick_attribute((format (printf,3,4))), + magick_attribute((format (printf,3,4))) magick_attribute((deprecated)), FormatImageAttributeList(Image *,const char *,const char *,va_list) - magick_attribute((format (printf,3,0))), - FuzzyColorCompare(const Image *,const PixelPacket *,const PixelPacket *), - FuzzyOpacityCompare(const Image *,const PixelPacket *,const PixelPacket *), + magick_attribute((format (printf,3,0))) magick_attribute((deprecated)), + FuzzyColorCompare(const Image *,const PixelPacket *,const PixelPacket *) + magick_attribute((deprecated)), + FuzzyOpacityCompare(const Image *,const PixelPacket *,const PixelPacket *) + magick_attribute((deprecated)), LevelImageColors(Image *,const ChannelType,const MagickPixelPacket *, - const MagickPixelPacket *, const MagickBooleanType), + const MagickPixelPacket *, const MagickBooleanType) + magick_attribute((deprecated)), MagickMonitor(const char *,const MagickOffsetType,const MagickSizeType, - void *), - MapImage(Image *,const Image *,const MagickBooleanType), - MapImages(Image *,const Image *,const MagickBooleanType), + void *) magick_attribute((deprecated)), + MapImage(Image *,const Image *,const MagickBooleanType) + magick_attribute((deprecated)), + MapImages(Image *,const Image *,const MagickBooleanType) + magick_attribute((deprecated)), MatteFloodfillImage(Image *,const PixelPacket,const Quantum,const long, - const long,const PaintMethod), - OpaqueImage(Image *,const PixelPacket,const PixelPacket), + const long,const PaintMethod) magick_attribute((deprecated)), + OpaqueImage(Image *,const PixelPacket,const PixelPacket) + magick_attribute((deprecated)), PaintFloodfillImage(Image *,const ChannelType,const MagickPixelPacket *, - const long,const long,const DrawInfo *,const PaintMethod), - PaintOpaqueImage(Image *,const MagickPixelPacket *,const MagickPixelPacket *), + const long,const long,const DrawInfo *,const PaintMethod) + magick_attribute((deprecated)), + PaintOpaqueImage(Image *,const MagickPixelPacket *,const MagickPixelPacket *) + magick_attribute((deprecated)), PaintOpaqueImageChannel(Image *,const ChannelType,const MagickPixelPacket *, - const MagickPixelPacket *), - PaintTransparentImage(Image *,const MagickPixelPacket *,const Quantum), - SetExceptionInfo(ExceptionInfo *,ExceptionType), - SetImageAttribute(Image *,const char *,const char *), - SyncCacheViewPixels(CacheView *), - SyncImagePixels(Image *), - TransparentImage(Image *,const PixelPacket,const Quantum); + const MagickPixelPacket *) magick_attribute((deprecated)), + PaintTransparentImage(Image *,const MagickPixelPacket *,const Quantum) + magick_attribute((deprecated)), + SetExceptionInfo(ExceptionInfo *,ExceptionType) + magick_attribute((deprecated)), + SetImageAttribute(Image *,const char *,const char *) + magick_attribute((deprecated)), + SyncCacheViewPixels(CacheView *) magick_attribute((deprecated)), + SyncImagePixels(Image *) magick_attribute((deprecated)), + TransparentImage(Image *,const PixelPacket,const Quantum) + magick_attribute((deprecated)); extern MagickExport MagickPixelPacket - AcquireOneMagickPixel(const Image *,const long,const long,ExceptionInfo *); + AcquireOneMagickPixel(const Image *,const long,const long,ExceptionInfo *) + magick_attribute((deprecated)); extern MagickExport MonitorHandler - GetMonitorHandler(void), - SetMonitorHandler(MonitorHandler); + GetMonitorHandler(void) magick_attribute((deprecated)), + SetMonitorHandler(MonitorHandler) magick_attribute((deprecated)); extern MagickExport MagickOffsetType - SizeBlob(Image *image); + SizeBlob(Image *image) magick_attribute((deprecated)); extern MagickExport MagickPixelPacket InterpolatePixelColor(const Image *,CacheView *,const InterpolatePixelMethod, - const double,const double,ExceptionInfo *); + const double,const double,ExceptionInfo *) magick_attribute((deprecated)); extern MagickExport MagickStatusType - ParseSizeGeometry(const Image *,const char *,RectangleInfo *); + ParseSizeGeometry(const Image *,const char *,RectangleInfo *) + magick_attribute((deprecated)); extern MagickExport PixelPacket - AcquireOnePixel(const Image *,const long,const long,ExceptionInfo *), + AcquireOnePixel(const Image *,const long,const long,ExceptionInfo *) + magick_attribute((deprecated)), AcquireOneVirtualPixel(const Image *,const VirtualPixelMethod,const long, - const long,ExceptionInfo *), + const long,ExceptionInfo *) magick_attribute((deprecated)), *GetCacheView(CacheView *,const long,const long,const unsigned long, - const unsigned long), + const unsigned long) magick_attribute((deprecated)), *GetCacheViewPixels(CacheView *,const long,const long,const unsigned long, - const unsigned long), + const unsigned long) magick_attribute((deprecated)), *GetImagePixels(Image *,const long,const long,const unsigned long, - const unsigned long), - GetOnePixel(Image *,const long,const long), - *GetPixels(const Image *), + const unsigned long) magick_attribute((deprecated)), + GetOnePixel(Image *,const long,const long) magick_attribute((deprecated)), + *GetPixels(const Image *) magick_attribute((deprecated)), *SetCacheViewPixels(CacheView *,const long,const long,const unsigned long, - const unsigned long), + const unsigned long) magick_attribute((deprecated)), *SetImagePixels(Image *,const long,const long,const unsigned long, - const unsigned long); + const unsigned long) magick_attribute((deprecated)); extern MagickExport size_t - PopImagePixels(Image *,const QuantumType,unsigned char *), - PushImagePixels(Image *,const QuantumType,const unsigned char *); + PopImagePixels(Image *,const QuantumType,unsigned char *) + magick_attribute((deprecated)), + PushImagePixels(Image *,const QuantumType,const unsigned char *) + magick_attribute((deprecated)); extern MagickExport unsigned int - ChannelImage(Image *,const ChannelType), - ChannelThresholdImage(Image *,const char *), + ChannelImage(Image *,const ChannelType) magick_attribute((deprecated)), + ChannelThresholdImage(Image *,const char *) magick_attribute((deprecated)), DispatchImage(const Image *,const long,const long,const unsigned long, - const unsigned long,const char *,const StorageType,void *,ExceptionInfo *), - FuzzyColorMatch(const PixelPacket *,const PixelPacket *,const double), - GetNumberScenes(const Image *), - GetMagickGeometry(const char *,long *,long *,unsigned long *,unsigned long *), - IsSubimage(const char *,const unsigned int), - PushImageList(Image **,const Image *,ExceptionInfo *), - QuantizationError(Image *), + const unsigned long,const char *,const StorageType,void *,ExceptionInfo *) + magick_attribute((deprecated)), + FuzzyColorMatch(const PixelPacket *,const PixelPacket *,const double) + magick_attribute((deprecated)), + GetNumberScenes(const Image *) magick_attribute((deprecated)), + GetMagickGeometry(const char *,long *,long *,unsigned long *,unsigned long *) + magick_attribute((deprecated)), + IsSubimage(const char *,const unsigned int) magick_attribute((deprecated)), + PushImageList(Image **,const Image *,ExceptionInfo *) + magick_attribute((deprecated)), + QuantizationError(Image *) magick_attribute((deprecated)), RandomChannelThresholdImage(Image *,const char *,const char *, - ExceptionInfo *), - SetImageList(Image **,const Image *,const long,ExceptionInfo *), - TransformColorspace(Image *,const ColorspaceType), - ThresholdImage(Image *,const double), - ThresholdImageChannel(Image *,const char *), - UnshiftImageList(Image **,const Image *,ExceptionInfo *); + ExceptionInfo *) magick_attribute((deprecated)), + SetImageList(Image **,const Image *,const long,ExceptionInfo *) + magick_attribute((deprecated)), + TransformColorspace(Image *,const ColorspaceType) + magick_attribute((deprecated)), + ThresholdImage(Image *,const double) magick_attribute((deprecated)), + ThresholdImageChannel(Image *,const char *) magick_attribute((deprecated)), + UnshiftImageList(Image **,const Image *,ExceptionInfo *) + magick_attribute((deprecated)); extern MagickExport unsigned long - GetImageListSize(const Image *); + GetImageListSize(const Image *) magick_attribute((deprecated)); extern MagickExport CacheView - *CloseCacheView(CacheView *), - *OpenCacheView(const Image *); + *CloseCacheView(CacheView *) magick_attribute((deprecated)), + *OpenCacheView(const Image *) magick_attribute((deprecated)); extern MagickExport void - *AcquireMemory(const size_t), - AllocateNextImage(const ImageInfo *,Image *), - *CloneMemory(void *,const void *,const size_t), - DestroyImageAttributes(Image *), - DestroyImages(Image *), - DestroyMagick(void), - DestroyMagickRegistry(void), - *GetConfigureBlob(const char *,char *,size_t *,ExceptionInfo *), - *GetMagickRegistry(const long,RegistryType *,size_t *,ExceptionInfo *), - IdentityAffine(AffineMatrix *), - LiberateMemory(void **), - LiberateSemaphoreInfo(SemaphoreInfo **), - FormatString(char *,const char *,...) magick_attribute((format (printf,2,3))), + *AcquireMemory(const size_t) magick_attribute((deprecated)), + AllocateNextImage(const ImageInfo *,Image *) magick_attribute((deprecated)), + *CloneMemory(void *,const void *,const size_t) magick_attribute((deprecated)), + DestroyImageAttributes(Image *) magick_attribute((deprecated)), + DestroyImages(Image *) magick_attribute((deprecated)), + DestroyMagick(void) magick_attribute((deprecated)), + DestroyMagickRegistry(void) magick_attribute((deprecated)), + *GetConfigureBlob(const char *,char *,size_t *,ExceptionInfo *) + magick_attribute((deprecated)), + *GetMagickRegistry(const long,RegistryType *,size_t *,ExceptionInfo *) + magick_attribute((deprecated)), + IdentityAffine(AffineMatrix *) magick_attribute((deprecated)), + LiberateMemory(void **) magick_attribute((deprecated)), + LiberateSemaphoreInfo(SemaphoreInfo **) magick_attribute((deprecated)), + FormatString(char *,const char *,...) magick_attribute((format (printf,2,3))) + magick_attribute((deprecated)), FormatStringList(char *,const char *,va_list) - magick_attribute((format (printf,2,0))), + magick_attribute((format (printf,2,0))) magick_attribute((deprecated)), HSLTransform(const double,const double,const double,Quantum *,Quantum *, - Quantum *), - InitializeMagick(const char *), - ReacquireMemory(void **,const size_t), - ResetImageAttributeIterator(const Image *), - SetCacheThreshold(const unsigned long), - SetImage(Image *,const Quantum), - Strip(char *), - TemporaryFilename(char *), + Quantum *) magick_attribute((deprecated)), + InitializeMagick(const char *) magick_attribute((deprecated)), + ReacquireMemory(void **,const size_t) magick_attribute((deprecated)), + ResetImageAttributeIterator(const Image *) magick_attribute((deprecated)), + SetCacheThreshold(const unsigned long) magick_attribute((deprecated)), + SetImage(Image *,const Quantum) magick_attribute((deprecated)), + Strip(char *) magick_attribute((deprecated)), + TemporaryFilename(char *) magick_attribute((deprecated)), TransformHSL(const Quantum,const Quantum,const Quantum,double *,double *, - double *); + double *) magick_attribute((deprecated)); #endif #if defined(__cplusplus) || defined(c_plusplus) diff --git a/magick/image.c b/magick/image.c index 959a25cc2..798df47e4 100644 --- a/magick/image.c +++ b/magick/image.c @@ -1287,9 +1287,6 @@ MagickExport Image *DestroyImage(Image *image) image->colormap=(PixelPacket *) RelinquishMagickMemory(image->colormap); if (image->geometry != (char *) NULL) image->geometry=DestroyString(image->geometry); -#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) - DestroyImageAttributes(image); -#endif DestroyImageProfiles(image); DestroyImageProperties(image); DestroyImageArtifacts(image); -- 2.40.0