Center objects using trim
Center objects using trim
Filters and effects
Presentation
Printing
Intermediate

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).

* A green border was added (bo_4px_solid_green) to better demonstrate the object position within the image.

Here is the original image: Original

https://res.cloudinary.com/demo/image/upload/bo_4px_solid_green/nice_bird.jpg

And here it is after trimming, padding, and resizing: Trimmed and Padded

https://res.cloudinary.com/demo/image/upload/e_trim/c_lpad,w_iw,h_ih/bo_4px_solid_green/nice_bird.jpg