In Java, load the image and lookup the color of the top left pixel. Then run:
Code: Select all
convert image.bmp -type Palette -channel Index -transparent-color "lookedUpPixelColor" image.png
Any ideas for what I'm doing wrong?
Any ideas for how to do this without using Java to read the first pixel? I read other posts and found that I can get the first pixel by cropping and then calling -text:- or something, but that wouldn't save me time because then I need to write code to parse out the pixel color and input that text into the above line.
There must be an easier way to set an image's background as transparent
Much thanks in advance,
Jeff