]> granicus.if.org Git - imagemagick/blobdiff - coders/uyvy.c
(no commit message)
[imagemagick] / coders / uyvy.c
index 5b46dd475445252246f4581bc6be280b78283a84..83a936314032b95c51e64015ff08c89f6f112867 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2012 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  %
@@ -127,7 +127,7 @@ static Image *ReadUYVYImage(const ImageInfo *image_info,
       image_info->filename);
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
-  image=AcquireImage(image_info);
+  image=AcquireImage(image_info,exception);
   if ((image->columns == 0) || (image->rows == 0))
     ThrowReaderException(OptionError,"MustSpecifyImageSize");
   if ((image->columns % 2) != 0)
@@ -151,7 +151,7 @@ static Image *ReadUYVYImage(const ImageInfo *image_info,
   for (y=0; y < (ssize_t) image->rows; y++)
   {
     q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
-    if (q == (const Quantum *) NULL)
+    if (q == (Quantum *) NULL)
       break;
     for (x=0; x < (ssize_t) (image->columns >> 1); x++)
     {
@@ -175,7 +175,7 @@ static Image *ReadUYVYImage(const ImageInfo *image_info,
     if (status == MagickFalse)
       break;
   }
-  image->colorspace=YCbCrColorspace;
+  SetImageColorspace(image,YCbCrColorspace,exception);
   if (EOFBlob(image) != MagickFalse)
     ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
       image->filename);
@@ -330,7 +330,7 @@ static MagickBooleanType WriteUYVYImage(const ImageInfo *image_info,
   uyvy_image=CloneImage(image,0,0,MagickTrue,exception);
   if (uyvy_image == (Image *) NULL)
     return(MagickFalse);
-  (void) TransformImageColorspace(uyvy_image,YCbCrColorspace);
+  (void) TransformImageColorspace(uyvy_image,YCbCrColorspace,exception);
   full=MagickFalse;
   (void) ResetMagickMemory(&pixel,0,sizeof(PixelInfo));
   for (y=0; y < (ssize_t) image->rows; y++)