Changing a single pixel to be slightly transparent
Posted: 2018-07-25T20:15:06-07:00
Use case: Social networks Twitter and Tumblr convert all PNGs to JPGs, sometimes substantially lowering their quality, unless the PNG has transparency. A single pixel being 'only' 99% opaque counts as transparency.
Is there any way to use ImageMagick to make a single pixel (e.g. 0,0) very slightly transparent without changing its RGB values? Just setting the A value to 0xFE for example. I can safely assume images have no transparency yet as I can detect images which do and upload as-is.
Is there any way to use ImageMagick to make a single pixel (e.g. 0,0) very slightly transparent without changing its RGB values? Just setting the A value to 0xFE for example. I can safely assume images have no transparency yet as I can detect images which do and upload as-is.