]> granicus.if.org Git - imagemagick/blobdiff - coders/uyvy.c
(no commit message)
[imagemagick] / coders / uyvy.c
index f4283b9b47b1edc813e136994c6e376c6b4940ac..08b36605664837cebc4125db04f3867cbc6ed282 100644 (file)
 %            Read/Write 16bit/pixel Interleaved YUV Image Format              %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2015 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -145,6 +145,9 @@ static Image *ReadUYVYImage(const ImageInfo *image_info,
       (void) CloseBlob(image);
       return(GetFirstImageInList(image));
     }
+  status=SetImageExtent(image,image->columns,image->rows,exception);
+  if (status == MagickFalse)
+    return(DestroyImageList(image));
   /*
     Accumulate UYVY, then unpack into two pixels.
   */
@@ -214,18 +217,18 @@ ModuleExport size_t RegisterUYVYImage(void)
   entry=SetMagickInfo("PAL");
   entry->decoder=(DecodeImageHandler *) ReadUYVYImage;
   entry->encoder=(EncodeImageHandler *) WriteUYVYImage;
-  entry->adjoin=MagickFalse;
-  entry->raw=MagickTrue;
-  entry->endian_support=MagickTrue;
+  entry->flags^=CoderAdjoinFlag;
+  entry->flags|=CoderRawSupportFlag;
+  entry->flags|=CoderEndianSupportFlag;
   entry->description=ConstantString("16bit/pixel interleaved YUV");
   entry->module=ConstantString("UYVY");
   (void) RegisterMagickInfo(entry);
   entry=SetMagickInfo("UYVY");
   entry->decoder=(DecodeImageHandler *) ReadUYVYImage;
   entry->encoder=(EncodeImageHandler *) WriteUYVYImage;
-  entry->adjoin=MagickFalse;
-  entry->raw=MagickTrue;
-  entry->endian_support=MagickTrue;
+  entry->flags^=CoderAdjoinFlag;
+  entry->flags|=CoderRawSupportFlag;
+  entry->flags|=CoderEndianSupportFlag;
   entry->description=ConstantString("16bit/pixel interleaved YUV");
   entry->module=ConstantString("UYVY");
   (void) RegisterMagickInfo(entry);