Creating a semi-transparent PNG with ImageMagick/convert

前端 未结 3 1601
野性不改
野性不改 2021-02-06 01:11

I have PNG files that I would like to convert the whole image to be semi-transparent.

The image will be referenced in a KML file as an icon overlay for use in Google Ear

3条回答
  •  一向
    一向 (楼主)
    2021-02-06 01:25

    Resolution has been found:

    convert input.png -alpha set -channel A -evaluate set 50% output.png
    

    The above command makes the entire image (all colors) semi-transparent.

    Another problem I had was that the latest version of ImageMagick was compiled from source without all the most recent image libraries installed (in particular libpng). Pay close attention to the output of configure to ensure libpng is found if compiling from source. It also appears that versions of ImageMagick earlier than 6.6 and/or older versions of libpng may not support transparent png generation.

提交回复
热议问题