Skip to content

Commit

Permalink
Use correct image to get the number of channels.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Jul 20, 2019
1 parent dfbd6dd commit eede548
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions coders/icon.c
Expand Up @@ -1139,7 +1139,7 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
bit=0;
byte=0;
}
p+=GetPixelChannels(image);
p+=GetPixelChannels(next);
}
if (bit != 0)
*q++=(unsigned char) (byte << (8-bit));
Expand Down Expand Up @@ -1180,7 +1180,7 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
nibble=0;
byte=0;
}
p+=GetPixelChannels(image);
p+=GetPixelChannels(next);
}
if (nibble != 0)
*q++=(unsigned char) (byte << 4);
Expand All @@ -1207,7 +1207,7 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
for (x=0; x < (ssize_t) next->columns; x++)
{
*q++=(unsigned char) GetPixelIndex(next,p);
p+=GetPixelChannels(image);
p+=GetPixelChannels(next);
}
if (next->previous == (Image *) NULL)
{
Expand Down

0 comments on commit eede548

Please sign in to comment.