2

Using ImageMagick, based on rlogo_icon.h. #!/bin/sh echo 'unsigned long rlogo_icon[] = {' identify -format '%w, %h,' $1 convert $1 -color-matrix '0 0 1 0, 0 1 0 0, 1 0 0 0, 0 0 0 1' RGBA:- | hexdump -v -e '1/4 "0x%08x,\n"' echo '};' Usage: ./script.sh rlogo_icon.png > rlogo_icon.h I'm not sure this -color-matrix is always correct. I placed bytes in ...


2

extent must be used after background and gravity, e.g.: gm convert -resize '1920x1080>' -background black -gravity SouthEast -extent 1920x1080 infile outfile or gm convert infile -resize '1920x1080>' -background black -gravity SouthEast -extent 1920x1080 outfile


Only top voted, non community-wiki answers of a minimum length are eligible