From 3b232224b3c8f3def3a3e83fc58cec3ecbb039ec Mon Sep 17 00:00:00 2001 From: cristy Date: Mon, 5 Nov 2012 16:55:17 +0000 Subject: [PATCH] --- coders/dpx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/coders/dpx.c b/coders/dpx.c index c1eb7af5e..2ff7fcd80 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -372,9 +372,8 @@ static MagickBooleanType IsDPX(const unsigned char *magick,const size_t extent) % */ -static size_t GetBytesPerRow(size_t columns, - size_t samples_per_pixel,size_t bits_per_pixel, - MagickBooleanType pad) +static size_t GetBytesPerRow(size_t columns,size_t samples_per_pixel, + size_t bits_per_pixel,MagickBooleanType pad) { size_t bytes_per_row; @@ -1843,9 +1842,10 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image, if ((horizontal_factor == 2) || (vertical_factor == 2)) quantum_type=CbYCrYQuantum; } - extent=GetBytesPerRow(image->columns,image->alpha_trait == BlendPixelTrait ? 4UL : 3UL, - image->depth,MagickTrue); - if ((image_info->type != TrueColorType) && (image->alpha_trait != BlendPixelTrait) && + extent=GetBytesPerRow(image->columns,image->alpha_trait == BlendPixelTrait ? + 4UL : 3UL,image->depth,MagickTrue); + if ((image_info->type != TrueColorType) && + (image->alpha_trait != BlendPixelTrait) && (IsImageGray(image,exception) != MagickFalse)) { quantum_type=GrayQuantum; -- 2.40.0