2
% Copyright (C) 2003 GraphicsMagick Group
3
% Copyright (C) 2002 ImageMagick Studio
5
% This program is covered by multiple licenses, which are described in
6
% Copyright.txt. You should have received a copy of Copyright.txt with this
7
% package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
9
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12
% DDDD EEEEE PPPP RRRR EEEEE CCCC AAA TTTTT EEEEE %
13
% D D E P P R R E C A A T E %
14
% D D EEE PPPPP RRRR EEE C AAAAA T EEE %
15
% D D E P R R E C A A T E %
16
% DDDD EEEEE P R R EEEEE CCCC A A T EEEEE %
19
% GraphicsMagick Deprecated Methods %
28
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37
#include "magick/studio.h"
38
#include "magick/blob.h"
39
#include "magick/color.h"
40
#include "magick/deprecate.h"
41
#include "magick/list.h"
42
#include "magick/log.h"
43
#include "magick/resource.h"
44
#include "magick/utility.h"
47
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51
% D e l e t e I m a g e L i s t %
55
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57
% DeleteImageList() deletes an image at the specified position in the list.
59
% This method is deprecated as of version 5.5.2.
61
% The format of the DeleteImageList method is:
63
% unsigned int DeleteImageList(Image *images,const long offset)
65
% A description of each parameter follows:
67
% o images: The image list.
69
% o offset: The position within the list.
73
MagickExport unsigned int DeleteImageList(Image *images,const long offset)
78
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
79
"Method has been deprecated");
80
while (images->previous != (Image *) NULL)
81
images=images->previous;
82
for (i=0; i < offset; i++)
84
if (images->next == (Image *) NULL)
88
DeleteImageFromList(&images);
93
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97
% D e s t r o y I m a g e s %
101
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103
% DestroyImages() destroys an image list.
105
% This method is deprecated as of version 5.4.3.
107
% The format of the DestroyImages method is:
109
% void DestroyImages(Image *image)
111
% A description of each parameter follows:
113
% o image: The image sequence.
117
MagickExport void DestroyImages(Image *image)
119
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
120
"Method has been deprecated");
121
DestroyImageList(image);
125
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
129
% G e t I m a g e L i s t %
133
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
135
% GetImageList() returns an image at the specified position in the list.
137
% This method is deprecated as of version 5.5.2.
139
% The format of the GetImageList method is:
141
% Image *GetImageList(const Image *images,const long offset,
142
% ExceptionInfo *exception)
144
% A description of each parameter follows:
146
% o images: The image list.
148
% o offset: The position within the list.
150
% o exception: Return any errors or warnings in this structure.
154
MagickExport Image *GetImageList(const Image *images,const long offset,
155
ExceptionInfo *exception)
157
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
158
"Method has been deprecated");
159
return(CloneImage(GetImageFromList(images,offset),0,0,True,exception));
163
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167
% G e t I m a g e L i s t I n d e x %
171
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
173
% GetImageListIndex() returns the position in the list of the specified
176
% This method is deprecated as of version 5.5.2.
178
% The format of the GetImageListIndex method is:
180
% long GetImageListIndex(const Image *images)
182
% A description of each parameter follows:
184
% o images: The image list.
188
MagickExport long GetImageListIndex(const Image *images)
190
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
191
"Method has been deprecated");
192
return(GetImageIndexInList(images));
196
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
200
% G e t I m a g e L i s t S i z e %
204
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
206
% GetImageListSize() returns the number of images in the list.
208
% This method is deprecated as of version 5.5.2.
210
% The format of the GetImageListSize method is:
212
% unsigned long GetImageListSize(const Image *images)
214
% A description of each parameter follows:
216
% o images: The image list.
220
MagickExport unsigned long GetImageListSize(const Image *images)
222
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
223
"Method has been deprecated");
224
return(GetImageListLength(images));
228
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
232
% G e t N e x t I m a g e %
236
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
238
% GetNextImage() returns the next image in a list.
240
% This method is deprecated as of version 5.5.2.
242
% The format of the GetNextImage method is:
244
% Image *GetNextImage(const Image *images)
246
% A description of each parameter follows:
248
% o images: The image list.
252
MagickExport Image *GetNextImage(const Image *images)
254
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
255
"Method has been deprecated");
256
return(GetNextImageInList(images));
260
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
264
% G e t N u m b e r S c e n e s %
268
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
270
% GetNumberScenes() returns the number of images in the list.
272
% This method is deprecated as of version 5.5.2.
274
% The format of the GetNumberScenes method is:
276
% unsigned int GetNumberScenes(const Image *images)
278
% A description of each parameter follows:
280
% o images: The image list.
284
MagickExport unsigned int GetNumberScenes(const Image *image)
286
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
287
"Method has been deprecated");
288
return(GetImageListLength(image));
292
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
296
% G e t P r e v i o u s I m a g e %
300
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
302
% GetPreviousImage() returns the previous image in a list.
304
% This method is deprecated as of version 5.5.2.
306
% The format of the GetPreviousImage method is:
308
% Image *GetPreviousImage(const Image *images)
310
% A description of each parameter follows:
312
% o images: The image list.
316
MagickExport Image *GetPreviousImage(const Image *images)
318
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
319
"Method has been deprecated");
320
return(GetPreviousImageInList(images));
324
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
328
+ P a r s e I m a g e G e o m e t r y %
332
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
334
% ParseImageGeometry() is similar to GetGeometry() except the returned
335
% geometry is modified as determined by the meta characters: %, !, <,
338
% This method is deprecated as of version 5.5.1.
340
% The format of the ParseImageGeometry method is:
342
% int ParseImageGeometry(const char *geometry,long *x,long *y,
343
% unsigned long *width,unsigned long *height)
345
% A description of each parameter follows:
347
% o flags: Method ParseImageGeometry returns a bitmask that indicates
348
% which of the four values were located in the geometry string.
350
% o image_geometry: Specifies a character string representing the geometry
353
% o x,y: A pointer to an integer. The x and y offset as determined by
354
% the geometry specification is returned here.
356
% o width,height: A pointer to an unsigned integer. The width and height
357
% as determined by the geometry specification is returned here.
361
MagickExport int ParseImageGeometry(const char *geometry,long *x,long *y,
362
unsigned long *width,unsigned long *height)
364
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
365
"Method has been deprecated");
366
return(GetMagickGeometry(geometry,x,y,width,height));
370
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
374
% P o p I m a g e L i s t %
378
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
380
% PopImageList() removes the last image in the list.
382
% This method is deprecated as of version 5.5.2.
384
% The format of the PopImageList method is:
386
% Image *PopImageList(Image **images)
388
% A description of each parameter follows:
390
% o images: The image list.
394
MagickExport Image *PopImageList(Image **images)
396
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
397
"Method has been deprecated");
398
return(RemoveLastImageFromList(images));
402
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
406
% P o s t s c r i p t G e o m e t r y %
410
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
412
% PostscriptGeometry() replaces any page mneumonic with the equivalent size in
415
% This method is deprecated as of version 5.5.1.
417
% The format of the PostscriptGeometry method is:
419
% char *PostscriptGeometry(const char *page)
421
% A description of each parameter follows.
423
% o page: Specifies a pointer to an array of characters.
424
% The string is either a Postscript page name (e.g. A4) or a postscript
425
% page geometry (e.g. 612x792+36+36).
429
MagickExport char *PostscriptGeometry(const char *page)
431
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
432
"Method has been deprecated");
433
return(GetPageGeometry(page));
437
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
441
% P u s h I m a g e L i s t %
445
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
447
% PushImageList() adds an image to the end of the list.
449
% This method is deprecated as of version 5.5.2.
451
% The format of the PushImageList method is:
453
% unsigned int PushImageList(Image *images,const Image *image,
454
% ExceptionInfo *exception)
456
% A description of each parameter follows:
458
% o images: The image list.
460
% o image: The image.
462
% o exception: Return any errors or warnings in this structure.
466
MagickExport unsigned int PushImageList(Image **images,const Image *image,
467
ExceptionInfo *exception)
469
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
470
"Method has been deprecated");
471
AppendImageToList(images,CloneImageList(image,exception));
476
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
480
+ S e t C a c h e T h e s h o l d %
484
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
486
% Method SetCacheThreshold() sets the amount of free memory allocated for the
487
% pixel cache. Once this threshold is exceeded, all subsequent pixels cache
488
% operations are to/from disk.
490
% This method is deprecated as of version 5.5.1.
492
% The format of the SetCacheThreshold() method is:
494
% void SetCacheThreshold(const size_t threshold)
496
% A description of each parameter follows:
498
% o threshold: The number of megabytes of memory available to the pixel
503
MagickExport void SetCacheThreshold(const unsigned long size)
505
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
506
"Method has been deprecated");
507
SetMagickResourceLimit(MemoryResource,size);
508
SetMagickResourceLimit(MapResource,2*size);
512
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
516
% S e t I m a g e L i s t %
520
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
522
% SetImageList() inserts an image into the list at the specified position.
524
% This method is deprecated as of version 5.5.2.
526
% The format of the SetImageList method is:
528
% unsigned int SetImageList(Image *images,const Image *image,
529
% const long offset,ExceptionInfo *exception)
531
% A description of each parameter follows:
533
% o images: The image list.
535
% o image: The image.
537
% o offset: The position within the list.
539
% o exception: Return any errors or warnings in this structure.
543
MagickExport unsigned int SetImageList(Image **images,const Image *image,
544
const long offset,ExceptionInfo *exception)
552
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
553
"Method has been deprecated");
554
clone=CloneImageList(image,exception);
555
while ((*images)->previous != (Image *) NULL)
556
(*images)=(*images)->previous;
557
for (i=0; i < offset; i++)
559
if ((*images)->next == (Image *) NULL)
561
(*images)=(*images)->next;
563
InsertImageInList(images,clone);
568
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
572
% S h i f t I m a g e L i s t %
576
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
578
% ShiftImageList() removes an image from the beginning of the list.
580
% This method is deprecated as of version 5.5.2.
582
% The format of the ShiftImageList method is:
584
% Image *ShiftImageList(Image **images)
586
% A description of each parameter follows:
588
% o images: The image list.
592
MagickExport Image *ShiftImageList(Image **images)
594
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
595
"Method has been deprecated");
596
return(RemoveFirstImageFromList(images));
600
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
608
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
610
% SizeBlob() returns the current length of the image file or blob.
612
% This method is deprecated as of version 5.4.3.
614
% The format of the SizeBlob method is:
616
% magick_off_t SizeBlob(const Image *image)
618
% A description of each parameter follows:
620
% o size: Method SizeBlob returns the current length of the image file
623
% o image: The image.
627
MagickExport magick_off_t SizeBlob(const Image *image)
629
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
630
"Method has been deprecated");
631
return(GetBlobSize(image));
635
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
639
% S p l i c e I m a g e L i s t %
643
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
645
% SpliceImageList() removes the images designated by offset and length from
646
% the list and replaces them with the specified list.
648
% This method is deprecated as of version 5.5.2.
650
% The format of the SpliceImageList method is:
652
% Image *SpliceImageList(Image *images,const long offset,
653
% const unsigned long length,const Image *splices,
654
% ExceptionInfo *exception)
656
% A description of each parameter follows:
658
% o images: The image list.
660
% o offset: The position within the list.
662
% o length: The length of the image list to remove.
664
% o splice: Replace the removed image list with this list.
666
% o exception: Return any errors or warnings in this structure.
670
MagickExport Image *SpliceImageList(Image *images,const long offset,
671
const unsigned long length,const Image *splices,ExceptionInfo *exception)
679
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
680
"Method has been deprecated");
681
clone=CloneImageList(splices,exception);
682
while (images->previous != (Image *) NULL)
683
images=images->previous;
684
for (i=0; i < offset; i++)
686
if (images->next == (Image *) NULL)
690
(void) SpliceImageIntoList(&images,length,clone);
695
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
699
% U n s h i f t I m a g e L i s t %
703
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
705
% UnshiftImageList() adds the image to the beginning of the list.
707
% This method is deprecated as of version 5.5.2.
709
% The format of the UnshiftImageList method is:
711
% unsigned int UnshiftImageList(Image *images,const Image *image,
712
% ExceptionInfo *exception)
714
% A description of each parameter follows:
716
% o images: The image list.
718
% o image: The image.
720
% o exception: Return any errors or warnings in this structure.
724
MagickExport unsigned int UnshiftImageList(Image **images,const Image *image,
725
ExceptionInfo *exception)
727
(void) LogMagickEvent(DeprecateEvent,GetMagickModule(),
728
"Method has been deprecated");
729
PrependImageToList(images,CloneImageList(image,exception));