Custom shapes cropping
You can crop an image based on any custom shape. Do this by having your own custom image as a mask for cropping, setting the overlay
parameter as your mask image's public ID and setting the flags
parameter to cutter
(in URLs: l_<mask_image>,fl_cutter
).
cl_image_tag("pasta.png", :transformation=>[ {:width=>173, :height=>200, :crop=>"fill"}, {:overlay=>"hexagon_sample", :flags=>"cutter"} ])
cl_image_tag("pasta.png", array("transformation"=>array( array("width"=>173, "height"=>200, "crop"=>"fill"), array("overlay"=>"hexagon_sample", "flags"=>"cutter") )))
CloudinaryImage("pasta.png").image(transformation=[ {"width": 173, "height": 200, "crop": "fill"}, {"overlay": "hexagon_sample", "flags": "cutter"} ])
cloudinary.image("pasta.png", {transformation: [ {width: 173, height: 200, crop: "fill"}, {overlay: "hexagon_sample", flags: "cutter"} ]})
cloudinary.url().transformation(new Transformation() .width(173).height(200).crop("fill").chain() .overlay("hexagon_sample").flags("cutter")).imageTag("pasta.png")
$.cloudinary.image("pasta.png", {transformation: [ {width: 173, height: 200, crop: "fill"}, {overlay: "hexagon_sample", flags: "cutter"} ]})
cloudinary.Api.UrlImgUp.Transform(new Transformation() .Width(173).Height(200).Crop("fill").Chain() .Overlay("hexagon_sample").Flags("cutter")).BuildImageTag("pasta.png")