blob: 3d7af6e48a4eee15fb380a8969e182a7ba2bb0d1 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
cristy16af1cb2009-12-11 21:38:29 +00002 Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 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
cristy3ed852e2009-09-05 21:47:34 +000060typedef enum
61{
62 UndefinedMagickLayerMethod
63} MagickLayerMethod;
64
65typedef MagickOffsetType ExtendedSignedIntegralType;
66typedef MagickSizeType ExtendedUnsignedIntegralType;
67typedef MagickRealType ExtendedRationalType;
68typedef struct _ViewInfo ViewInfo;
69
70typedef MagickBooleanType
71 (*MonitorHandler)(const char *,const MagickOffsetType,const MagickSizeType,
72 ExceptionInfo *);
73
74typedef struct _ImageAttribute
75{
76 char
77 *key,
78 *value;
79
80 MagickBooleanType
81 compression;
82
83 struct _ImageAttribute
84 *previous,
85 *next; /* deprecated */
86} ImageAttribute;
87
88extern MagickExport char
cristy0d82aa32009-09-22 18:51:31 +000089 *AllocateString(const char *) magick_attribute((deprecated)),
90 *InterpretImageAttributes(const ImageInfo *,Image *,const char *)
91 magick_attribute((deprecated)),
92 *PostscriptGeometry(const char *) magick_attribute((deprecated)),
93 *TranslateText(const ImageInfo *,Image *,const char *)
94 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +000095
96extern MagickExport const ImageAttribute
97 *GetImageAttribute(const Image *,const char *),
cristy0d82aa32009-09-22 18:51:31 +000098 *GetImageClippingPathAttribute(Image *) magick_attribute((deprecated)),
99 *GetNextImageAttribute(const Image *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000100
101extern MagickExport const IndexPacket
cristy0d82aa32009-09-22 18:51:31 +0000102 *AcquireCacheViewIndexes(const CacheView *) magick_attribute((deprecated)),
103 *AcquireIndexes(const Image *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000104
105extern MagickExport const PixelPacket
cristy0d82aa32009-09-22 18:51:31 +0000106 *AcquirePixels(const Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000107 *AcquireCacheViewPixels(const CacheView *,const long,const long,
cristy0d82aa32009-09-22 18:51:31 +0000108 const unsigned long,const unsigned long,ExceptionInfo *)
109 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000110 *AcquireImagePixels(const Image *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000111 const unsigned long,ExceptionInfo *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000112
113extern MagickExport Image
cristy0d82aa32009-09-22 18:51:31 +0000114 *AllocateImage(const ImageInfo *) magick_attribute((deprecated)),
115 *ExtractSubimageFromImage(Image *,const Image *,ExceptionInfo *)
116 magick_attribute((deprecated)),
117 *GetImageFromMagickRegistry(const char *,long *id,ExceptionInfo *)
118 magick_attribute((deprecated)),
119 *GetImageList(const Image *,const long,ExceptionInfo *)
120 magick_attribute((deprecated)),
121 *GetNextImage(const Image *) magick_attribute((deprecated)),
122 *GetPreviousImage(const Image *) magick_attribute((deprecated)),
123 *FlattenImages(Image *,ExceptionInfo *) magick_attribute((deprecated)),
124 *MosaicImages(Image *,ExceptionInfo *) magick_attribute((deprecated)),
125 *PopImageList(Image **) magick_attribute((deprecated)),
126 *ShiftImageList(Image **) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000127 *SpliceImageList(Image *,const long,const unsigned long,const Image *,
cristy0d82aa32009-09-22 18:51:31 +0000128 ExceptionInfo *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000129
130extern MagickExport IndexPacket
cristy0d82aa32009-09-22 18:51:31 +0000131 *GetCacheViewIndexes(CacheView *) magick_attribute((deprecated)),
132 *GetIndexes(const Image *) magick_attribute((deprecated)),
133 ValidateColormapIndex(Image *,const unsigned long)
134 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000135
136extern MagickExport int
cristy0d82aa32009-09-22 18:51:31 +0000137 GetImageGeometry(Image *,const char *,const unsigned int,RectangleInfo *)
138 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000139 ParseImageGeometry(const char *,long *,long *,unsigned long *,
cristy0d82aa32009-09-22 18:51:31 +0000140 unsigned long *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000141
142extern MagickExport long
cristy0d82aa32009-09-22 18:51:31 +0000143 GetImageListIndex(const Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000144 SetMagickRegistry(const RegistryType,const void *,const size_t,
cristy0d82aa32009-09-22 18:51:31 +0000145 ExceptionInfo *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000146
147extern MagickExport MagickBooleanType
148 AcquireOneCacheViewPixel(const CacheView *,const long,const long,
cristy0d82aa32009-09-22 18:51:31 +0000149 PixelPacket *,ExceptionInfo *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000150 AcquireOneCacheViewVirtualPixel(const CacheView *,const VirtualPixelMethod,
cristy0d82aa32009-09-22 18:51:31 +0000151 const long,const long,PixelPacket *,ExceptionInfo *)
152 magick_attribute((deprecated)),
153 AffinityImage(const QuantizeInfo *,Image *,const Image *)
154 magick_attribute((deprecated)),
155 AffinityImages(const QuantizeInfo *,Image *,const Image *)
156 magick_attribute((deprecated)),
157 AllocateImageColormap(Image *,const unsigned long)
158 magick_attribute((deprecated)),
159 ClipPathImage(Image *,const char *,const MagickBooleanType)
160 magick_attribute((deprecated)),
161 CloneImageAttributes(Image *,const Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000162 ColorFloodfillImage(Image *,const DrawInfo *,const PixelPacket,const long,
cristy0d82aa32009-09-22 18:51:31 +0000163 const long,const PaintMethod) magick_attribute((deprecated)),
164 DeleteImageAttribute(Image *,const char *) magick_attribute((deprecated)),
165 DeleteMagickRegistry(const long) magick_attribute((deprecated)),
166 DescribeImage(Image *,FILE *,const MagickBooleanType)
167 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000168 FormatImageAttribute(Image *,const char *,const char *,...)
cristy0d82aa32009-09-22 18:51:31 +0000169 magick_attribute((format (printf,3,4))) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000170 FormatImageAttributeList(Image *,const char *,const char *,va_list)
cristy0d82aa32009-09-22 18:51:31 +0000171 magick_attribute((format (printf,3,0))) magick_attribute((deprecated)),
172 FuzzyColorCompare(const Image *,const PixelPacket *,const PixelPacket *)
173 magick_attribute((deprecated)),
174 FuzzyOpacityCompare(const Image *,const PixelPacket *,const PixelPacket *)
175 magick_attribute((deprecated)),
cristy308b4e62009-09-21 14:40:44 +0000176 LevelImageColors(Image *,const ChannelType,const MagickPixelPacket *,
cristy0d82aa32009-09-22 18:51:31 +0000177 const MagickPixelPacket *, const MagickBooleanType)
178 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000179 MagickMonitor(const char *,const MagickOffsetType,const MagickSizeType,
cristy0d82aa32009-09-22 18:51:31 +0000180 void *) magick_attribute((deprecated)),
181 MapImage(Image *,const Image *,const MagickBooleanType)
182 magick_attribute((deprecated)),
183 MapImages(Image *,const Image *,const MagickBooleanType)
184 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000185 MatteFloodfillImage(Image *,const PixelPacket,const Quantum,const long,
cristy0d82aa32009-09-22 18:51:31 +0000186 const long,const PaintMethod) magick_attribute((deprecated)),
187 OpaqueImage(Image *,const PixelPacket,const PixelPacket)
188 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000189 PaintFloodfillImage(Image *,const ChannelType,const MagickPixelPacket *,
cristy0d82aa32009-09-22 18:51:31 +0000190 const long,const long,const DrawInfo *,const PaintMethod)
191 magick_attribute((deprecated)),
192 PaintOpaqueImage(Image *,const MagickPixelPacket *,const MagickPixelPacket *)
193 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000194 PaintOpaqueImageChannel(Image *,const ChannelType,const MagickPixelPacket *,
cristy0d82aa32009-09-22 18:51:31 +0000195 const MagickPixelPacket *) magick_attribute((deprecated)),
196 PaintTransparentImage(Image *,const MagickPixelPacket *,const Quantum)
197 magick_attribute((deprecated)),
198 SetExceptionInfo(ExceptionInfo *,ExceptionType)
199 magick_attribute((deprecated)),
200 SetImageAttribute(Image *,const char *,const char *)
201 magick_attribute((deprecated)),
202 SyncCacheViewPixels(CacheView *) magick_attribute((deprecated)),
203 SyncImagePixels(Image *) magick_attribute((deprecated)),
204 TransparentImage(Image *,const PixelPacket,const Quantum)
205 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000206
207extern MagickExport MagickPixelPacket
cristy0d82aa32009-09-22 18:51:31 +0000208 AcquireOneMagickPixel(const Image *,const long,const long,ExceptionInfo *)
209 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000210
211extern MagickExport MonitorHandler
cristy0d82aa32009-09-22 18:51:31 +0000212 GetMonitorHandler(void) magick_attribute((deprecated)),
213 SetMonitorHandler(MonitorHandler) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000214
215extern MagickExport MagickOffsetType
cristy0d82aa32009-09-22 18:51:31 +0000216 SizeBlob(Image *image) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000217
218extern MagickExport MagickPixelPacket
219 InterpolatePixelColor(const Image *,CacheView *,const InterpolatePixelMethod,
cristy0d82aa32009-09-22 18:51:31 +0000220 const double,const double,ExceptionInfo *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000221
222extern MagickExport MagickStatusType
cristy0d82aa32009-09-22 18:51:31 +0000223 ParseSizeGeometry(const Image *,const char *,RectangleInfo *)
224 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000225
226extern MagickExport PixelPacket
cristy0d82aa32009-09-22 18:51:31 +0000227 AcquireOnePixel(const Image *,const long,const long,ExceptionInfo *)
228 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000229 AcquireOneVirtualPixel(const Image *,const VirtualPixelMethod,const long,
cristy0d82aa32009-09-22 18:51:31 +0000230 const long,ExceptionInfo *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000231 *GetCacheView(CacheView *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000232 const unsigned long) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000233 *GetCacheViewPixels(CacheView *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000234 const unsigned long) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000235 *GetImagePixels(Image *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000236 const unsigned long) magick_attribute((deprecated)),
237 GetOnePixel(Image *,const long,const long) magick_attribute((deprecated)),
238 *GetPixels(const Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000239 *SetCacheViewPixels(CacheView *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000240 const unsigned long) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000241 *SetImagePixels(Image *,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
244extern MagickExport size_t
cristy0d82aa32009-09-22 18:51:31 +0000245 PopImagePixels(Image *,const QuantumType,unsigned char *)
246 magick_attribute((deprecated)),
247 PushImagePixels(Image *,const QuantumType,const unsigned char *)
248 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000249
250extern MagickExport unsigned int
cristy0d82aa32009-09-22 18:51:31 +0000251 ChannelImage(Image *,const ChannelType) magick_attribute((deprecated)),
252 ChannelThresholdImage(Image *,const char *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000253 DispatchImage(const Image *,const long,const long,const unsigned long,
cristy0d82aa32009-09-22 18:51:31 +0000254 const unsigned long,const char *,const StorageType,void *,ExceptionInfo *)
255 magick_attribute((deprecated)),
256 FuzzyColorMatch(const PixelPacket *,const PixelPacket *,const double)
257 magick_attribute((deprecated)),
258 GetNumberScenes(const Image *) magick_attribute((deprecated)),
259 GetMagickGeometry(const char *,long *,long *,unsigned long *,unsigned long *)
260 magick_attribute((deprecated)),
261 IsSubimage(const char *,const unsigned int) magick_attribute((deprecated)),
262 PushImageList(Image **,const Image *,ExceptionInfo *)
263 magick_attribute((deprecated)),
264 QuantizationError(Image *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000265 RandomChannelThresholdImage(Image *,const char *,const char *,
cristy0d82aa32009-09-22 18:51:31 +0000266 ExceptionInfo *) magick_attribute((deprecated)),
267 SetImageList(Image **,const Image *,const long,ExceptionInfo *)
268 magick_attribute((deprecated)),
269 TransformColorspace(Image *,const ColorspaceType)
270 magick_attribute((deprecated)),
271 ThresholdImage(Image *,const double) magick_attribute((deprecated)),
272 ThresholdImageChannel(Image *,const char *) magick_attribute((deprecated)),
273 UnshiftImageList(Image **,const Image *,ExceptionInfo *)
274 magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000275
276extern MagickExport unsigned long
cristy0d82aa32009-09-22 18:51:31 +0000277 GetImageListSize(const Image *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000278
279extern MagickExport CacheView
cristy0d82aa32009-09-22 18:51:31 +0000280 *CloseCacheView(CacheView *) magick_attribute((deprecated)),
281 *OpenCacheView(const Image *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000282
283extern MagickExport void
cristy0d82aa32009-09-22 18:51:31 +0000284 *AcquireMemory(const size_t) magick_attribute((deprecated)),
285 AllocateNextImage(const ImageInfo *,Image *) magick_attribute((deprecated)),
286 *CloneMemory(void *,const void *,const size_t) magick_attribute((deprecated)),
287 DestroyImageAttributes(Image *) magick_attribute((deprecated)),
288 DestroyImages(Image *) magick_attribute((deprecated)),
289 DestroyMagick(void) magick_attribute((deprecated)),
290 DestroyMagickRegistry(void) magick_attribute((deprecated)),
291 *GetConfigureBlob(const char *,char *,size_t *,ExceptionInfo *)
292 magick_attribute((deprecated)),
293 *GetMagickRegistry(const long,RegistryType *,size_t *,ExceptionInfo *)
294 magick_attribute((deprecated)),
295 IdentityAffine(AffineMatrix *) magick_attribute((deprecated)),
296 LiberateMemory(void **) magick_attribute((deprecated)),
297 LiberateSemaphoreInfo(SemaphoreInfo **) magick_attribute((deprecated)),
298 FormatString(char *,const char *,...) magick_attribute((format (printf,2,3)))
299 magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000300 FormatStringList(char *,const char *,va_list)
cristy0d82aa32009-09-22 18:51:31 +0000301 magick_attribute((format (printf,2,0))) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000302 HSLTransform(const double,const double,const double,Quantum *,Quantum *,
cristy0d82aa32009-09-22 18:51:31 +0000303 Quantum *) magick_attribute((deprecated)),
304 InitializeMagick(const char *) magick_attribute((deprecated)),
cristyec7a89d2010-02-02 19:24:56 +0000305 MagickIncarnate(const char *) magick_attribute((deprecated)),
cristy0d82aa32009-09-22 18:51:31 +0000306 ReacquireMemory(void **,const size_t) magick_attribute((deprecated)),
307 ResetImageAttributeIterator(const Image *) magick_attribute((deprecated)),
308 SetCacheThreshold(const unsigned long) magick_attribute((deprecated)),
309 SetImage(Image *,const Quantum) magick_attribute((deprecated)),
310 Strip(char *) magick_attribute((deprecated)),
311 TemporaryFilename(char *) magick_attribute((deprecated)),
cristy3ed852e2009-09-05 21:47:34 +0000312 TransformHSL(const Quantum,const Quantum,const Quantum,double *,double *,
cristy0d82aa32009-09-22 18:51:31 +0000313 double *) magick_attribute((deprecated));
cristy3ed852e2009-09-05 21:47:34 +0000314#endif
315
316#if defined(__cplusplus) || defined(c_plusplus)
317}
318#endif
319
320#endif