epiccurious / bitcoin-core-node-builder

Spin up a secure Bitcoin Core node with ease.
Other
3 stars 0 forks source link

Make the bitcoin.png background transparent #112

Closed epiccurious closed 1 year ago

epiccurious commented 1 year ago

It's tricky because we can't just make the white transparent.

epiccurious commented 1 year ago

Found a solution here: https://stackoverflow.com/questions/9155377/set-transparent-background-using-imagemagick-and-commandline-prompt

color=$( convert bitcoin.png -format "%[pixel:p{0,0}]" info:- )
convert bitcoin.png -alpha off -bordercolor $color -border 1 \( +clone -fuzz 3-% -fill none -floodfill +0+0 $color -alpha extract -geometry 200% -blur 0x0.5 -morphology erode square:1 -geometry 50% \) -compose CopyOpacity -composite -shave 1 transparent.png