2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 % Render Text Onto A Canvas Image. %
20 % Copyright 1999-2017 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 % https://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,%32s",&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,
160 ExceptionInfo *exception)
163 filename[MagickPathExtent],
164 geometry[MagickPathExtent],
166 text[MagickPathExtent];
193 assert(image_info != (const ImageInfo *) NULL);
194 assert(image_info->signature == MagickCoreSignature);
195 if (image_info->debug != MagickFalse)
196 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
197 image_info->filename);
198 assert(exception != (ExceptionInfo *) NULL);
199 assert(exception->signature == MagickCoreSignature);
200 image=AcquireImage(image_info,exception);
201 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
202 if (status == MagickFalse)
204 image=DestroyImageList(image);
205 return((Image *) NULL);
207 (void) ResetMagickMemory(text,0,sizeof(text));
208 (void) ReadBlobString(image,text);
210 Set the page geometry.
212 delta.x=DefaultResolution;
213 delta.y=DefaultResolution;
214 if ((image->resolution.x == 0.0) || (image->resolution.y == 0.0))
222 flags=ParseGeometry(PSDensityGeometry,&geometry_info);
223 image->resolution.x=geometry_info.rho;
224 image->resolution.y=geometry_info.sigma;
225 if ((flags & SigmaValue) == 0)
226 image->resolution.y=image->resolution.x;
232 if (image_info->page != (char *) NULL)
233 (void) ParseAbsoluteGeometry(image_info->page,&page);
235 Initialize Image structure.
237 image->columns=(size_t) floor((((double) page.width*image->resolution.x)/
239 image->rows=(size_t) floor((((double) page.height*image->resolution.y)/
241 status=SetImageExtent(image,image->columns,image->rows,exception);
242 if (status == MagickFalse)
243 return(DestroyImageList(image));
246 texture=(Image *) NULL;
247 if (image_info->texture != (char *) NULL)
252 read_info=CloneImageInfo(image_info);
253 SetImageInfoBlob(read_info,(void *) NULL,0);
254 (void) CopyMagickString(read_info->filename,image_info->texture,
256 texture=ReadImage(read_info,exception);
257 read_info=DestroyImageInfo(read_info);
260 Annotate the text image.
262 (void) SetImageBackgroundColor(image,exception);
263 draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
264 (void) CloneString(&draw_info->text,image_info->filename);
265 (void) FormatLocaleString(geometry,MagickPathExtent,"%gx%g%+g%+g",(double)
266 image->columns,(double) image->rows,(double) page.x,(double) page.y);
267 (void) CloneString(&draw_info->geometry,geometry);
268 status=GetTypeMetrics(image,draw_info,&metrics,exception);
269 if (status == MagickFalse)
270 ThrowReaderException(TypeError,"UnableToGetTypeMetrics");
271 page.y=(ssize_t) ceil((double) page.y+metrics.ascent-0.5);
272 (void) FormatLocaleString(geometry,MagickPathExtent,"%gx%g%+g%+g",(double)
273 image->columns,(double) image->rows,(double) page.x,(double) page.y);
274 (void) CloneString(&draw_info->geometry,geometry);
275 (void) CopyMagickString(filename,image_info->filename,MagickPathExtent);
276 if (*draw_info->text != '\0')
277 *draw_info->text='\0';
279 for (offset=2*page.y; p != (char *) NULL; )
282 Annotate image with text.
284 (void) ConcatenateString(&draw_info->text,text);
285 (void) ConcatenateString(&draw_info->text,"\n");
286 offset+=(ssize_t) (metrics.ascent-metrics.descent);
287 if (image->previous == (Image *) NULL)
289 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) offset,
291 if (status == MagickFalse)
294 p=ReadBlobString(image,text);
295 if ((offset < (ssize_t) image->rows) && (p != (char *) NULL))
297 if (texture != (Image *) NULL)
299 MagickProgressMonitor
302 progress_monitor=SetImageProgressMonitor(image,
303 (MagickProgressMonitor) NULL,image->client_data);
304 (void) TextureImage(image,texture,exception);
305 (void) SetImageProgressMonitor(image,progress_monitor,
308 (void) AnnotateImage(image,draw_info,exception);
309 if (p == (char *) NULL)
312 Page is full-- allocate next image structure.
314 *draw_info->text='\0';
316 AcquireNextImage(image_info,image,exception);
317 if (GetNextImageInList(image) == (Image *) NULL)
319 image=DestroyImageList(image);
320 return((Image *) NULL);
322 image->next->columns=image->columns;
323 image->next->rows=image->rows;
324 image=SyncNextImageInList(image);
325 (void) CopyMagickString(image->filename,filename,MagickPathExtent);
326 (void) SetImageBackgroundColor(image,exception);
327 status=SetImageProgress(image,LoadImagesTag,TellBlob(image),
329 if (status == MagickFalse)
332 if (texture != (Image *) NULL)
334 MagickProgressMonitor
337 progress_monitor=SetImageProgressMonitor(image,
338 (MagickProgressMonitor) NULL,image->client_data);
339 (void) TextureImage(image,texture,exception);
340 (void) SetImageProgressMonitor(image,progress_monitor,image->client_data);
342 (void) AnnotateImage(image,draw_info,exception);
343 if (texture != (Image *) NULL)
344 texture=DestroyImage(texture);
345 draw_info=DestroyDrawInfo(draw_info);
346 (void) CloseBlob(image);
347 return(GetFirstImageInList(image));
351 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
355 % R e a d T X T I m a g e %
359 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
361 % ReadTXTImage() reads a text file and returns it as an image. It allocates
362 % the memory necessary for the new Image structure and returns a pointer to
365 % The format of the ReadTXTImage method is:
367 % Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
369 % A description of each parameter follows:
371 % o image_info: the image info.
373 % o exception: return any errors or warnings in this structure.
376 static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
379 colorspace[MagickPathExtent],
380 text[MagickPathExtent];
419 assert(image_info != (const ImageInfo *) NULL);
420 assert(image_info->signature == MagickCoreSignature);
421 if (image_info->debug != MagickFalse)
422 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
423 image_info->filename);
424 assert(exception != (ExceptionInfo *) NULL);
425 assert(exception->signature == MagickCoreSignature);
426 image=AcquireImage(image_info,exception);
427 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
428 if (status == MagickFalse)
430 image=DestroyImageList(image);
431 return((Image *) NULL);
433 (void) ResetMagickMemory(text,0,sizeof(text));
434 (void) ReadBlobString(image,text);
435 if (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) != 0)
436 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
443 count=(ssize_t) sscanf(text+32,"%lu,%lu,%lu,%s",&width,&height,&max_value,
445 if ((count != 4) || (width == 0) || (height == 0) || (max_value == 0))
446 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
447 image->columns=width;
449 if ((max_value == 0) || (max_value > 4294967295UL))
450 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
451 for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++) ;
453 status=SetImageExtent(image,image->columns,image->rows,exception);
454 if (status == MagickFalse)
455 return(DestroyImageList(image));
456 LocaleLower(colorspace);
457 i=(ssize_t) strlen(colorspace)-1;
458 image->alpha_trait=UndefinedPixelTrait;
459 if ((i > 0) && (colorspace[i] == 'a'))
462 image->alpha_trait=BlendPixelTrait;
464 type=ParseCommandOption(MagickColorspaceOptions,MagickFalse,colorspace);
466 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
467 (void) SetImageBackgroundColor(image,exception);
468 (void) SetImageColorspace(image,(ColorspaceType) type,exception);
469 GetPixelInfo(image,&pixel);
470 range=GetQuantumRange(image->depth);
471 for (y=0; y < (ssize_t) image->rows; y++)
485 for (x=0; x < (ssize_t) image->columns; x++)
487 if (ReadBlobString(image,text) == (char *) NULL)
489 switch (image->colorspace)
493 if (image->alpha_trait != UndefinedPixelTrait)
495 count=(ssize_t) sscanf(text,"%ld,%ld: (%lf%*[%,]%lf%*[%,]",
496 &x_offset,&y_offset,&red,&alpha);
501 count=(ssize_t) sscanf(text,"%ld,%ld: (%lf%*[%,]",&x_offset,
509 if (image->alpha_trait != UndefinedPixelTrait)
511 count=(ssize_t) sscanf(text,
512 "%ld,%ld: (%lf%*[%,]%lf%*[%,]%lf%*[%,]%lf%*[%,]%lf%*[%,]",
513 &x_offset,&y_offset,&red,&green,&blue,&black,&alpha);
516 count=(ssize_t) sscanf(text,
517 "%ld,%ld: (%lf%*[%,]%lf%*[%,]%lf%*[%,]%lf%*[%,]",&x_offset,
518 &y_offset,&red,&green,&blue,&black);
523 if (image->alpha_trait != UndefinedPixelTrait)
525 count=(ssize_t) sscanf(text,
526 "%ld,%ld: (%lf%*[%,]%lf%*[%,]%lf%*[%,]%lf%*[%,]",
527 &x_offset,&y_offset,&red,&green,&blue,&alpha);
530 count=(ssize_t) sscanf(text,
531 "%ld,%ld: (%lf%*[%,]%lf%*[%,]%lf%*[%,]",&x_offset,
532 &y_offset,&red,&green,&blue);
536 if (strchr(text,'%') != (char *) NULL)
544 if (image->colorspace == LabColorspace)
546 green+=(range+1)/2.0;
549 pixel.red=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (red+0.5),
551 pixel.green=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (green+0.5),
553 pixel.blue=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (blue+0.5),
555 pixel.black=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (black+0.5),
557 pixel.alpha=(MagickRealType) ScaleAnyToQuantum((QuantumAny) (alpha+0.5),
559 q=GetAuthenticPixels(image,(ssize_t) x_offset,(ssize_t) y_offset,1,1,
561 if (q == (Quantum *) NULL)
563 SetPixelViaPixelInfo(image,&pixel,q);
564 if (SyncAuthenticPixels(image,exception) == MagickFalse)
568 (void) ReadBlobString(image,text);
569 if (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) == 0)
572 Allocate next image structure.
574 AcquireNextImage(image_info,image,exception);
575 if (GetNextImageInList(image) == (Image *) NULL)
577 image=DestroyImageList(image);
578 return((Image *) NULL);
580 image=SyncNextImageInList(image);
581 status=SetImageProgress(image,LoadImagesTag,TellBlob(image),
583 if (status == MagickFalse)
586 } while (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) == 0);
587 (void) CloseBlob(image);
588 return(GetFirstImageInList(image));
592 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
596 % R e g i s t e r T X T I m a g e %
600 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
602 % RegisterTXTImage() adds attributes for the TXT image format to the
603 % list of supported formats. The attributes include the image format
604 % tag, a method to read and/or write the format, whether the format
605 % supports the saving of more than one frame to the same file or blob,
606 % whether the format supports native in-memory I/O, and a brief
607 % description of the format.
609 % The format of the RegisterTXTImage method is:
611 % size_t RegisterTXTImage(void)
614 ModuleExport size_t RegisterTXTImage(void)
619 entry=AcquireMagickInfo("TXT","SPARSE-COLOR","Sparse Color");
620 entry->encoder=(EncodeImageHandler *) WriteTXTImage;
621 entry->flags|=CoderRawSupportFlag;
622 entry->flags|=CoderEndianSupportFlag;
623 (void) RegisterMagickInfo(entry);
624 entry=AcquireMagickInfo("TXT","TEXT","Text");
625 entry->decoder=(DecodeImageHandler *) ReadTEXTImage;
626 entry->format_type=ImplicitFormatType;
627 entry->flags|=CoderRawSupportFlag;
628 entry->flags|=CoderEndianSupportFlag;
629 (void) RegisterMagickInfo(entry);
630 entry=AcquireMagickInfo("TXT","TXT","Text");
631 entry->decoder=(DecodeImageHandler *) ReadTXTImage;
632 entry->encoder=(EncodeImageHandler *) WriteTXTImage;
633 entry->magick=(IsImageFormatHandler *) IsTXT;
634 (void) RegisterMagickInfo(entry);
635 return(MagickImageCoderSignature);
639 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
643 % U n r e g i s t e r T X T I m a g e %
647 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
649 % UnregisterTXTImage() removes format registrations made by the
650 % TXT module from the list of supported format.
652 % The format of the UnregisterTXTImage method is:
654 % UnregisterTXTImage(void)
657 ModuleExport void UnregisterTXTImage(void)
659 (void) UnregisterMagickInfo("SPARSE-COLOR");
660 (void) UnregisterMagickInfo("TEXT");
661 (void) UnregisterMagickInfo("TXT");
665 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
669 % W r i t e T X T I m a g e %
673 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
675 % WriteTXTImage writes the pixel values as text numbers.
677 % The format of the WriteTXTImage method is:
679 % MagickBooleanType WriteTXTImage(const ImageInfo *image_info,
680 % Image *image,ExceptionInfo *exception)
682 % A description of each parameter follows.
684 % o image_info: the image info.
686 % o image: The image.
688 % o exception: return any errors or warnings in this structure.
691 static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image,
692 ExceptionInfo *exception)
695 buffer[MagickPathExtent],
696 colorspace[MagickPathExtent],
697 tuple[MagickPathExtent];
708 register const Quantum
718 Open output image file.
720 assert(image_info != (const ImageInfo *) NULL);
721 assert(image_info->signature == MagickCoreSignature);
722 assert(image != (Image *) NULL);
723 assert(image->signature == MagickCoreSignature);
724 if (image->debug != MagickFalse)
725 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
726 status=OpenBlob(image_info,image,WriteBlobMode,exception);
727 if (status == MagickFalse)
738 (void) CopyMagickString(colorspace,CommandOptionToMnemonic(
739 MagickColorspaceOptions,(ssize_t) image->colorspace),MagickPathExtent);
740 LocaleLower(colorspace);
741 image->depth=GetImageQuantumDepth(image,MagickTrue);
742 if (image->alpha_trait != UndefinedPixelTrait)
743 (void) ConcatenateMagickString(colorspace,"a",MagickPathExtent);
744 compliance=NoCompliance;
745 value=GetImageOption(image_info,"txt:compliance");
746 if (value != (char *) NULL)
747 compliance=(ComplianceType) ParseCommandOption(MagickComplianceOptions,
749 if (LocaleCompare(image_info->magick,"SPARSE-COLOR") != 0)
754 depth=compliance == SVGCompliance ? image->depth :
755 MAGICKCORE_QUANTUM_DEPTH;
756 (void) FormatLocaleString(buffer,MagickPathExtent,
757 "# ImageMagick pixel enumeration: %.20g,%.20g,%.20g,%s\n",(double)
758 image->columns,(double) image->rows,(double) ((MagickOffsetType)
759 GetQuantumRange(depth)),colorspace);
760 (void) WriteBlobString(image,buffer);
762 GetPixelInfo(image,&pixel);
763 for (y=0; y < (ssize_t) image->rows; y++)
765 p=GetVirtualPixels(image,0,y,image->columns,1,exception);
766 if (p == (const Quantum *) NULL)
768 for (x=0; x < (ssize_t) image->columns; x++)
770 GetPixelInfoPixel(image,p,&pixel);
771 if (pixel.colorspace == LabColorspace)
773 pixel.green-=(QuantumRange+1)/2.0;
774 pixel.blue-=(QuantumRange+1)/2.0;
776 if (LocaleCompare(image_info->magick,"SPARSE-COLOR") == 0)
781 if (GetPixelAlpha(image,p) == (Quantum) OpaqueAlpha)
783 GetColorTuple(&pixel,MagickFalse,tuple);
784 (void) FormatLocaleString(buffer,MagickPathExtent,
785 "%.20g,%.20g,",(double) x,(double) y);
786 (void) WriteBlobString(image,buffer);
787 (void) WriteBlobString(image,tuple);
788 (void) WriteBlobString(image," ");
790 p+=GetPixelChannels(image);
793 (void) FormatLocaleString(buffer,MagickPathExtent,"%.20g,%.20g: ",
794 (double) x,(double) y);
795 (void) WriteBlobString(image,buffer);
796 (void) CopyMagickString(tuple,"(",MagickPathExtent);
797 if (pixel.colorspace == GRAYColorspace)
798 ConcatenateColorComponent(&pixel,GrayPixelChannel,compliance,tuple);
801 ConcatenateColorComponent(&pixel,RedPixelChannel,compliance,tuple);
802 (void) ConcatenateMagickString(tuple,",",MagickPathExtent);
803 ConcatenateColorComponent(&pixel,GreenPixelChannel,compliance,
805 (void) ConcatenateMagickString(tuple,",",MagickPathExtent);
806 ConcatenateColorComponent(&pixel,BluePixelChannel,compliance,tuple);
808 if (pixel.colorspace == CMYKColorspace)
810 (void) ConcatenateMagickString(tuple,",",MagickPathExtent);
811 ConcatenateColorComponent(&pixel,BlackPixelChannel,compliance,
814 if (pixel.alpha_trait != UndefinedPixelTrait)
816 (void) ConcatenateMagickString(tuple,",",MagickPathExtent);
817 ConcatenateColorComponent(&pixel,AlphaPixelChannel,compliance,
820 (void) ConcatenateMagickString(tuple,")",MagickPathExtent);
821 (void) WriteBlobString(image,tuple);
822 (void) WriteBlobString(image," ");
823 GetColorTuple(&pixel,MagickTrue,tuple);
824 (void) FormatLocaleString(buffer,MagickPathExtent,"%s",tuple);
825 (void) WriteBlobString(image,buffer);
826 (void) WriteBlobString(image," ");
827 (void) QueryColorname(image,&pixel,SVGCompliance,tuple,exception);
828 (void) WriteBlobString(image,tuple);
829 (void) WriteBlobString(image,"\n");
830 p+=GetPixelChannels(image);
832 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
834 if (status == MagickFalse)
837 if (GetNextImageInList(image) == (Image *) NULL)
839 image=SyncNextImageInList(image);
840 status=SetImageProgress(image,SaveImagesTag,scene++,
841 GetImageListLength(image));
842 if (status == MagickFalse)
844 } while (image_info->adjoin != MagickFalse);
845 (void) CloseBlob(image);