Trim whitespace, make backgrounds transparent, and build centered/padded square variants of an uploaded logo with ImageMagick — then swap the result into a Rails view.