5

How do you determine the color mode of a .png file? So if its black and white (grayscale) vs. RGB vs. RGB+transparency?

Can you do this without installing software? I am on windows (though I'm sure Mac/Linux users would like a answer too)

1 Answers1

2

On *nix environments (Linux/MacOS) the file command should do it:

$> file aaa.png
aaa.png: PNG image data, 225 x 225, 8-bit colormap, non-interlaced

This exists on Windows via the WSL if it's enabled/installed, but I don't have a Windows machine to test it on.

See also: What is the equivalent to the Linux File command for windows?

Catskul
  • 1,061