I am using ImageMagick to export glyphs from a font. However, some of these glyphs are smaller than others, and end up not being in the center of the image as a result of that. I am looking for a way to take a created image and center it on a transparent canvas. I am guessing this means that first the image should be cropped to remove all transparent regions around it, but I am not sure about that.
The ImageMagick command I'm using right now is:
convert -size 32x32 canvas:none -channel RGBA -font Fontname -pointsize 32 -fill white -gravity center -draw text 0,0 'a' ./image_cache/a.png