I have a 4-channel image (RGBA). I want to reduce its channel count from 4 to 3.
The method I am using currently is to Right click and Save as a
.png file. After that when I
Import it in Mathematica, the channel count is reduced to 3. Is there a more elegant way to do that?
RemoveAlphaChannel function won't work. Because that will change the appearance of the original image (see the example below).
This is a 4-channel picture from ref / AlphaChannel:
img = Import @ "https://i.stack.imgur.com/XvzDc.png"
This is the 3-channel picture which is what I want:
If I use
RemoveAlphaChannel, I will get this picture instead: