The first thing that I tried was Image Magick. Weirdly, it's 'identify' tool always shows that PNGs are 8-bit ones.
I have a lot of PNGs and want to find the ones with alpha to split the transparency layer out.
The first thing that I tried was Image Magick. Weirdly, it's 'identify' tool always shows that PNGs are 8-bit ones.
I have a lot of PNGs and want to find the ones with alpha to split the transparency layer out.
You could give this one a try (from Stack Overflow):
This should print "rgba" if an alpha channel is present, "rgb" else.Code:identify -format '%[channels]' foo.png
http://schnaader.info
Damn kids. They're all alike.
It works, thank you.![]()
pngcheck displays if a picture is in 32-bits or 24-bits mode the same goes for grey+alpha (16-bits) and gray (8-bits, 4 bits, 2-bits and even 1-bit), for instance:
OK: xx.png (210x210, 32-bit RGB+alpha, non-interlaced, 71.9%).
OK: yy.png (559x702, 24-bit RGB, non-interlaced, 38.9%).
There is also a tool included called pngsplit, which dumps the IDATs and other chunks, but I am looking for a tool that would split a PNG into independent PNGs capable of
being recognized by Precomp. Specifically, I want to save RGBA pngs to grayscale PNG for each channel and be able to recombine them:
convert globe_x.png -channel G -separate 01grn.png // convert globe_x.png -channel R -separate 00red.png // convert globe_x.png -channel B -separate 02blu.png // convert -alpha extract globe_x.png 04alpha.png
But combining them does not result in original image: convert 00red.png 01grn.png 02blu.png -combine copy_opacity x-04alpha.png -composite out.png
Files attached.