Alpha Channel Extract of Non-Alpha PNG
Posted: 2012-04-29T08:48:06-07:00
I am extracting the alpha channel from PNGs with the following command (ver 6.7.6-5 on Win7 64 bit):
If the PNG contains an alpha channel it is extracted correctly, with white pixels where the mask is transparent (and the original image should be displayed).
==>
But if the PNG does not have an alpha channel, I expect the extract to be entirely white (as the entire image should be displayed).
But it is exported as black
==> (expected white )
Can anyone suggest how to extract a white mask when the PNG does not have an alpha-channel?
Or, how to convert only the all-black images to white (and leaving the images with white&black as they are)?
Thanks!
Nadav
Code: Select all
convert Alpha.png -channel Alpha -level 50% -separate "Alpha_mask.bmp"
==>
But if the PNG does not have an alpha channel, I expect the extract to be entirely white (as the entire image should be displayed).
But it is exported as black
==> (expected white )
Can anyone suggest how to extract a white mask when the PNG does not have an alpha-channel?
Or, how to convert only the all-black images to white (and leaving the images with white&black as they are)?
Thanks!
Nadav