18#ifndef MAGICKCORE_DEPRECATE_H
19#define MAGICKCORE_DEPRECATE_H
22#include "magick/blob.h"
23#include "magick/cache-view.h"
24#include "magick/draw.h"
25#include "magick/constitute.h"
26#include "magick/magick-config.h"
27#include "magick/pixel.h"
28#include "magick/quantize.h"
29#include "magick/quantum.h"
30#include "magick/registry.h"
31#include "magick/semaphore.h"
33#if defined(__cplusplus) || defined(c_plusplus)
37#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
39#if !defined(magick_attribute)
40# if !defined(__clang__) && !defined(__GNUC__)
41# define magick_attribute(x)
43# define magick_attribute __attribute__
47#define Downscale(quantum) ScaleQuantumToChar(quantum)
48#define LABColorspace LabColorspace
49#define CompressPixelGamma(pixel) DecodePixelGamma(pixel)
50#define DecodesRGBGamma(pixel) DecodePixelGamma(pixel)
51#define EncodesRGBGamma(pixel) EncodePixelGamma(pixel)
52#define ExpandPixelGamma(pixel) EncodePixelGamma(pixel)
53#define Intensity(color) PixelIntensityToQuantum(color)
54#define LiberateUniqueFileResource(resource) \
55 RelinquishUniqueFileResource(resource)
56#define LiberateMagickResource(resource) RelinquishMagickResource(resource)
57#define LiberateSemaphore(semaphore) RelinquishSemaphore(semaphore)
58#define MagickHuge 3.4e+38F
59#define MaxRGB QuantumRange
60#define QuantumDepth MAGICKCORE_QUANTUM_DEPTH
61#define RunlengthEncodedCompression RLECompression
62#define Upscale(value) ScaleCharToQuantum(value)
63#define XDownscale(value) ScaleShortToQuantum(value)
64#define XUpscale(quantum) ScaleQuantumToShort(quantum)
68 UndefinedMagickLayerMethod
71typedef MagickOffsetType ExtendedSignedIntegralType;
72typedef MagickSizeType ExtendedUnsignedIntegralType;
73typedef MagickRealType ExtendedRationalType;
74typedef struct _ViewInfo ViewInfo;
76typedef MagickBooleanType
77 (*MonitorHandler)(
const char *,
const MagickOffsetType,
const MagickSizeType,
95 *CloseCacheView(
CacheView *) magick_attribute((deprecated)),
96 *OpenCacheView(
const Image *) magick_attribute((deprecated));
98extern MagickExport
char
99 *AllocateString(
const char *) magick_attribute((deprecated)),
101 magick_attribute((deprecated)),
102 *PostscriptGeometry(
const char *) magick_attribute((deprecated)),
104 magick_attribute((deprecated));
107 *GetImageAttribute(
const Image *,
const char *),
108 *GetImageClippingPathAttribute(
Image *) magick_attribute((deprecated)),
109 *GetNextImageAttribute(
const Image *) magick_attribute((deprecated));
111extern MagickExport
const IndexPacket
112 *AcquireCacheViewIndexes(
const CacheView *) magick_attribute((deprecated)),
113 *AcquireIndexes(
const Image *) magick_attribute((deprecated));
116 *AcquirePixels(
const Image *) magick_attribute((deprecated)),
117 *AcquireCacheViewPixels(
const CacheView *,
const ssize_t,
const ssize_t,
119 magick_attribute((deprecated)),
120 *AcquireImagePixels(
const Image *,
const ssize_t,
const ssize_t,
const size_t,
121 const size_t,
ExceptionInfo *) magick_attribute((deprecated));
123extern MagickExport FILE
124 *OpenMagickStream(
const char *,
const char *);
126extern MagickExport
Image
127 *AllocateImage(
const ImageInfo *) magick_attribute((deprecated)),
130 magick_attribute((deprecated)),
131 *GetImageFromMagickRegistry(
const char *,ssize_t *
id,
ExceptionInfo *)
132 magick_attribute((deprecated)),
134 magick_attribute((deprecated)),
135 *GetNextImage(
const Image *) magick_attribute((deprecated)),
136 *GetPreviousImage(
const Image *) magick_attribute((deprecated)),
143 *PopImageList(
Image **) magick_attribute((deprecated)),
145 magick_attribute((deprecated)),
146 *RadialBlurImageChannel(
const Image *,
const ChannelType,
const double,
149 magick_attribute((deprecated)),
151 *ShiftImageList(
Image **) magick_attribute((deprecated)),
152 *SpliceImageList(
Image *,
const ssize_t,
const size_t,
const Image *,
155 magick_attribute((deprecated));
157extern MagickExport IndexPacket
158 *GetCacheViewIndexes(
CacheView *) magick_attribute((deprecated)),
159 *GetIndexes(
const Image *) magick_attribute((deprecated)),
160 ValidateColormapIndex(
Image *,
const size_t) magick_attribute((deprecated));
162extern MagickExport
int
164 magick_attribute((deprecated)),
165 ParseImageGeometry(
const char *,ssize_t *,ssize_t *,
size_t *,
size_t *)
166 magick_attribute((deprecated)),
167 SystemCommand(
const MagickBooleanType,
const MagickBooleanType,
const char *,
170extern MagickExport MagickBooleanType
171 AcquireOneCacheViewPixel(
const CacheView *,
const ssize_t,
const ssize_t,
173 AcquireOneCacheViewVirtualPixel(
const CacheView *,
const VirtualPixelMethod,
175 magick_attribute((deprecated)),
177 magick_attribute((deprecated)),
179 magick_attribute((deprecated)),
180 AllocateImageColormap(
Image *,
const size_t)
181 magick_attribute((deprecated)),
182 ClipPathImage(
Image *,
const char *,
const MagickBooleanType)
183 magick_attribute((deprecated)),
184 CloneImageAttributes(
Image *,
const Image *) magick_attribute((deprecated)),
186 const ssize_t,
const PaintMethod) magick_attribute((deprecated)),
187 ConstituteComponentGenesis(
void) magick_attribute((deprecated)),
188 DeleteImageAttribute(
Image *,
const char *) magick_attribute((deprecated)),
189 DeleteMagickRegistry(
const ssize_t) magick_attribute((deprecated)),
190 DescribeImage(
Image *,FILE *,
const MagickBooleanType)
191 magick_attribute((deprecated)),
192 FormatImageAttribute(
Image *,
const char *,
const char *,...)
193 magick_attribute((__format__ (__printf__,3,4)))
194 magick_attribute((deprecated)),
195 FormatImageAttributeList(
Image *,const
char *,const
char *,va_list)
196 magick_attribute((__format__ (__printf__,3,0)))
197 magick_attribute((deprecated)),
198 FormatImagePropertyList(
Image *,const
char *,const
char *,va_list)
199 magick_attribute((__format__ (__printf__,3,0))),
201 magick_attribute((deprecated)),
203 magick_attribute((deprecated)),
204 InitializeModuleList(
ExceptionInfo *) magick_attribute((deprecated)),
205 IsMagickInstantiated(
void) magick_attribute((deprecated)),
208 magick_attribute((deprecated)),
209 LoadMimeLists(const
char *,
ExceptionInfo *) magick_attribute((deprecated)),
210 MagickMonitor(const
char *,const MagickOffsetType,const MagickSizeType,
211 void *) magick_attribute((deprecated)),
212 MapImage(
Image *,const
Image *,const MagickBooleanType)
213 magick_attribute((deprecated)),
214 MapImages(
Image *,const
Image *,const MagickBooleanType)
215 magick_attribute((deprecated)),
217 const ssize_t,const PaintMethod) magick_attribute((deprecated)),
219 magick_attribute((deprecated)),
221 const ssize_t,const ssize_t,const
DrawInfo *,const PaintMethod)
222 magick_attribute((deprecated)),
224 magick_attribute((deprecated)),
228 magick_attribute((deprecated)),
230 magick_attribute((deprecated)),
231 SetImageAttribute(
Image *,const
char *,const
char *)
232 magick_attribute((deprecated)),
233 SyncCacheViewPixels(
CacheView *) magick_attribute((deprecated)),
234 SyncImagePixels(
Image *) magick_attribute((deprecated)),
236 magick_attribute((deprecated));
239 AcquireOneMagickPixel(const
Image *,const ssize_t,const ssize_t,
242extern MagickExport MonitorHandler
243 GetMonitorHandler(
void) magick_attribute((deprecated)),
244 SetMonitorHandler(MonitorHandler) magick_attribute((deprecated));
246extern MagickExport MagickOffsetType
247 SizeBlob(
Image *image) magick_attribute((deprecated));
250 InterpolatePixelColor(const
Image *,
CacheView *,const InterpolatePixelMethod,
251 const
double,const
double,
ExceptionInfo *) magick_attribute((deprecated));
253extern MagickExport MagickStatusType
255 magick_attribute((deprecated));
259 magick_attribute((deprecated)),
260 AcquireOneVirtualPixel(const
Image *,const VirtualPixelMethod,const ssize_t,
261 const ssize_t,
ExceptionInfo *) magick_attribute((deprecated)),
262 *GetCacheView(
CacheView *,const ssize_t,const ssize_t,const
size_t,
263 const
size_t) magick_attribute((deprecated)),
264 *GetCacheViewPixels(
CacheView *,const ssize_t,const ssize_t,const
size_t,
265 const
size_t) magick_attribute((deprecated)),
266 *GetImagePixels(
Image *,const ssize_t,const ssize_t,const
size_t,
267 const
size_t) magick_attribute((deprecated)),
268 GetOnePixel(
Image *,const ssize_t,const ssize_t)
269 magick_attribute((deprecated)),
270 *GetPixels(const
Image *) magick_attribute((deprecated)),
271 *SetCacheViewPixels(
CacheView *,const ssize_t,const ssize_t,const
size_t,
272 const
size_t) magick_attribute((deprecated)),
273 *SetImagePixels(
Image *,const ssize_t,const ssize_t,const
size_t,
274 const
size_t) magick_attribute((deprecated));
276extern MagickExport MagickRealType
277 InversesRGBCompandor(const MagickRealType) magick_attribute((deprecated)),
278 sRGBCompandor(const MagickRealType) magick_attribute((deprecated));
280extern MagickExport
size_t
281 GetImageListSize(const
Image *) magick_attribute((deprecated)),
282 PopImagePixels(
Image *,const QuantumType,
unsigned char *)
283 magick_attribute((deprecated)),
284 PushImagePixels(
Image *,const QuantumType,const
unsigned char *)
285 magick_attribute((deprecated));
287extern MagickExport ssize_t
288 FormatMagickString(
char *,const
size_t,const
char *,...)
289 magick_attribute((__format__ (__printf__,3,4)))
290 magick_attribute((deprecated)),
291 FormatMagickStringList(
char *,const
size_t,const
char *,va_list)
292 magick_attribute((__format__ (__printf__,3,0))),
293 GetImageListIndex(const
Image *) magick_attribute((deprecated)),
294 SetMagickRegistry(const RegistryType,const
void *,const
size_t,
297extern MagickExport
unsigned int
298 ChannelImage(
Image *,const ChannelType) magick_attribute((deprecated)),
299 ChannelThresholdImage(
Image *,const
char *) magick_attribute((deprecated)),
300 DispatchImage(const
Image *,const ssize_t,const ssize_t,const
size_t,
301 const
size_t,const
char *,const StorageType,
void *,
ExceptionInfo *)
302 magick_attribute((deprecated)),
304 magick_attribute((deprecated)),
305 GetNumberScenes(const
Image *) magick_attribute((deprecated)),
306 GetMagickGeometry(const
char *,ssize_t *,ssize_t *,
size_t *,
size_t *)
307 magick_attribute((deprecated)),
308 IsSubimage(const
char *,const
unsigned int) magick_attribute((deprecated)),
310 magick_attribute((deprecated)),
311 QuantizationError(
Image *) magick_attribute((deprecated)),
312 RandomChannelThresholdImage(
Image *,const
char *,const
char *,
315 magick_attribute((deprecated)),
316 TransformColorspace(
Image *,const ColorspaceType)
317 magick_attribute((deprecated)),
318 ThresholdImage(
Image *,const
double) magick_attribute((deprecated)),
319 ThresholdImageChannel(
Image *,const
char *) magick_attribute((deprecated)),
321 magick_attribute((deprecated));
323extern MagickExport
void
324 *AcquireMemory(const
size_t) magick_attribute((deprecated)),
325 AcquireSemaphoreInfo(
SemaphoreInfo **) magick_attribute((deprecated)),
326 AllocateNextImage(const
ImageInfo *,
Image *) magick_attribute((deprecated)),
327 *CloneMemory(
void *,const
void *,const
size_t) magick_attribute((deprecated)),
328 ConstituteComponentTerminus(
void) magick_attribute((deprecated)),
329 DestroyConstitute(
void),
330 DestroyImageAttributes(
Image *) magick_attribute((deprecated)),
331 DestroyImages(
Image *) magick_attribute((deprecated)),
332 DestroyMagick(
void) magick_attribute((deprecated)),
333 DestroyMagickRegistry(
void) magick_attribute((deprecated)),
334 *GetConfigureBlob(const
char *,
char *,
size_t *,
ExceptionInfo *)
335 magick_attribute((deprecated)),
337 *GetMagickRegistry(const ssize_t,RegistryType *,
size_t *,
ExceptionInfo *)
338 magick_attribute((deprecated)),
339 GetTokenToken(const
char *,const
char **,
char *),
340 IdentityAffine(
AffineMatrix *) magick_attribute((deprecated)),
341 LiberateMemory(
void **) magick_attribute((deprecated)),
342 LiberateSemaphoreInfo(
SemaphoreInfo **) magick_attribute((deprecated)),
343 FormatString(
char *,const
char *,...)
344 magick_attribute((__format__ (__printf__,2,3)))
345 magick_attribute((deprecated)),
346 FormatStringList(
char *,const
char *,va_list)
347 magick_attribute((__format__ (__printf__,2,0)))
348 magick_attribute((deprecated)),
349 HSLTransform(const
double,const
double,const
double,Quantum *,Quantum *,
350 Quantum *) magick_attribute((deprecated)),
351 InitializeMagick(const
char *) magick_attribute((deprecated)),
352 MagickIncarnate(const
char *) magick_attribute((deprecated)),
353 ReacquireMemory(
void **,const
size_t) magick_attribute((deprecated)),
354 RelinquishSemaphoreInfo(
SemaphoreInfo *) magick_attribute((deprecated)),
355 ResetImageAttributeIterator(const
Image *) magick_attribute((deprecated)),
356 SetCacheThreshold(const
size_t) magick_attribute((deprecated)),
357 SetImage(
Image *,const Quantum) magick_attribute((deprecated)),
358 Strip(
char *) magick_attribute((deprecated)),
359 TemporaryFilename(
char *) magick_attribute((deprecated)),
360 TransformHSL(const Quantum,const Quantum,const Quantum,
double *,
double *,
361 double *) magick_attribute((deprecated));
363#if defined(MAGICKCORE_WINGDI32_DELEGATE)
364extern MagickExport
void
372static inline double MagickEpsilonReciprocal(
const double x)
377 sign=x < 0.0 ? -1.0 : 1.0;
378 if ((sign*x) >= MagickEpsilon)
380 return(sign/MagickEpsilon);
383static inline Quantum PixelIntensityToQuantum(
384 const Image *magick_restrict image,
const PixelPacket *magick_restrict pixel)
386 return(ClampToQuantum(GetPixelIntensity(image,pixel)));
391#if defined(__cplusplus) || defined(c_plusplus)