Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Apr 1, 2023
1 parent e30c693 commit 499b59d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions magick/quantum.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,30 +310,30 @@ MagickExport size_t GetQuantumExtent(const Image *image,
const QuantumInfo *quantum_info,const QuantumType quantum_type)
{
size_t
packet_size;
channels;

assert(quantum_info != (QuantumInfo *) NULL);
assert(quantum_info->signature == MagickCoreSignature);
packet_size=1;
channels=1;
switch (quantum_type)
{
case GrayAlphaQuantum: packet_size=2; break;
case IndexAlphaQuantum: packet_size=2; break;
case RGBQuantum: packet_size=3; break;
case BGRQuantum: packet_size=3; break;
case RGBAQuantum: packet_size=4; break;
case RGBOQuantum: packet_size=4; break;
case BGRAQuantum: packet_size=4; break;
case CMYKQuantum: packet_size=4; break;
case CMYKAQuantum: packet_size=5; break;
case CbYCrAQuantum: packet_size=4; break;
case CbYCrQuantum: packet_size=3; break;
case CbYCrYQuantum: packet_size=4; break;
case GrayAlphaQuantum: channels=2; break;
case IndexAlphaQuantum: channels=2; break;
case RGBQuantum: channels=3; break;
case BGRQuantum: channels=3; break;
case RGBAQuantum: channels=4; break;
case RGBOQuantum: channels=4; break;
case BGRAQuantum: channels=4; break;
case CMYKQuantum: channels=4; break;
case CMYKAQuantum: channels=5; break;
case CbYCrAQuantum: channels=4; break;
case CbYCrQuantum: channels=3; break;
case CbYCrYQuantum: channels=4; break;
default: break;
}
if (quantum_info->pack == MagickFalse)
return((size_t) (packet_size*image->columns*((quantum_info->depth+7)/8)));
return((size_t) ((packet_size*image->columns*quantum_info->depth+7)/8));
return((size_t) (channels*image->columns*((quantum_info->depth+7)/8)));
return((size_t) ((channels*image->columns*quantum_info->depth+7)/8));
}

/*
Expand Down

0 comments on commit 499b59d

Please sign in to comment.