Original
Center objects using trim
Center an object within an image with a solid background. Do this by first trimming the background around the object (e_trim
) and then pad (c_lpad
) and resize the canvas to the image's initial width (w_iw
) and height (h_ih
).