...
ImageMagic can be used to convert the white background of token raster image to transparent:
Code Block |
---|
convert test_bigtoken.png -transparent "#ffffff" token_transparent.png |
Sizing
To resize the PNG file called test_big.png to 32x32 pixels, into a file called test_32x32.png:
Code Block |
---|
magick testtoken_big.png -resize 32x32 testtoken_32x32.png |
Both commands (transparency and resizing) can be combined into one command:
Code Block |
---|
magick convert -transparent "#ffffff" testtoken_big.png -resize 32x32 testtoken_32x32.png |
Juxtaposing the token image on the bottle image
Code Block |
---|
composite -geometry +250+500 token.png white_bottle.jpeg -define png:color-type=6 juxt.png |
Adding the token address as metadata to the token image
Code Block |
---|
MTBMBP:tokens mbarrow$ magick MTB21.png -set comment '0x69d3Af30c63F5bd916bBcD79b58dBc8BD16D0308' bottle2.png
MTBMBP:tokens mbarrow$ identify -format %c MTB21.png
MTBMBP:tokens 0x69d3Af30c63F5bd916bBcD79b58dBc8BD16D0308 |
Converting from SVG to PNG
...