Trim photo background

Apply the trim filter to remove the edges around the image. Do this by setting the effect parameter to trim (e_trim in URLs). You can customize the color similarity tolerance between 0 and 100. The default level is10`.

Original

Original

Trimmed

Trimmed

Custom level

Custom level
Ruby:
cl_image_tag("business_man_padded.jpg", :effect=>"trim")
PHP:
cl_image_tag("business_man_padded.jpg", array("effect"=>"trim"))
Python:
CloudinaryImage("business_man_padded.jpg").image(effect="trim")
Node.js:
cloudinary.image("business_man_padded.jpg", {effect: "trim"})
Java:
cloudinary.url().transformation(new Transformation().effect("trim")).imageTag("business_man_padded.jpg")
JS:
cl.imageTag('business_man_padded.jpg', {effect: "trim"}).toHtml();
jQuery:
$.cloudinary.image("business_man_padded.jpg", {effect: "trim"})
React:
<Image publicId="business_man_padded.jpg" >
  <Transformation effect="trim" />
</Image>
Angular:
<cl-image public-id="business_man_padded.jpg" >
  <cl-transformation effect="trim">
  </cl-transformation>
</cl-image>
.Net:
cloudinary.Api.UrlImgUp.Transform(new Transformation().Effect("trim")).BuildImageTag("business_man_padded.jpg")
Android:
MediaManager.get().url().transformation(new Transformation().effect("trim")).generate("business_man_padded.jpg")
by Itay Taragano