Opaquing the translucent

convert input.png -fill "#3171b5" -opaque none output.jpg

Where #3171b5 is a colour.

Background:

I realised that the header image on my journal was 200kb big. Now we may all have fat pipes these days but there’s still no excuse for a 200kb decoration. Until lossy PNGs appear, I’m just going to have to use a JPEG. What this means, though is that I’ll have to abandon the nice transparent corners.

So, imagemagick to the rescue. How to replace the transparent bits with the colour of my journal’s background? (See above :−) The result is a less obese 44kb.

No comments

Post a comment


Name:  
Remember personal info?

Email:
URL:
Comment: Emoticons / Textile

This is not a trick question, but a mechanism for spam prevention.
 

  ( Register your username / Log in )

Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Powered by Pivot. RSS Feed & ATOM Feed