% Read/Write 16bit/pixel Interleaved YUV Image Format %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% July 1992 %
% %
% %
-% Copyright 1999-2011 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 %
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)
(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.
*/
if (status == MagickFalse)
break;
}
- image->colorspace=YCbCrColorspace;
+ SetImageColorspace(image,YCbCrColorspace,exception);
if (EOFBlob(image) != MagickFalse)
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
image->filename);
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);
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++)