Why am I getting colors for 4 channels from a png image?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Kennynguyen111
Posts: 1
Joined: 2019-10-04T21:00:40-07:00
Authentication code: 1152

Why am I getting colors for 4 channels from a png image?

Post by Kennynguyen111 »

Don't PNG images only have 3 color channels?

e.g., #EDEDE9E9E1E1

identify -ping -format \"%w %h %k %b\" $tmp_fp_file
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Why am I getting colors for 4 channels from a png image?

Post by fmw42 »

No they can have 4 if you count the alpha channel. But you have 12 hex values. So that means you have a 3 channel 16 bit image. Your imagemagick is likely Q16 (default) which means 16-bit compile. So you can get that kind of value for colors. See https://imagemagick.org/script/color.php
Post Reply