blob: 31746b95925b5533617edf5788f67e9390118cb1 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
2 Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
7
8 http://www.imagemagick.org/script/license.php
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 MagickCore deprecated methods.
17*/
18#ifndef _MAGICKCORE_DEPRECATE_H
19#define _MAGICKCORE_DEPRECATE_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
26
27#include <stdarg.h>
28#include "magick/blob.h"
29#include "magick/cache-view.h"
30#include "magick/draw.h"
31#include "magick/constitute.h"
32#include "magick/magick-config.h"
33#include "magick/pixel.h"
34#include "magick/quantize.h"
35#include "magick/quantum.h"
36#include "magick/registry.h"
37#include "magick/semaphore.h"
38
39#if !defined(magick_attribute)
40# if !defined(__GNUC__)
41# define magick_attribute(x) /*nothing*/
42# else
43# define magick_attribute __attribute__
44# endif
45#endif
46
47#define Downscale(quantum) ScaleQuantumToChar(quantum)
48#define LABColorspace LabColorspace
49#define Intensity(color) PixelIntensityToQuantum(color)
50#define LiberateUniqueFileResource(resource) \
51 RelinquishUniqueFileResource(resource)
52#define LiberateMagickResource(resource) RelinquishMagickResource(resource)
53#define LiberateSemaphore(semaphore) RelinquishSemaphore(semaphore)
54#define QuantumDepth MAGICKCORE_QUANTUM_DEPTH
55#define RunlengthEncodedCompression RLECompression
56#define Upscale(value) ScaleCharToQuantum(value)
57#define XDownscale(value) ScaleShortToQuantum(value)
58#define XUpscale(quantum) ScaleQuantumToShort(quantum)
59
60typedef struct _DoublePixelPacket
61{
62 double
63 red,
64 green,
65 blue,
66 opacity,
67 index;
68} DoublePixelPacket;
69
70typedef enum
71{
72 UndefinedMagickLayerMethod
73} MagickLayerMethod;
74
75typedef MagickOffsetType ExtendedSignedIntegralType;
76typedef MagickSizeType ExtendedUnsignedIntegralType;
77typedef MagickRealType ExtendedRationalType;
78typedef struct _ViewInfo ViewInfo;
79
80typedef MagickBooleanType
81 (*MonitorHandler)(const char *,const MagickOffsetType,const MagickSizeType,
82 ExceptionInfo *);
83
84typedef struct _ImageAttribute
85{
86 char
87 *key,
88 *value;
89
90 MagickBooleanType
91 compression;
92
93 struct _ImageAttribute
94 *previous,
95 *next; /* deprecated */
96} ImageAttribute;
97
98extern MagickExport char
cristy0d82aa32009-09-22 18:51:31 +000099 *AllocateString(const char *) magick_attribute((deprecated)),
100 *InterpretImageAttributes(const ImageInfo *,Image *,const char *)
101 magick_attribute((deprecated)),
102 *PostscriptGeometry(const char *) magick_attribute((deprecated)),
103 *TranslateText(const ImageInfo *,Image *,const char *)
104 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000105
106extern MagickExport const ImageAttribute
107 *GetImageAttribute(const Image *,const char *),
cristy0d82aa32009-09-22 18:51:31 +0000108 *GetImageClippingPathAttribute(Image *) magick_attribute((deprecated)),
109 *GetNextImageAttribute(const Image *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000110
111extern MagickExport const IndexPacket
cristy0d82aa32009-09-22 18:51:31 +0000112 *AcquireCacheViewIndexes(const CacheView *) magick_attribute((deprecated)),
113 *AcquireIndexes(const Image *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000114
115extern MagickExport const PixelPacket
cristy0d82aa32009-09-22 18:51:31 +0000116 *AcquirePixels(const Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000117 *AcquireCacheViewPixels(const CacheView *,const long,const long,
cristy0d82aa32009-09-22 18:51:31 +0000118 const unsigned long,const unsigned long,ExceptionInfo *)
119 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000120 *AcquireImagePixels(const Image *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000121 const unsigned long,ExceptionInfo *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000122
123extern MagickExport Image
cristy0d82aa32009-09-22 18:51:31 +0000124 *AllocateImage(const ImageInfo *) magick_attribute((deprecated)),
125 *ExtractSubimageFromImage(Image *,const Image *,ExceptionInfo *)
126 magick_attribute((deprecated)),
127 *GetImageFromMagickRegistry(const char *,long *id,ExceptionInfo *)
128 magick_attribute((deprecated)),
129 *GetImageList(const Image *,const long,ExceptionInfo *)
130 magick_attribute((deprecated)),
131 *GetNextImage(const Image *) magick_attribute((deprecated)),
132 *GetPreviousImage(const Image *) magick_attribute((deprecated)),
133 *FlattenImages(Image *,ExceptionInfo *) magick_attribute((deprecated)),
134 *MosaicImages(Image *,ExceptionInfo *) magick_attribute((deprecated)),
135 *PopImageList(Image **) magick_attribute((deprecated)),
136 *ShiftImageList(Image **) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000137 *SpliceImageList(Image *,const long,const unsigned long,const Image *,
cristy0d82aa32009-09-22 18:51:31 +0000138 ExceptionInfo *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000139
140extern MagickExport IndexPacket
cristy0d82aa32009-09-22 18:51:31 +0000141 *GetCacheViewIndexes(CacheView *) magick_attribute((deprecated)),
142 *GetIndexes(const Image *) magick_attribute((deprecated)),
143 ValidateColormapIndex(Image *,const unsigned long)
144 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000145
146extern MagickExport int
cristy0d82aa32009-09-22 18:51:31 +0000147 GetImageGeometry(Image *,const char *,const unsigned int,RectangleInfo *)
148 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000149 ParseImageGeometry(const char *,long *,long *,unsigned long *,
cristy0d82aa32009-09-22 18:51:31 +0000150 unsigned long *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000151
152extern MagickExport long
cristy0d82aa32009-09-22 18:51:31 +0000153 GetImageListIndex(const Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000154 SetMagickRegistry(const RegistryType,const void *,const size_t,
cristy0d82aa32009-09-22 18:51:31 +0000155 ExceptionInfo *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000156
157extern MagickExport MagickBooleanType
158 AcquireOneCacheViewPixel(const CacheView *,const long,const long,
cristy0d82aa32009-09-22 18:51:31 +0000159 PixelPacket *,ExceptionInfo *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000160 AcquireOneCacheViewVirtualPixel(const CacheView *,const VirtualPixelMethod,
cristy0d82aa32009-09-22 18:51:31 +0000161 const long,const long,PixelPacket *,ExceptionInfo *)
162 magick_attribute((deprecated)),
163 AffinityImage(const QuantizeInfo *,Image *,const Image *)
164 magick_attribute((deprecated)),
165 AffinityImages(const QuantizeInfo *,Image *,const Image *)
166 magick_attribute((deprecated)),
167 AllocateImageColormap(Image *,const unsigned long)
168 magick_attribute((deprecated)),
169 ClipPathImage(Image *,const char *,const MagickBooleanType)
170 magick_attribute((deprecated)),
171 CloneImageAttributes(Image *,const Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000172 ColorFloodfillImage(Image *,const DrawInfo *,const PixelPacket,const long,
cristy0d82aa32009-09-22 18:51:31 +0000173 const long,const PaintMethod) magick_attribute((deprecated)),
174 DeleteImageAttribute(Image *,const char *) magick_attribute((deprecated)),
175 DeleteMagickRegistry(const long) magick_attribute((deprecated)),
176 DescribeImage(Image *,FILE *,const MagickBooleanType)
177 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000178 FormatImageAttribute(Image *,const char *,const char *,...)
cristy0d82aa32009-09-22 18:51:31 +0000179 magick_attribute((format (printf,3,4))) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000180 FormatImageAttributeList(Image *,const char *,const char *,va_list)
cristy0d82aa32009-09-22 18:51:31 +0000181 magick_attribute((format (printf,3,0))) magick_attribute((deprecated)),
182 FuzzyColorCompare(const Image *,const PixelPacket *,const PixelPacket *)
183 magick_attribute((deprecated)),
184 FuzzyOpacityCompare(const Image *,const PixelPacket *,const PixelPacket *)
185 magick_attribute((deprecated)),
cristy308b4e62009-09-21 14:40:44 +0000186 LevelImageColors(Image *,const ChannelType,const MagickPixelPacket *,
cristy0d82aa32009-09-22 18:51:31 +0000187 const MagickPixelPacket *, const MagickBooleanType)
188 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000189 MagickMonitor(const char *,const MagickOffsetType,const MagickSizeType,
cristy0d82aa32009-09-22 18:51:31 +0000190 void *) magick_attribute((deprecated)),
191 MapImage(Image *,const Image *,const MagickBooleanType)
192 magick_attribute((deprecated)),
193 MapImages(Image *,const Image *,const MagickBooleanType)
194 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000195 MatteFloodfillImage(Image *,const PixelPacket,const Quantum,const long,
cristy0d82aa32009-09-22 18:51:31 +0000196 const long,const PaintMethod) magick_attribute((deprecated)),
197 OpaqueImage(Image *,const PixelPacket,const PixelPacket)
198 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000199 PaintFloodfillImage(Image *,const ChannelType,const MagickPixelPacket *,
cristy0d82aa32009-09-22 18:51:31 +0000200 const long,const long,const DrawInfo *,const PaintMethod)
201 magick_attribute((deprecated)),
202 PaintOpaqueImage(Image *,const MagickPixelPacket *,const MagickPixelPacket *)
203 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000204 PaintOpaqueImageChannel(Image *,const ChannelType,const MagickPixelPacket *,
cristy0d82aa32009-09-22 18:51:31 +0000205 const MagickPixelPacket *) magick_attribute((deprecated)),
206 PaintTransparentImage(Image *,const MagickPixelPacket *,const Quantum)
207 magick_attribute((deprecated)),
208 SetExceptionInfo(ExceptionInfo *,ExceptionType)
209 magick_attribute((deprecated)),
210 SetImageAttribute(Image *,const char *,const char *)
211 magick_attribute((deprecated)),
212 SyncCacheViewPixels(CacheView *) magick_attribute((deprecated)),
213 SyncImagePixels(Image *) magick_attribute((deprecated)),
214 TransparentImage(Image *,const PixelPacket,const Quantum)
215 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000216
217extern MagickExport MagickPixelPacket
cristy0d82aa32009-09-22 18:51:31 +0000218 AcquireOneMagickPixel(const Image *,const long,const long,ExceptionInfo *)
219 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000220
221extern MagickExport MonitorHandler
cristy0d82aa32009-09-22 18:51:31 +0000222 GetMonitorHandler(void) magick_attribute((deprecated)),
223 SetMonitorHandler(MonitorHandler) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000224
225extern MagickExport MagickOffsetType
cristy0d82aa32009-09-22 18:51:31 +0000226 SizeBlob(Image *image) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000227
228extern MagickExport MagickPixelPacket
229 InterpolatePixelColor(const Image *,CacheView *,const InterpolatePixelMethod,
cristy0d82aa32009-09-22 18:51:31 +0000230 const double,const double,ExceptionInfo *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000231
232extern MagickExport MagickStatusType
cristy0d82aa32009-09-22 18:51:31 +0000233 ParseSizeGeometry(const Image *,const char *,RectangleInfo *)
234 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000235
236extern MagickExport PixelPacket
cristy0d82aa32009-09-22 18:51:31 +0000237 AcquireOnePixel(const Image *,const long,const long,ExceptionInfo *)
238 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000239 AcquireOneVirtualPixel(const Image *,const VirtualPixelMethod,const long,
cristy0d82aa32009-09-22 18:51:31 +0000240 const long,ExceptionInfo *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000241 *GetCacheView(CacheView *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000242 const unsigned long) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000243 *GetCacheViewPixels(CacheView *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000244 const unsigned long) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000245 *GetImagePixels(Image *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000246 const unsigned long) magick_attribute((deprecated)),
247 GetOnePixel(Image *,const long,const long) magick_attribute((deprecated)),
248 *GetPixels(const Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000249 *SetCacheViewPixels(CacheView *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000250 const unsigned long) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000251 *SetImagePixels(Image *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000252 const unsigned long) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000253
254extern MagickExport size_t
cristy0d82aa32009-09-22 18:51:31 +0000255 PopImagePixels(Image *,const QuantumType,unsigned char *)
256 magick_attribute((deprecated)),
257 PushImagePixels(Image *,const QuantumType,const unsigned char *)
258 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000259
260extern MagickExport unsigned int
cristy0d82aa32009-09-22 18:51:31 +0000261 ChannelImage(Image *,const ChannelType) magick_attribute((deprecated)),
262 ChannelThresholdImage(Image *,const char *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000263 DispatchImage(const Image *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000264 const unsigned long,const char *,const StorageType,void *,ExceptionInfo *)
265 magick_attribute((deprecated)),
266 FuzzyColorMatch(const PixelPacket *,const PixelPacket *,const double)
267 magick_attribute((deprecated)),
268 GetNumberScenes(const Image *) magick_attribute((deprecated)),
269 GetMagickGeometry(const char *,long *,long *,unsigned long *,unsigned long *)
270 magick_attribute((deprecated)),
271 IsSubimage(const char *,const unsigned int) magick_attribute((deprecated)),
272 PushImageList(Image **,const Image *,ExceptionInfo *)
273 magick_attribute((deprecated)),
274 QuantizationError(Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000275 RandomChannelThresholdImage(Image *,const char *,const char *,
cristy0d82aa32009-09-22 18:51:31 +0000276 ExceptionInfo *) magick_attribute((deprecated)),
277 SetImageList(Image **,const Image *,const long,ExceptionInfo *)
278 magick_attribute((deprecated)),
279 TransformColorspace(Image *,const ColorspaceType)
280 magick_attribute((deprecated)),
281 ThresholdImage(Image *,const double) magick_attribute((deprecated)),
282 ThresholdImageChannel(Image *,const char *) magick_attribute((deprecated)),
283 UnshiftImageList(Image **,const Image *,ExceptionInfo *)
284 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000285
286extern MagickExport unsigned long
cristy0d82aa32009-09-22 18:51:31 +0000287 GetImageListSize(const Image *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000288
289extern MagickExport CacheView
cristy0d82aa32009-09-22 18:51:31 +0000290 *CloseCacheView(CacheView *) magick_attribute((deprecated)),
291 *OpenCacheView(const Image *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000292
293extern MagickExport void
cristy0d82aa32009-09-22 18:51:31 +0000294 *AcquireMemory(const size_t) magick_attribute((deprecated)),
295 AllocateNextImage(const ImageInfo *,Image *) magick_attribute((deprecated)),
296 *CloneMemory(void *,const void *,const size_t) magick_attribute((deprecated)),
297 DestroyImageAttributes(Image *) magick_attribute((deprecated)),
298 DestroyImages(Image *) magick_attribute((deprecated)),
299 DestroyMagick(void) magick_attribute((deprecated)),
300 DestroyMagickRegistry(void) magick_attribute((deprecated)),
301 *GetConfigureBlob(const char *,char *,size_t *,ExceptionInfo *)
302 magick_attribute((deprecated)),
303 *GetMagickRegistry(const long,RegistryType *,size_t *,ExceptionInfo *)
304 magick_attribute((deprecated)),
305 IdentityAffine(AffineMatrix *) magick_attribute((deprecated)),
306 LiberateMemory(void **) magick_attribute((deprecated)),
307 LiberateSemaphoreInfo(SemaphoreInfo **) magick_attribute((deprecated)),
308 FormatString(char *,const char *,...) magick_attribute((format (printf,2,3)))
309 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000310 FormatStringList(char *,const char *,va_list)
cristy0d82aa32009-09-22 18:51:31 +0000311 magick_attribute((format (printf,2,0))) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000312 HSLTransform(const double,const double,const double,Quantum *,Quantum *,
cristy0d82aa32009-09-22 18:51:31 +0000313 Quantum *) magick_attribute((deprecated)),
314 InitializeMagick(const char *) magick_attribute((deprecated)),
315 ReacquireMemory(void **,const size_t) magick_attribute((deprecated)),
316 ResetImageAttributeIterator(const Image *) magick_attribute((deprecated)),
317 SetCacheThreshold(const unsigned long) magick_attribute((deprecated)),
318 SetImage(Image *,const Quantum) magick_attribute((deprecated)),
319 Strip(char *) magick_attribute((deprecated)),
320 TemporaryFilename(char *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000321 TransformHSL(const Quantum,const Quantum,const Quantum,double *,double *,
cristy0d82aa32009-09-22 18:51:31 +0000322 double *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000323#endif
324
325#if defined(__cplusplus) || defined(c_plusplus)
326}
327#endif
328
329#endif