magick input.png -background white -flatten output.png

Category: Media & Conversion

magick input.png -background white -flatten output.png

Flatten transparency onto a background

Flattens transparency onto a white background, replacing see-through areas with white. Needed before saving to formats like JPEG that do not support transparency. -background changes the fill color.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.