2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 % Render Text Onto A Canvas Image. %
20 % Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization %
21 % dedicated to making software imaging solutions freely available. %
23 % You may not use this file except in compliance with the License. You may %
24 % obtain a copy of the License at %
26 % http://www.imagemagick.org/script/license.php %
28 % Unless required by applicable law or agreed to in writing, software %
29 % distributed under the License is distributed on an "AS IS" BASIS, %
30 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
31 % See the License for the specific language governing permissions and %
32 % limitations under the License. %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 #include "MagickCore/studio.h"
43 #include "MagickCore/annotate.h"
44 #include "MagickCore/attribute.h"
45 #include "MagickCore/blob.h"
46 #include "MagickCore/blob-private.h"
47 #include "MagickCore/cache.h"
48 #include "MagickCore/color.h"
49 #include "MagickCore/color-private.h"
50 #include "MagickCore/colorspace.h"
51 #include "MagickCore/constitute.h"
52 #include "MagickCore/draw.h"
53 #include "MagickCore/exception.h"
54 #include "MagickCore/exception-private.h"
55 #include "MagickCore/geometry.h"
56 #include "MagickCore/image.h"
57 #include "MagickCore/image-private.h"
58 #include "MagickCore/list.h"
59 #include "MagickCore/magick.h"
60 #include "MagickCore/memory_.h"
61 #include "MagickCore/monitor.h"
62 #include "MagickCore/monitor-private.h"
63 #include "MagickCore/option.h"
64 #include "MagickCore/pixel-accessor.h"
65 #include "MagickCore/quantum-private.h"
66 #include "MagickCore/static.h"
67 #include "MagickCore/statistic.h"
68 #include "MagickCore/string_.h"
69 #include "MagickCore/module.h"
74 static MagickBooleanType
75 WriteTXTImage(const ImageInfo *,Image *,ExceptionInfo *);
78 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88 % IsTXT() returns MagickTrue if the image format type, identified by the magick
91 % The format of the IsTXT method is:
93 % MagickBooleanType IsTXT(const unsigned char *magick,const size_t length)
95 % A description of each parameter follows:
97 % o magick: compare image format pattern against these bytes.
99 % o length: Specifies the length of the magick string.
102 static MagickBooleanType IsTXT(const unsigned char *magick,const size_t length)
104 #define MagickID "# ImageMagick pixel enumeration:"
107 colorspace[MagickPathExtent];
119 if (LocaleNCompare((const char *) magick,MagickID,strlen(MagickID)) != 0)
121 count=(ssize_t) sscanf((const char *) magick+32,"%lu,%lu,%lu,%s",&columns,
122 &rows,&depth,colorspace);
129 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133 % R e a d T E X T I m a g e %
137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
139 % ReadTEXTImage() reads a text file and returns it as an image. It
140 % allocates the memory necessary for the new Image structure and returns a
141 % pointer to the new image.
143 % The format of the ReadTEXTImage method is:
145 % Image *ReadTEXTImage(const ImageInfo *image_info,Image *image,
146 % char *text,ExceptionInfo *exception)
148 % A description of each parameter follows:
150 % o image_info: the image info.
152 % o image: the image.
154 % o text: the text storage buffer.
156 % o exception: return any errors or warnings in this structure.
159 static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image,
160 char *text,ExceptionInfo *exception)
163 filename[MagickPathExtent],
164 geometry[MagickPathExtent],
191 assert(image_info != (const ImageInfo *) NULL);
192 assert(image_info->signature == MagickCoreSignature);
193 if (image_info->debug != MagickFalse)
194 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
195 image_info->filename);
196 assert(exception != (ExceptionInfo *) NULL);
197 assert(exception->signature == MagickCoreSignature);
199 Set the page geometry.
201 delta.x=DefaultResolution;
202 delta.y=DefaultResolution;
203 if ((image->resolution.x == 0.0) || (image->resolution.y == 0.0))
211 flags=ParseGeometry(PSDensityGeometry,&geometry_info);
212 image->resolution.x=geometry_info.rho;
213 image->resolution.y=geometry_info.sigma;
214 if ((flags & SigmaValue) == 0)
215 image->resolution.y=image->resolution.x;
221 if (image_info->page != (char *) NULL)
222 (void) ParseAbsoluteGeometry(image_info->page,&page);
224 Initialize Image structure.
226 image->columns=(size_t) floor((((double) page.width*image->resolution.x)/
228 image->rows=(size_t) floor((((double) page.height*image->resolution.y)/
230 status=SetImageExtent(image,image->columns,image->rows,exception);
231 if (status == MagickFalse)
232 return(DestroyImageList(image));
235 texture=(Image *) NULL;
236 if (image_info->texture != (char *) NULL)
241 read_info=CloneImageInfo(image_info);
242 SetImageInfoBlob(read_info,(void *) NULL,0);
243 (void) CopyMagickString(read_info->filename,image_info->texture,
245 texture=ReadImage(read_info,exception);
246 read_info=DestroyImageInfo(read_info);
249 Annotate the text image.
251 (void) SetImageBackgroundColor(image,exception);
252 draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
253 (void) CloneString(&draw_info->text,image_info->filename);
254 (void) FormatLocaleString(geometry,MagickPathExtent,"%gx%g%+g%+g",(double)
255 image->columns,(double) image->rows,(double) page.x,(double) page.y);
256 (void) CloneString(&draw_info->geometry,geometry);
257 status=GetTypeMetrics(image,draw_info,&metrics,exception);
258 if (status == MagickFalse)
259 ThrowReaderException(TypeError,"UnableToGetTypeMetrics");
260 page.y=(ssize_t) ceil((double) page.y+metrics.ascent-0.5);
261 (void) FormatLocaleString(geometry,MagickPathExtent,"%gx%g%+g%+g",(double)
262 image->columns,(double) image->rows,(double) page.x,(double) page.y);
263 (void) CloneString(&draw_info->geometry,geometry);
264 (void) CopyMagickString(filename,image_info->filename,MagickPathExtent);
265 if (*draw_info->text != '\0')
266 *draw_info->text='\0';
268 for (offset=2*page.y; p != (char *) NULL; )
271 Annotate image with text.
273 (void) ConcatenateString(&draw_info->text,text);
274 (void) ConcatenateString(&draw_info->text,"\n");
275 offset+=(ssize_t) (metrics.ascent-metrics.descent);
276 if (image->previous == (Image *) NULL)
278 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) offset,
280 if (status == MagickFalse)
283 p=ReadBlobString(image,text);
284 if ((offset < (ssize_t) image->rows) && (p != (char *) NULL))
286 if (texture != (Image *) NULL)
288 MagickProgressMonitor
291 progress_monitor=SetImageProgressMonitor(image,
292 (MagickProgressMonitor) NULL,image->client_data);
293 (void) TextureImage(image,texture,exception);
294 (void) SetImageProgressMonitor(image,progress_monitor,
297 (void) AnnotateImage(image,draw_info,exception);
298 if (p == (char *) NULL)
301 Page is full-- allocate next image structure.
303 *draw_info->text='\0';
305 AcquireNextImage(image_info,image,exception);
306 if (GetNextImageInList(image) == (Image *) NULL)
308 image=DestroyImageList(image);
309 return((Image *) NULL);
311 image->next->columns=image->columns;
312 image->next->rows=image->rows;
313 image=SyncNextImageInList(image);
314 (void) CopyMagickString(image->filename,filename,MagickPathExtent);
315 (void) SetImageBackgroundColor(image,exception);
316 status=SetImageProgress(image,LoadImagesTag,TellBlob(image),
318 if (status == MagickFalse)
321 if (texture != (Image *) NULL)
323 MagickProgressMonitor
326 progress_monitor=SetImageProgressMonitor(image,
327 (MagickProgressMonitor) NULL,image->client_data);
328 (void) TextureImage(image,texture,exception);
329 (void) SetImageProgressMonitor(image,progress_monitor,image->client_data);
331 (void) AnnotateImage(image,draw_info,exception);
332 if (texture != (Image *) NULL)
333 texture=DestroyImage(texture);
334 draw_info=DestroyDrawInfo(draw_info);
335 (void) CloseBlob(image);
336 return(GetFirstImageInList(image));
340 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
344 % R e a d T X T I m a g e %
348 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
350 % ReadTXTImage() reads a text file and returns it as an image. It allocates
351 % the memory necessary for the new Image structure and returns a pointer to
354 % The format of the ReadTXTImage method is:
356 % Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
358 % A description of each parameter follows:
360 % o image_info: the image info.
362 % o exception: return any errors or warnings in this structure.
365 static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
368 colorspace[MagickPathExtent],
369 text[MagickPathExtent];
408 assert(image_info != (const ImageInfo *) NULL);
409 assert(image_info->signature == MagickCoreSignature);
410 if (image_info->debug != MagickFalse)
411 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
412 image_info->filename);
413 assert(exception != (ExceptionInfo *) NULL);
414 assert(exception->signature == MagickCoreSignature);
415 image=AcquireImage(image_info,exception);
416 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
417 if (status == MagickFalse)
419 image=DestroyImageList(image);
420 return((Image *) NULL);
422 (void) ResetMagickMemory(text,0,sizeof(text));
423 (void) ReadBlobString(image,text);
424 if (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) != 0)
425 return(ReadTEXTImage(image_info,image,text,exception));
432 count=(ssize_t) sscanf(text+32,"%lu,%lu,%lu,%s",&width,&height,&max_value,
434 if ((count != 4) || (width == 0) || (height == 0) || (max_value == 0))
435 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
436 image->columns=width;
438 for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++) ;
440 status=SetImageExtent(image,image->columns,image->rows,exception);
441 if (status == MagickFalse)
442 return(DestroyImageList(image));
443 LocaleLower(colorspace);
444 i=(ssize_t) strlen(colorspace)-1;
445 image->alpha_trait=UndefinedPixelTrait;
446 if ((i > 0) && (colorspace[i] == 'a'))
449 image->alpha_trait=BlendPixelTrait;
451 type=ParseCommandOption(MagickColorspaceOptions,MagickFalse,colorspace);
453 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
454 (void) SetImageBackgroundColor(image,exception);
455 (void) SetImageColorspace(image,(ColorspaceType) type,exception);
456 GetPixelInfo(image,&pixel);
457 range=GetQuantumRange(image->depth);
458 for (y=0; y < (ssize_t) image->rows; y++)
472 for (x=0; x < (ssize_t) image->columns; x++)
474 if (ReadBlobString(image,text) == (char *) NULL)
476 switch (image->colorspace)
480 if (image->alpha_trait != UndefinedPixelTrait)
482 count=(ssize_t) sscanf(text,"%ld,%ld: (%lf%*[%,]%lf%*[%,]",
483 &x_offset,&y_offset,&red,&alpha);
488 count=(ssize_t) sscanf(text,"%ld,%ld: (%lf%*[%,]",&x_offset,
496 if (image->alpha_trait != UndefinedPixelTrait)
498 count=(ssize_t) sscanf(text,
499 "%ld,%ld: (%lf%*[%,]%lf%*[%,]%lf%*[%,]%lf%*[%,]%lf%*[%,]",
500 &x_offset,&y_offset,&red,&green,&blue,&black,&alpha);
503 count=(ssize_t) sscanf(text,
504 "%ld,%ld: (%lf%*[%,]%lf%*[%,]%lf%*[%,]%lf%*[%,]",&x_offset,
505 &y_offset,&red,&green,&blue,&black);
510 if (image->alpha_trait != UndefinedPixelTrait)
512 count=(ssize_t) sscanf(text,
513 "%ld,%ld: (%lf%*[%,]%lf%*[%,]%lf%*[%,]%lf%*[%,]",
514 &x_offset,&y_offset,&red,&green,&blue,&alpha);
517 count=(ssize_t) sscanf(text,
518 "%ld,%ld: (%lf%*[%,]%lf%*[%,]%lf%*[%,]",&x_offset,
519 &y_offset,&red,&green,&blue);
523 if (strchr(text,'%') != (char *) NULL)
531 if (image->colorspace == LabColorspace)
533 green+=(range+1)/2.0;
536 pixel.red=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (red+0.5),
538 pixel.green=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (green+0.5),
540 pixel.blue=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (blue+0.5),
542 pixel.black=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (black+0.5),
544 pixel.alpha=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (alpha+0.5),
546 q=GetAuthenticPixels(image,(ssize_t) x_offset,(ssize_t) y_offset,1,1,
548 if (q == (Quantum *) NULL)
550 SetPixelViaPixelInfo(image,&pixel,q);
551 if (SyncAuthenticPixels(image,exception) == MagickFalse)
555 (void) ReadBlobString(image,text);
556 if (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) == 0)
559 Allocate next image structure.
561 AcquireNextImage(image_info,image,exception);
562 if (GetNextImageInList(image) == (Image *) NULL)
564 image=DestroyImageList(image);
565 return((Image *) NULL);
567 image=SyncNextImageInList(image);
568 status=SetImageProgress(image,LoadImagesTag,TellBlob(image),
570 if (status == MagickFalse)
573 } while (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) == 0);
574 (void) CloseBlob(image);
575 return(GetFirstImageInList(image));
579 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
583 % R e g i s t e r T X T I m a g e %
587 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
589 % RegisterTXTImage() adds attributes for the TXT image format to the
590 % list of supported formats. The attributes include the image format
591 % tag, a method to read and/or write the format, whether the format
592 % supports the saving of more than one frame to the same file or blob,
593 % whether the format supports native in-memory I/O, and a brief
594 % description of the format.
596 % The format of the RegisterTXTImage method is:
598 % size_t RegisterTXTImage(void)
601 ModuleExport size_t RegisterTXTImage(void)
606 entry=AcquireMagickInfo("TXT","SPARSE-COLOR","Sparse Color");
607 entry->encoder=(EncodeImageHandler *) WriteTXTImage;
608 entry->flags|=CoderRawSupportFlag;
609 entry->flags|=CoderEndianSupportFlag;
610 (void) RegisterMagickInfo(entry);
611 entry=AcquireMagickInfo("TXT","TEXT","Text");
612 entry->decoder=(DecodeImageHandler *) ReadTEXTImage;
613 entry->format_type=ImplicitFormatType;
614 entry->flags|=CoderRawSupportFlag;
615 entry->flags|=CoderEndianSupportFlag;
616 (void) RegisterMagickInfo(entry);
617 entry=AcquireMagickInfo("TXT","TXT","Text");
618 entry->decoder=(DecodeImageHandler *) ReadTXTImage;
619 entry->encoder=(EncodeImageHandler *) WriteTXTImage;
620 entry->magick=(IsImageFormatHandler *) IsTXT;
621 (void) RegisterMagickInfo(entry);
622 return(MagickImageCoderSignature);
626 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
630 % U n r e g i s t e r T X T I m a g e %
634 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
636 % UnregisterTXTImage() removes format registrations made by the
637 % TXT module from the list of supported format.
639 % The format of the UnregisterTXTImage method is:
641 % UnregisterTXTImage(void)
644 ModuleExport void UnregisterTXTImage(void)
646 (void) UnregisterMagickInfo("SPARSE-COLOR");
647 (void) UnregisterMagickInfo("TEXT");
648 (void) UnregisterMagickInfo("TXT");
652 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
656 % W r i t e T X T I m a g e %
660 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
662 % WriteTXTImage writes the pixel values as text numbers.
664 % The format of the WriteTXTImage method is:
666 % MagickBooleanType WriteTXTImage(const ImageInfo *image_info,
667 % Image *image,ExceptionInfo *exception)
669 % A description of each parameter follows.
671 % o image_info: the image info.
673 % o image: The image.
675 % o exception: return any errors or warnings in this structure.
678 static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image,
679 ExceptionInfo *exception)
682 buffer[MagickPathExtent],
683 colorspace[MagickPathExtent],
684 tuple[MagickPathExtent];
695 register const Quantum
705 Open output image file.
707 assert(image_info != (const ImageInfo *) NULL);
708 assert(image_info->signature == MagickCoreSignature);
709 assert(image != (Image *) NULL);
710 assert(image->signature == MagickCoreSignature);
711 if (image->debug != MagickFalse)
712 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
713 status=OpenBlob(image_info,image,WriteBlobMode,exception);
714 if (status == MagickFalse)
725 (void) CopyMagickString(colorspace,CommandOptionToMnemonic(
726 MagickColorspaceOptions,(ssize_t) image->colorspace),MagickPathExtent);
727 LocaleLower(colorspace);
728 image->depth=GetImageQuantumDepth(image,MagickTrue);
729 if (image->alpha_trait != UndefinedPixelTrait)
730 (void) ConcatenateMagickString(colorspace,"a",MagickPathExtent);
731 compliance=NoCompliance;
732 value=GetImageOption(image_info,"txt:compliance");
733 if (value != (char *) NULL)
734 compliance=(ComplianceType) ParseCommandOption(MagickComplianceOptions,
736 if (LocaleCompare(image_info->magick,"SPARSE-COLOR") != 0)
741 depth=compliance == SVGCompliance ? image->depth :
742 MAGICKCORE_QUANTUM_DEPTH;
743 (void) FormatLocaleString(buffer,MagickPathExtent,
744 "# ImageMagick pixel enumeration: %.20g,%.20g,%.20g,%s\n",(double)
745 image->columns,(double) image->rows,(double) ((MagickOffsetType)
746 GetQuantumRange(depth)),colorspace);
747 (void) WriteBlobString(image,buffer);
749 GetPixelInfo(image,&pixel);
750 for (y=0; y < (ssize_t) image->rows; y++)
752 p=GetVirtualPixels(image,0,y,image->columns,1,exception);
753 if (p == (const Quantum *) NULL)
755 for (x=0; x < (ssize_t) image->columns; x++)
757 GetPixelInfoPixel(image,p,&pixel);
758 if (pixel.colorspace == LabColorspace)
760 pixel.green-=(QuantumRange+1)/2.0;
761 pixel.blue-=(QuantumRange+1)/2.0;
763 if (LocaleCompare(image_info->magick,"SPARSE-COLOR") == 0)
768 if (GetPixelAlpha(image,p) == (Quantum) OpaqueAlpha)
770 GetColorTuple(&pixel,MagickFalse,tuple);
771 (void) FormatLocaleString(buffer,MagickPathExtent,
772 "%.20g,%.20g,",(double) x,(double) y);
773 (void) WriteBlobString(image,buffer);
774 (void) WriteBlobString(image,tuple);
775 (void) WriteBlobString(image," ");
777 p+=GetPixelChannels(image);
780 (void) FormatLocaleString(buffer,MagickPathExtent,"%.20g,%.20g: ",
781 (double) x,(double) y);
782 (void) WriteBlobString(image,buffer);
783 (void) CopyMagickString(tuple,"(",MagickPathExtent);
784 if (pixel.colorspace == GRAYColorspace)
785 ConcatenateColorComponent(&pixel,GrayPixelChannel,compliance,
789 ConcatenateColorComponent(&pixel,RedPixelChannel,compliance,tuple);
790 (void) ConcatenateMagickString(tuple,",",MagickPathExtent);
791 ConcatenateColorComponent(&pixel,GreenPixelChannel,compliance,
793 (void) ConcatenateMagickString(tuple,",",MagickPathExtent);
794 ConcatenateColorComponent(&pixel,BluePixelChannel,compliance,tuple);
796 if (pixel.colorspace == CMYKColorspace)
798 (void) ConcatenateMagickString(tuple,",",MagickPathExtent);
799 ConcatenateColorComponent(&pixel,BlackPixelChannel,compliance,
802 if (pixel.alpha_trait != UndefinedPixelTrait)
804 (void) ConcatenateMagickString(tuple,",",MagickPathExtent);
805 ConcatenateColorComponent(&pixel,AlphaPixelChannel,compliance,
808 (void) ConcatenateMagickString(tuple,")",MagickPathExtent);
809 (void) WriteBlobString(image,tuple);
810 (void) WriteBlobString(image," ");
811 GetColorTuple(&pixel,MagickTrue,tuple);
812 (void) FormatLocaleString(buffer,MagickPathExtent,"%s",tuple);
813 (void) WriteBlobString(image,buffer);
814 (void) WriteBlobString(image," ");
815 (void) QueryColorname(image,&pixel,SVGCompliance,tuple,exception);
816 (void) WriteBlobString(image,tuple);
817 (void) WriteBlobString(image,"\n");
818 p+=GetPixelChannels(image);
820 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
822 if (status == MagickFalse)
825 if (GetNextImageInList(image) == (Image *) NULL)
827 image=SyncNextImageInList(image);
828 status=SetImageProgress(image,SaveImagesTag,scene++,
829 GetImageListLength(image));
830 if (status == MagickFalse)
832 } while (image_info->adjoin != MagickFalse);
833 (void) CloseBlob(image);