Replace transparency in PNG images with white background

后端 未结 16 737
再見小時候
再見小時候 2020-11-29 14:48

I\'ve got some PNG images with transparency, and I need to create versions with the image layer composed onto a white background. I\'ve tried various things with Image Magi

16条回答
  •  半阙折子戏
    2020-11-29 15:47

    Using -flatten made me completely mad because -flatten in combination with mogrify crop and resizing simply doesn't work. The official and for me only correct way is to "remove" the alpha channel.

    -alpha remove -alpha off (not needed with JPG)

    See documention: http://www.imagemagick.org/Usage/masking/#remove

提交回复
热议问题