2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 % Read/Write Raw CCIR 601 4:1:1 or 4:2:2 Image Format %
20 % Copyright 1999-2015 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/blob.h"
44 #include "MagickCore/blob-private.h"
45 #include "MagickCore/cache.h"
46 #include "MagickCore/colorspace.h"
47 #include "MagickCore/constitute.h"
48 #include "MagickCore/exception.h"
49 #include "MagickCore/exception-private.h"
50 #include "MagickCore/geometry.h"
51 #include "MagickCore/image.h"
52 #include "MagickCore/image-private.h"
53 #include "MagickCore/list.h"
54 #include "MagickCore/magick.h"
55 #include "MagickCore/memory_.h"
56 #include "MagickCore/monitor.h"
57 #include "MagickCore/monitor-private.h"
58 #include "MagickCore/pixel-accessor.h"
59 #include "MagickCore/resize.h"
60 #include "MagickCore/quantum-private.h"
61 #include "MagickCore/static.h"
62 #include "MagickCore/string_.h"
63 #include "MagickCore/module.h"
64 #include "MagickCore/utility.h"
69 static MagickBooleanType
70 WriteYUVImage(const ImageInfo *,Image *,ExceptionInfo *);
73 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
77 % R e a d Y U V I m a g e %
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83 % ReadYUVImage() reads an image with digital YUV (CCIR 601 4:1:1, plane
84 % or partition interlaced, or 4:2:2 plane, partition interlaced or
85 % noninterlaced) bytes and returns it. It allocates the memory necessary
86 % for the new Image structure and returns a pointer to the new image.
88 % The format of the ReadYUVImage method is:
90 % Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
92 % A description of each parameter follows:
94 % o image_info: the image info.
96 % o exception: return any errors or warnings in this structure.
99 static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
112 register const Quantum
121 register unsigned char
135 Allocate image structure.
137 assert(image_info != (const ImageInfo *) NULL);
138 assert(image_info->signature == MagickSignature);
139 if (image_info->debug != MagickFalse)
140 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
141 image_info->filename);
142 assert(exception != (ExceptionInfo *) NULL);
143 assert(exception->signature == MagickSignature);
144 image=AcquireImage(image_info,exception);
145 if ((image->columns == 0) || (image->rows == 0))
146 ThrowReaderException(OptionError,"MustSpecifyImageSize");
147 status=SetImageExtent(image,image->columns,image->rows,exception);
148 if (status == MagickFalse)
149 return(DestroyImageList(image));
150 quantum=image->depth <= 8 ? 1 : 2;
151 interlace=image_info->interlace;
154 if (image_info->sampling_factor != (char *) NULL)
162 flags=ParseGeometry(image_info->sampling_factor,&geometry_info);
163 horizontal_factor=(ssize_t) geometry_info.rho;
164 vertical_factor=(ssize_t) geometry_info.sigma;
165 if ((flags & SigmaValue) == 0)
166 vertical_factor=horizontal_factor;
167 if ((horizontal_factor != 1) && (horizontal_factor != 2) &&
168 (vertical_factor != 1) && (vertical_factor != 2))
169 ThrowReaderException(CorruptImageError,"UnexpectedSamplingFactor");
171 if ((interlace == UndefinedInterlace) ||
172 ((interlace == NoInterlace) && (vertical_factor == 2)))
174 interlace=NoInterlace; /* CCIR 4:2:2 */
175 if (vertical_factor == 2)
176 interlace=PlaneInterlace; /* CCIR 4:1:1 */
178 if (interlace != PartitionInterlace)
183 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
184 if (status == MagickFalse)
186 image=DestroyImageList(image);
187 return((Image *) NULL);
189 if (DiscardBlobBytes(image,image->offset) == MagickFalse)
190 ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
194 Allocate memory for a scanline.
196 if (interlace == NoInterlace)
197 scanline=(unsigned char *) AcquireQuantumMemory((size_t) 2UL*
198 image->columns+2UL,quantum*sizeof(*scanline));
200 scanline=(unsigned char *) AcquireQuantumMemory(image->columns,
201 quantum*sizeof(*scanline));
202 if (scanline == (unsigned char *) NULL)
203 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
206 chroma_image=CloneImage(image,(image->columns + horizontal_factor - 1) /
207 horizontal_factor, (image->rows + vertical_factor - 1) / vertical_factor,
208 MagickTrue,exception);
209 if (chroma_image == (Image *) NULL)
210 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
212 Convert raster image to pixel packets.
214 if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0))
215 if (image->scene >= (image_info->scene+image_info->number_scenes-1))
217 status=SetImageExtent(image,image->columns,image->rows,exception);
218 if (status == MagickFalse)
219 return(DestroyImageList(image));
220 if (interlace == PartitionInterlace)
222 AppendImageFormat("Y",image->filename);
223 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
224 if (status == MagickFalse)
226 image=DestroyImageList(image);
227 return((Image *) NULL);
230 for (y=0; y < (ssize_t) image->rows; y++)
235 if (interlace == NoInterlace)
237 if ((y > 0) || (GetPreviousImageInList(image) == (Image *) NULL))
238 count=ReadBlob(image,(size_t) (2*quantum*image->columns),scanline);
240 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
241 if (q == (Quantum *) NULL)
243 chroma_pixels=QueueAuthenticPixels(chroma_image,0,y,
244 chroma_image->columns,1,exception);
245 if (chroma_pixels == (Quantum *) NULL)
247 for (x=0; x < (ssize_t) image->columns; x+=2)
249 SetPixelRed(image,0,chroma_pixels);
251 SetPixelGreen(image,ScaleCharToQuantum(*p++),chroma_pixels);
254 SetPixelGreen(image,ScaleShortToQuantum(((*p) << 8) | *(p+1)),
259 SetPixelRed(image,ScaleCharToQuantum(*p++),q);
262 SetPixelRed(image,ScaleShortToQuantum(((*p) << 8) | *(p+1)),q);
265 SetPixelGreen(image,0,q);
266 SetPixelBlue(image,0,q);
267 q+=GetPixelChannels(image);
268 SetPixelGreen(image,0,q);
269 SetPixelBlue(image,0,q);
271 SetPixelBlue(image,ScaleCharToQuantum(*p++),chroma_pixels);
274 SetPixelBlue(image,ScaleShortToQuantum(((*p) << 8) | *(p+1)),
279 SetPixelRed(image,ScaleCharToQuantum(*p++),q);
282 SetPixelRed(image,ScaleShortToQuantum(((*p) << 8) | *(p+1)),q);
286 q+=GetPixelChannels(image);
291 if ((y > 0) || (GetPreviousImageInList(image) == (Image *) NULL))
292 count=ReadBlob(image,(size_t) quantum*image->columns,scanline);
294 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
295 if (q == (Quantum *) NULL)
297 for (x=0; x < (ssize_t) image->columns; x++)
300 SetPixelRed(image,ScaleCharToQuantum(*p++),q);
303 SetPixelRed(image,ScaleShortToQuantum(((*p) << 8) | *(p+1)),q);
306 SetPixelGreen(image,0,q);
307 SetPixelBlue(image,0,q);
308 q+=GetPixelChannels(image);
311 if (SyncAuthenticPixels(image,exception) == MagickFalse)
313 if (interlace == NoInterlace)
314 if (SyncAuthenticPixels(chroma_image,exception) == MagickFalse)
316 if (image->previous == (Image *) NULL)
318 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
320 if (status == MagickFalse)
324 if (interlace == PartitionInterlace)
326 (void) CloseBlob(image);
327 AppendImageFormat("U",image->filename);
328 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
329 if (status == MagickFalse)
331 image=DestroyImageList(image);
332 return((Image *) NULL);
335 if (interlace != NoInterlace)
337 for (y=0; y < (ssize_t) chroma_image->rows; y++)
339 count=ReadBlob(image,(size_t) quantum*chroma_image->columns,scanline);
341 q=QueueAuthenticPixels(chroma_image,0,y,chroma_image->columns,1,
343 if (q == (Quantum *) NULL)
345 for (x=0; x < (ssize_t) chroma_image->columns; x++)
347 SetPixelRed(chroma_image,0,q);
349 SetPixelGreen(chroma_image,ScaleCharToQuantum(*p++),q);
352 SetPixelGreen(chroma_image,ScaleShortToQuantum(((*p) << 8) |
356 SetPixelBlue(chroma_image,0,q);
357 q+=GetPixelChannels(chroma_image);
359 if (SyncAuthenticPixels(chroma_image,exception) == MagickFalse)
362 if (interlace == PartitionInterlace)
364 (void) CloseBlob(image);
365 AppendImageFormat("V",image->filename);
366 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
367 if (status == MagickFalse)
369 image=DestroyImageList(image);
370 return((Image *) NULL);
373 for (y=0; y < (ssize_t) chroma_image->rows; y++)
375 count=ReadBlob(image,(size_t) quantum*chroma_image->columns,scanline);
377 q=GetAuthenticPixels(chroma_image,0,y,chroma_image->columns,1,
379 if (q == (Quantum *) NULL)
381 for (x=0; x < (ssize_t) chroma_image->columns; x++)
384 SetPixelBlue(chroma_image,ScaleCharToQuantum(*p++),q);
387 SetPixelBlue(chroma_image,ScaleShortToQuantum(((*p) << 8) |
391 q+=GetPixelChannels(chroma_image);
393 if (SyncAuthenticPixels(chroma_image,exception) == MagickFalse)
400 resize_image=ResizeImage(chroma_image,image->columns,image->rows,
401 TriangleFilter,exception);
402 chroma_image=DestroyImage(chroma_image);
403 if (resize_image == (Image *) NULL)
404 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
405 for (y=0; y < (ssize_t) image->rows; y++)
407 q=GetAuthenticPixels(image,0,y,image->columns,1,exception);
408 chroma_pixels=GetVirtualPixels(resize_image,0,y,resize_image->columns,1,
410 if ((q == (Quantum *) NULL) ||
411 (chroma_pixels == (const Quantum *) NULL))
413 for (x=0; x < (ssize_t) image->columns; x++)
415 SetPixelGreen(image,GetPixelGreen(image,chroma_pixels),q);
416 SetPixelBlue(image,GetPixelBlue(image,chroma_pixels),q);
418 q+=GetPixelChannels(image);
420 if (SyncAuthenticPixels(image,exception) == MagickFalse)
423 resize_image=DestroyImage(resize_image);
424 SetImageColorspace(image,YCbCrColorspace,exception);
425 if (interlace == PartitionInterlace)
426 (void) CopyMagickString(image->filename,image_info->filename,
428 if (EOFBlob(image) != MagickFalse)
430 ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
435 Proceed to next image.
437 if (image_info->number_scenes != 0)
438 if (image->scene >= (image_info->scene+image_info->number_scenes-1))
440 if (interlace == NoInterlace)
441 count=ReadBlob(image,(size_t) (2*quantum*image->columns),scanline);
443 count=ReadBlob(image,(size_t) quantum*image->columns,scanline);
447 Allocate next image structure.
449 AcquireNextImage(image_info,image,exception);
450 if (GetNextImageInList(image) == (Image *) NULL)
452 image=DestroyImageList(image);
453 return((Image *) NULL);
455 image=SyncNextImageInList(image);
456 status=SetImageProgress(image,LoadImagesTag,TellBlob(image),
458 if (status == MagickFalse)
461 } while (count != 0);
462 scanline=(unsigned char *) RelinquishMagickMemory(scanline);
463 (void) CloseBlob(image);
464 return(GetFirstImageInList(image));
468 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
472 % R e g i s t e r Y U V I m a g e %
476 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
478 % RegisterYUVImage() adds attributes for the YUV image format to
479 % the list of supported formats. The attributes include the image format
480 % tag, a method to read and/or write the format, whether the format
481 % supports the saving of more than one frame to the same file or blob,
482 % whether the format supports native in-memory I/O, and a brief
483 % description of the format.
485 % The format of the RegisterYUVImage method is:
487 % size_t RegisterYUVImage(void)
490 ModuleExport size_t RegisterYUVImage(void)
495 entry=SetMagickInfo("YUV");
496 entry->decoder=(DecodeImageHandler *) ReadYUVImage;
497 entry->encoder=(EncodeImageHandler *) WriteYUVImage;
498 entry->flags^=CoderAdjoinFlag;
499 entry->flags|=CoderRawSupportFlag;
500 entry->description=ConstantString("CCIR 601 4:1:1 or 4:2:2");
501 entry->module=ConstantString("YUV");
502 (void) RegisterMagickInfo(entry);
503 return(MagickImageCoderSignature);
507 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
511 % U n r e g i s t e r Y U V I m a g e %
515 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
517 % UnregisterYUVImage() removes format registrations made by the
518 % YUV module from the list of supported formats.
520 % The format of the UnregisterYUVImage method is:
522 % UnregisterYUVImage(void)
525 ModuleExport void UnregisterYUVImage(void)
527 (void) UnregisterMagickInfo("YUV");
531 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
535 % W r i t e Y U V I m a g e %
539 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
541 % WriteYUVImage() writes an image to a file in the digital YUV
542 % (CCIR 601 4:1:1, plane or partition interlaced, or 4:2:2 plane, partition
543 % interlaced or noninterlaced) bytes and returns it.
545 % The format of the WriteYUVImage method is:
547 % MagickBooleanType WriteYUVImage(const ImageInfo *image_info,
548 % Image *image,ExceptionInfo *exception)
550 % A description of each parameter follows.
552 % o image_info: the image info.
554 % o image: The image.
556 % o exception: return any errors or warnings in this structure.
559 static MagickBooleanType WriteYUVImage(const ImageInfo *image_info,Image *image,
560 ExceptionInfo *exception)
575 register const Quantum
592 assert(image_info != (const ImageInfo *) NULL);
593 assert(image_info->signature == MagickSignature);
594 assert(image != (Image *) NULL);
595 assert(image->signature == MagickSignature);
596 if (image->debug != MagickFalse)
597 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
598 quantum=(size_t) (image->depth <= 8 ? 1 : 2);
599 interlace=image->interlace;
602 if (image_info->sampling_factor != (char *) NULL)
610 flags=ParseGeometry(image_info->sampling_factor,&geometry_info);
611 horizontal_factor=(ssize_t) geometry_info.rho;
612 vertical_factor=(ssize_t) geometry_info.sigma;
613 if ((flags & SigmaValue) == 0)
614 vertical_factor=horizontal_factor;
615 if ((horizontal_factor != 1) && (horizontal_factor != 2) &&
616 (vertical_factor != 1) && (vertical_factor != 2))
617 ThrowWriterException(CorruptImageError,"UnexpectedSamplingFactor");
619 if ((interlace == UndefinedInterlace) ||
620 ((interlace == NoInterlace) && (vertical_factor == 2)))
622 interlace=NoInterlace; /* CCIR 4:2:2 */
623 if (vertical_factor == 2)
624 interlace=PlaneInterlace; /* CCIR 4:1:1 */
626 if (interlace != PartitionInterlace)
629 Open output image file.
631 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
632 if (status == MagickFalse)
637 AppendImageFormat("Y",image->filename);
638 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
639 if (status == MagickFalse)
646 Sample image to an even width and height, if necessary.
648 image->depth=(size_t) (quantum == 1 ? 8 : 16);
649 width=image->columns+(image->columns & (horizontal_factor-1));
650 height=image->rows+(image->rows & (vertical_factor-1));
651 yuv_image=ResizeImage(image,width,height,TriangleFilter,exception);
652 if (yuv_image == (Image *) NULL)
654 (void) CloseBlob(image);
657 (void) TransformImageColorspace(yuv_image,YCbCrColorspace,exception);
661 chroma_image=ResizeImage(image,width/horizontal_factor,
662 height/vertical_factor,TriangleFilter,exception);
663 if (chroma_image == (Image *) NULL)
665 (void) CloseBlob(image);
668 (void) TransformImageColorspace(chroma_image,YCbCrColorspace,exception);
669 if (interlace == NoInterlace)
672 Write noninterlaced YUV.
674 for (y=0; y < (ssize_t) yuv_image->rows; y++)
676 p=GetVirtualPixels(yuv_image,0,y,yuv_image->columns,1,exception);
677 if (p == (const Quantum *) NULL)
679 s=GetVirtualPixels(chroma_image,0,y,chroma_image->columns,1,
681 if (s == (const Quantum *) NULL)
683 for (x=0; x < (ssize_t) yuv_image->columns; x++)
687 (void) WriteBlobByte(image,ScaleQuantumToChar(
688 GetPixelGreen(yuv_image,s)));
689 (void) WriteBlobByte(image,ScaleQuantumToChar(
690 GetPixelRed(yuv_image,p)));
691 p+=GetPixelChannels(yuv_image);
692 (void) WriteBlobByte(image,ScaleQuantumToChar(
693 GetPixelBlue(yuv_image,s)));
694 (void) WriteBlobByte(image,ScaleQuantumToChar(
695 GetPixelRed(yuv_image,p)));
699 (void) WriteBlobByte(image,ScaleQuantumToChar(
700 GetPixelGreen(yuv_image,s)));
701 (void) WriteBlobShort(image,ScaleQuantumToShort(
702 GetPixelRed(yuv_image,p)));
703 p+=GetPixelChannels(yuv_image);
704 (void) WriteBlobByte(image,ScaleQuantumToChar(
705 GetPixelBlue(yuv_image,s)));
706 (void) WriteBlobShort(image,ScaleQuantumToShort(
707 GetPixelRed(yuv_image,p)));
709 p+=GetPixelChannels(yuv_image);
713 if (image->previous == (Image *) NULL)
715 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
717 if (status == MagickFalse)
721 yuv_image=DestroyImage(yuv_image);
726 Initialize Y channel.
728 for (y=0; y < (ssize_t) yuv_image->rows; y++)
730 p=GetVirtualPixels(yuv_image,0,y,yuv_image->columns,1,exception);
731 if (p == (const Quantum *) NULL)
733 for (x=0; x < (ssize_t) yuv_image->columns; x++)
736 (void) WriteBlobByte(image,ScaleQuantumToChar(
737 GetPixelRed(yuv_image,p)));
739 (void) WriteBlobShort(image,ScaleQuantumToShort(
740 GetPixelRed(yuv_image,p)));
741 p+=GetPixelChannels(yuv_image);
743 if (image->previous == (Image *) NULL)
745 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
747 if (status == MagickFalse)
751 yuv_image=DestroyImage(yuv_image);
752 if (image->previous == (Image *) NULL)
754 status=SetImageProgress(image,SaveImageTag,1,3);
755 if (status == MagickFalse)
759 Initialize U channel.
761 if (interlace == PartitionInterlace)
763 (void) CloseBlob(image);
764 AppendImageFormat("U",image->filename);
765 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
766 if (status == MagickFalse)
769 for (y=0; y < (ssize_t) chroma_image->rows; y++)
771 p=GetVirtualPixels(chroma_image,0,y,chroma_image->columns,1,
773 if (p == (const Quantum *) NULL)
775 for (x=0; x < (ssize_t) chroma_image->columns; x++)
778 (void) WriteBlobByte(image,ScaleQuantumToChar(
779 GetPixelGreen(chroma_image,p)));
781 (void) WriteBlobShort(image,ScaleQuantumToShort(
782 GetPixelGreen(chroma_image,p)));
783 p+=GetPixelChannels(chroma_image);
786 if (image->previous == (Image *) NULL)
788 status=SetImageProgress(image,SaveImageTag,2,3);
789 if (status == MagickFalse)
793 Initialize V channel.
795 if (interlace == PartitionInterlace)
797 (void) CloseBlob(image);
798 AppendImageFormat("V",image->filename);
799 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
800 if (status == MagickFalse)
803 for (y=0; y < (ssize_t) chroma_image->rows; y++)
805 p=GetVirtualPixels(chroma_image,0,y,chroma_image->columns,1,
807 if (p == (const Quantum *) NULL)
809 for (x=0; x < (ssize_t) chroma_image->columns; x++)
812 (void) WriteBlobByte(image,ScaleQuantumToChar(
813 GetPixelBlue(chroma_image,p)));
815 (void) WriteBlobShort(image,ScaleQuantumToShort(
816 GetPixelBlue(chroma_image,p)));
817 p+=GetPixelChannels(chroma_image);
820 if (image->previous == (Image *) NULL)
822 status=SetImageProgress(image,SaveImageTag,2,3);
823 if (status == MagickFalse)
827 chroma_image=DestroyImage(chroma_image);
828 if (interlace == PartitionInterlace)
829 (void) CopyMagickString(image->filename,image_info->filename,
831 if (GetNextImageInList(image) == (Image *) NULL)
833 image=SyncNextImageInList(image);
834 status=SetImageProgress(image,SaveImagesTag,scene++,
835 GetImageListLength(image));
836 if (status == MagickFalse)
838 } while (image_info->adjoin != MagickFalse);
839 (void) CloseBlob(image);