{"id":21528,"date":"2017-05-22T14:38:51","date_gmt":"2017-05-22T14:38:51","guid":{"rendered":"http:\/\/how_to_pad_images_with_automatic_color_selection"},"modified":"2025-03-02T09:36:34","modified_gmt":"2025-03-02T17:36:34","slug":"how_to_pad_images_with_automatic_color_selection","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection","title":{"rendered":"How to pad images with automatic color selection"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>How you present the content of your website can be just as important as the content itself. The images you display need to conform to the graphic design of your site, and every image needs to fit within a predefined size. Although that may be simple enough to achieve when you are dealing with your own images, the task can be more challenging when displaying images uploaded by your users.<\/p>\n<p>Your users could potentially upload their images in a variety of resolutions and sizes. This means you need to adjust the images on-the-fly to fit within the available space defined by your graphic design. However, for images that are uploaded with a different aspect ratio than the area reserved to display it, a simple <a href=\"https:\/\/cloudinary.com\/documentation\/resizing_and_cropping\">scaled resize<\/a> will result in extra space either above and below the image or on the left and right. It also could affect the spacing of other elements on your page. To make sure you end up with an image that is the right size to fill all of the available space, you will generally need to add padding to the image as well, either using PHP, Python, JS, CSS or by transforming the original image.<\/p>\n<p>To tackle this challenge effectively, understanding the concept of padding and its application is key.<\/p>\n<h2>What is Padding?<\/h2>\n<p>Padding in the context of images refers to the addition of extra space around the image. This space doesn\u2019t contain any part of the original image but is instead filled with a solid color or a pattern. The purpose of padding is to adjust the overall dimensions of the image to fit into a specific area without altering the original aspect ratio of the image itself. By adding padding, you can ensure that the image fills the designated space completely, maintaining the aesthetic harmony of your website\u2019s design while avoiding unwanted stretching or squashing of the image.<\/p>\n<h2>Simple image padding<\/h2>\n<p>Now the question becomes, how do you add  padding to the image so that the end result fits properly and looks professional? We could simply decide that the extra padding added to all the images needs to conform to a specific color, for example: white. You could use CSS for this purpose, but Cloudinary makes this process much easier to accomplish. Cloudinary offers a comprehensive end-to-end solution for all elements of image and media management, enabling web and app developers to invest their full focus on the main purpose of their own site, or app. To add padding to image in a specific color with Cloudinary, you use one of the padding crop modes together with the background parameter set to the color you want. For example, padding the bottle image with white so that it fits within a height and width of 300 pixels, along with a black border:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;bottle.jpg\\&quot;, {transformation: [ {width: 300, height: 300, background: \\&quot;white\\&quot;, crop: \\&quot;pad\\&quot;}, {border: \\&quot;2px_solid_black\\&quot;} ]})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;bottle.jpg\\&quot;, {transformation: [\\n  {width: 300, height: 300, background: \\&quot;white\\&quot;, crop: \\&quot;pad\\&quot;},\\n  {border: \\&quot;2px_solid_black\\&quot;}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;bottle.jpg\\&quot; &gt; &lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;white\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;Transformation border=\\&quot;2px_solid_black\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;bottle.jpg\\&quot; &gt;\\n\\t&lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;white\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n\\t&lt;Transformation border=\\&quot;2px_solid_black\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;bottle.jpg\\&quot; &gt; &lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;white\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;cld-transformation border=\\&quot;2px_solid_black\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;bottle.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;white\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation border=\\&quot;2px_solid_black\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;bottle.jpg\\&quot; &gt; &lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;white\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation border=\\&quot;2px_solid_black\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;bottle.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;white\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation border=\\&quot;2px_solid_black\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;bottle.jpg&#039;, {transformation: [ {width: 300, height: 300, background: \\&quot;white\\&quot;, crop: \\&quot;pad\\&quot;}, {border: \\&quot;2px_solid_black\\&quot;} ]}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;bottle.jpg&#039;, {transformation: [\\n  {width: 300, height: 300, background: \\&quot;white\\&quot;, crop: \\&quot;pad\\&quot;},\\n  {border: \\&quot;2px_solid_black\\&quot;}\\n  ]}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;bottle.jpg\\&quot;).image(transformation=[ {&#039;width&#039;: 300, &#039;height&#039;: 300, &#039;background&#039;: \\&quot;white\\&quot;, &#039;crop&#039;: \\&quot;pad\\&quot;}, {&#039;border&#039;: \\&quot;2px_solid_black\\&quot;} ])&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;bottle.jpg\\&quot;).image(transformation=[\\n  {&#039;width&#039;: 300, &#039;height&#039;: 300, &#039;background&#039;: \\&quot;white\\&quot;, &#039;crop&#039;: \\&quot;pad\\&quot;},\\n  {&#039;border&#039;: \\&quot;2px_solid_black\\&quot;}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;bottle.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::color(Color::WHITE))\\n\\t)\\n\\t-&gt;border(Border::solid(2,Color::BLACK));&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;bottle.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::color(Color::WHITE))\\n\\t)\\n\\t-&gt;border(Border::solid(2,Color::BLACK));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;bottle.jpg\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array( array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;white\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;), array(\\&quot;border\\&quot;=&gt;\\&quot;2px_solid_black\\&quot;) )))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;bottle.jpg\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array(\\n  array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;white\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;),\\n  array(\\&quot;border\\&quot;=&gt;\\&quot;2px_solid_black\\&quot;)\\n  )))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;white\\&quot;).crop(\\&quot;pad\\&quot;).chain() .border(\\&quot;2px_solid_black\\&quot;)).imageTag(\\&quot;bottle.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation()\\n  .width(300).height(300).background(\\&quot;white\\&quot;).crop(\\&quot;pad\\&quot;).chain()\\n  .border(\\&quot;2px_solid_black\\&quot;)).imageTag(\\&quot;bottle.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;bottle.jpg\\&quot;, transformation: [ {width: 300, height: 300, background: \\&quot;white\\&quot;, crop: \\&quot;pad\\&quot;}, {border: \\&quot;2px_solid_black\\&quot;} ])&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;bottle.jpg\\&quot;, transformation: [\\n  {width: 300, height: 300, background: \\&quot;white\\&quot;, crop: \\&quot;pad\\&quot;},\\n  {border: \\&quot;2px_solid_black\\&quot;}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;white\\&quot;).Crop(\\&quot;pad\\&quot;).Chain() .Border(\\&quot;2px_solid_black\\&quot;)).BuildImageTag(\\&quot;bottle.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation()\\n  .Width(300).Height(300).Background(\\&quot;white\\&quot;).Crop(\\&quot;pad\\&quot;).Chain()\\n  .Border(\\&quot;2px_solid_black\\&quot;)).BuildImageTag(\\&quot;bottle.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;bottle.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.color(Color.WHITE))\\n\\t)\\n\\t.border(Border.solid(2,Color.BLACK)));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;bottle.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.color(Color.WHITE))\\n\\t)\\n\\t.border(Border.solid(2,Color.BLACK)));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;white\\&quot;).setCrop(\\&quot;pad\\&quot;).chain() .setBorder(\\&quot;2px_solid_black\\&quot;)).generate(\\&quot;bottle.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()\\n  .setWidth(300).setHeight(300).setBackground(\\&quot;white\\&quot;).setCrop(\\&quot;pad\\&quot;).chain()\\n  .setBorder(\\&quot;2px_solid_black\\&quot;)).generate(\\&quot;bottle.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;white\\&quot;).crop(\\&quot;pad\\&quot;).chain() .border(\\&quot;2px_solid_black\\&quot;)).generate(\\&quot;bottle.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation()\\n  .width(300).height(300).background(\\&quot;white\\&quot;).crop(\\&quot;pad\\&quot;).chain()\\n  .border(\\&quot;2px_solid_black\\&quot;)).generate(\\&quot;bottle.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;bottle.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.color(Color.WHITE))\\n\\t)\\n\\t.border(Border.solid(2,Color.BLACK)));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;bottle.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.color(Color.WHITE))\\n\\t)\\n\\t.border(Border.solid(2,Color.BLACK)));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;bottle.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.color(Color.WHITE))\\n\\t })\\n\\t border(Border.solid(2,Color.BLACK)) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;bottle.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.color(Color.WHITE))\\n\\t })\\n\\t border(Border.solid(2,Color.BLACK)) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;bottle.jpg\\&quot;, {transformation: [ {width: 300, height: 300, background: \\&quot;white\\&quot;, crop: \\&quot;pad\\&quot;}, {border: \\&quot;2px_solid_black\\&quot;} ]})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;bottle.jpg\\&quot;, {transformation: [\\n  {width: 300, height: 300, background: \\&quot;white\\&quot;, crop: \\&quot;pad\\&quot;},\\n  {border: \\&quot;2px_solid_black\\&quot;}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(color(\\&quot;white\\&quot;))\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/w_300,h_300,c_pad,b_white\\\/bo_2px_solid_black\\\/bottle.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;width&quot;:&quot;300&quot;,&quot;height&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;white&quot;},{&quot;border&quot;:&quot;2px_solid_black&quot;}],&quot;transformation_string&quot;:&quot;w_300,h_300,c_pad,b_white\\\/bo_2px_solid_black&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;bottle.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_white\/bo_2px_solid_black\/bottle.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_white\/bo_2px_solid_black\/bottle.jpg\" alt=\"Image with white padding\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"304\" height=\"304\"\/><\/a><\/p>\n<h2>Automatic color padding<\/h2>\n<p>Setting a uniform color for all padding might be a good solution for some of your images, but what if you could automatically set the padding color based on the color of the border pixels in the image? Any padding added would then have the effect of extending the image canvas, and make it appear as if the padded region is actually part of the image itself. Guess what? Cloudinary makes this simple too. All you have to do is set the background parameter to auto (b_auto in URLs). For example, here\u2019s the same bottle image as above, but now with automatic color padding:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;bottle.jpg\\&quot;, {transformation: [ {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;}, {border: \\&quot;2px_solid_black\\&quot;} ]})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;bottle.jpg\\&quot;, {transformation: [\\n  {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;},\\n  {border: \\&quot;2px_solid_black\\&quot;}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;bottle.jpg\\&quot; &gt; &lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;Transformation border=\\&quot;2px_solid_black\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;bottle.jpg\\&quot; &gt;\\n\\t&lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n\\t&lt;Transformation border=\\&quot;2px_solid_black\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;bottle.jpg\\&quot; &gt; &lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;cld-transformation border=\\&quot;2px_solid_black\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;bottle.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n\\t&lt;cld-transformation border=\\&quot;2px_solid_black\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;bottle.jpg\\&quot; &gt; &lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;cl-transformation border=\\&quot;2px_solid_black\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;bottle.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n\\t&lt;cl-transformation border=\\&quot;2px_solid_black\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;bottle.jpg&#039;, {transformation: [ {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;}, {border: \\&quot;2px_solid_black\\&quot;} ]}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;bottle.jpg&#039;, {transformation: [\\n  {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;},\\n  {border: \\&quot;2px_solid_black\\&quot;}\\n  ]}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;bottle.jpg\\&quot;).image(transformation=[ {&#039;width&#039;: 300, &#039;height&#039;: 300, &#039;background&#039;: \\&quot;auto\\&quot;, &#039;crop&#039;: \\&quot;pad\\&quot;}, {&#039;border&#039;: \\&quot;2px_solid_black\\&quot;} ])&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;bottle.jpg\\&quot;).image(transformation=[\\n  {&#039;width&#039;: 300, &#039;height&#039;: 300, &#039;background&#039;: \\&quot;auto\\&quot;, &#039;crop&#039;: \\&quot;pad\\&quot;},\\n  {&#039;border&#039;: \\&quot;2px_solid_black\\&quot;}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;bottle.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t)\\n\\t-&gt;border(Border::solid(2,Color::BLACK));&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;bottle.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t)\\n\\t-&gt;border(Border::solid(2,Color::BLACK));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;bottle.jpg\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array( array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;), array(\\&quot;border\\&quot;=&gt;\\&quot;2px_solid_black\\&quot;) )))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;bottle.jpg\\&quot;, array(\\&quot;transformation\\&quot;=&gt;array(\\n  array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;),\\n  array(\\&quot;border\\&quot;=&gt;\\&quot;2px_solid_black\\&quot;)\\n  )))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;).chain() .border(\\&quot;2px_solid_black\\&quot;)).imageTag(\\&quot;bottle.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation()\\n  .width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;).chain()\\n  .border(\\&quot;2px_solid_black\\&quot;)).imageTag(\\&quot;bottle.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;bottle.jpg\\&quot;, transformation: [ {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;}, {border: \\&quot;2px_solid_black\\&quot;} ])&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;bottle.jpg\\&quot;, transformation: [\\n  {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;},\\n  {border: \\&quot;2px_solid_black\\&quot;}\\n  ])&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Crop(\\&quot;pad\\&quot;).Chain() .Border(\\&quot;2px_solid_black\\&quot;)).BuildImageTag(\\&quot;bottle.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation()\\n  .Width(300).Height(300).Background(\\&quot;auto\\&quot;).Crop(\\&quot;pad\\&quot;).Chain()\\n  .Border(\\&quot;2px_solid_black\\&quot;)).BuildImageTag(\\&quot;bottle.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;bottle.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.border(Border.solid(2,Color.BLACK)));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;bottle.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.border(Border.solid(2,Color.BLACK)));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setCrop(\\&quot;pad\\&quot;).chain() .setBorder(\\&quot;2px_solid_black\\&quot;)).generate(\\&quot;bottle.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()\\n  .setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setCrop(\\&quot;pad\\&quot;).chain()\\n  .setBorder(\\&quot;2px_solid_black\\&quot;)).generate(\\&quot;bottle.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;).chain() .border(\\&quot;2px_solid_black\\&quot;)).generate(\\&quot;bottle.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation()\\n  .width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;).chain()\\n  .border(\\&quot;2px_solid_black\\&quot;)).generate(\\&quot;bottle.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;bottle.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.border(Border.solid(2,Color.BLACK)));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;bottle.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.border(Border.solid(2,Color.BLACK)));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;bottle.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.auto())\\n\\t })\\n\\t border(Border.solid(2,Color.BLACK)) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;bottle.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.auto())\\n\\t })\\n\\t border(Border.solid(2,Color.BLACK)) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;bottle.jpg\\&quot;, {transformation: [ {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;}, {border: \\&quot;2px_solid_black\\&quot;} ]})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;bottle.jpg\\&quot;, {transformation: [\\n  {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;},\\n  {border: \\&quot;2px_solid_black\\&quot;}\\n  ]})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;bottle.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .border(solid(2, \\&quot;black\\&quot;));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/w_300,h_300,c_pad,b_auto\\\/bo_2px_solid_black\\\/bottle.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;width&quot;:&quot;300&quot;,&quot;height&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto&quot;},{&quot;border&quot;:&quot;2px_solid_black&quot;}],&quot;transformation_string&quot;:&quot;w_300,h_300,c_pad,b_auto\\\/bo_2px_solid_black&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;bottle.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto\/bo_2px_solid_black\/bottle.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto\/bo_2px_solid_black\/bottle.jpg\" alt=\"Image with a solid background and automatic color padding\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"304\" height=\"304\"\/><\/a><\/p>\n<p>Here\u2019s another example that highlights the difference between using a value of <code>black<\/code> for padding in the left image and <code>auto<\/code> color padding on the right:<\/p>\n<p><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_black\/white_sweater.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_black\/white_sweater.jpg\" alt=\"Photograph with a solid background and black padding\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a>\n<a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto\/white_sweater.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto\/white_sweater.jpg\" alt=\"Photograph with a solid background and automatic color padding\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a>\n<br>\n<cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;white_sweater.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;white_sweater.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;white_sweater.jpg\\&quot; &gt; &lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;white_sweater.jpg\\&quot; &gt;\\n\\t&lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;white_sweater.jpg\\&quot; &gt; &lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;white_sweater.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;white_sweater.jpg\\&quot; &gt; &lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;white_sweater.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;white_sweater.jpg&#039;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;white_sweater.jpg&#039;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).image(width=300, height=300, background=\\&quot;auto\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).image(width=300, height=300, background=\\&quot;auto\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;white_sweater.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;white_sweater.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;white_sweater.jpg\\&quot;, array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;white_sweater.jpg\\&quot;, array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;white_sweater.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;white_sweater.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;white_sweater.jpg\\&quot;, width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;white_sweater.jpg\\&quot;, width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;white_sweater.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;white_sweater.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;white_sweater.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;white_sweater.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;white_sweater.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;white_sweater.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;white_sweater.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;white_sweater.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;white_sweater.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;white_sweater.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;white_sweater.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.auto())\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;white_sweater.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.auto())\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;white_sweater.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;white_sweater.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;white_sweater.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/w_300,h_300,c_pad,b_auto\\\/white_sweater.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;width&quot;:&quot;300&quot;,&quot;height&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto&quot;}],&quot;transformation_string&quot;:&quot;w_300,h_300,c_pad,b_auto&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;white_sweater.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto\/white_sweater.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto\/white_sweater.jpg\" alt=\"Sample image using the crop, face detection, rounded corners and resize features\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a><\/p>\n<p>Automatically selecting the padding color is a great solution for images with a solid background color, but it also gives good results on images without a solid background color. For example, take a look at this <code>dog<\/code> image with automatic color padding:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;dog.jpg\\&quot; &gt; &lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;dog.jpg\\&quot; &gt; &lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;dog.jpg\\&quot; &gt; &lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;dog.jpg&#039;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;dog.jpg&#039;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;dog.jpg\\&quot;).image(width=300, height=300, background=\\&quot;auto\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;dog.jpg\\&quot;).image(width=300, height=300, background=\\&quot;auto\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;dog.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;dog.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;dog.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;dog.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;dog.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;dog.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;dog.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.auto())\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;dog.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.auto())\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(auto())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/w_300,h_300,c_pad,b_auto\\\/dog.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;width&quot;:&quot;300&quot;,&quot;height&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto&quot;}],&quot;transformation_string&quot;:&quot;w_300,h_300,c_pad,b_auto&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;dog.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto\/dog.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto\/dog.jpg\" alt=\"Image with a spectrum of background colors and automatic color padding\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a><\/p>\n<h2>Fade the image into the padding<\/h2>\n<p>We can see in the example above that the predominant color has been calculated to be a particular shade of green, resulting in a visually pleasing padded image. The jump between the image and the border may feel somewhat stark, but we can fade the picture into the padding by applying the <code>gradient_fade<\/code> effect with a value of <code>symmetric_pad<\/code> (<code>e_gradient_fade:symmetric_pad<\/code> in URLs). For example, the same <code>dog<\/code> image as above, but now with the image faded into the padding:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;dog.jpg\\&quot; &gt; &lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;dog.jpg\\&quot; &gt; &lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;dog.jpg\\&quot; &gt; &lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;dog.jpg&#039;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;dog.jpg&#039;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;dog.jpg\\&quot;).image(width=300, height=300, background=\\&quot;auto\\&quot;, effect=\\&quot;gradient_fade:symmetric_pad\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;dog.jpg\\&quot;).image(width=300, height=300, background=\\&quot;auto\\&quot;, effect=\\&quot;gradient_fade:symmetric_pad\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;dog.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t)\\n\\t-&gt;effect(Effect::gradientFade()\\n\\t-&gt;type(\\n\\tGradientFade::symmetricPad())\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;dog.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t)\\n\\t-&gt;effect(Effect::gradientFade()\\n\\t-&gt;type(\\n\\tGradientFade::symmetricPad())\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;effect\\&quot;=&gt;\\&quot;gradient_fade:symmetric_pad\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;effect\\&quot;=&gt;\\&quot;gradient_fade:symmetric_pad\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;dog.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;dog.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;dog.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;dog.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.effect(Effect.gradientFade()\\n\\t.type(\\n\\tGradientFade.symmetricPad())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.effect(Effect.gradientFade()\\n\\t.type(\\n\\tGradientFade.symmetricPad())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setEffect(\\&quot;gradient_fade:symmetric_pad\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setEffect(\\&quot;gradient_fade:symmetric_pad\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.effect(Effect.gradientFade()\\n\\t.type(\\n\\tGradientFade.symmetricPad())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.effect(Effect.gradientFade()\\n\\t.type(\\n\\tGradientFade.symmetricPad())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;dog.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.auto())\\n\\t })\\n\\t effect(Effect.gradientFade() {\\n\\t type(\\n\\tGradientFade.symmetricPad())\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;dog.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.auto())\\n\\t })\\n\\t effect(Effect.gradientFade() {\\n\\t type(\\n\\tGradientFade.symmetricPad())\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/w_300,h_300,c_pad,b_auto,e_gradient_fade:symmetric_pad\\\/dog.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;width&quot;:&quot;300&quot;,&quot;height&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto&quot;,&quot;effect&quot;:&quot;gradient_fade:symmetric_pad&quot;}],&quot;transformation_string&quot;:&quot;w_300,h_300,c_pad,b_auto,e_gradient_fade:symmetric_pad&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;dog.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto,e_gradient_fade:symmetric_pad\/dog.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto,e_gradient_fade:symmetric_pad\/dog.jpg\" alt=\"Image with a gradient fade into automatic color padding\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a><\/p>\n<p>You can also control how much of the image to include in the fading effect by adding the <code>x<\/code> parameter with a value that indicates the width of the fading region in pixels. For example, the same <code>dog<\/code> image as above, but now with only a 50 pixel wide gradient fade into the padding:<\/p>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, x: 50, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, x: 50, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;dog.jpg\\&quot; &gt; &lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; x=\\&quot;50\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;Transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; x=\\&quot;50\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;dog.jpg\\&quot; &gt; &lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; x=\\&quot;50\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; x=\\&quot;50\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;dog.jpg\\&quot; &gt; &lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; x=\\&quot;50\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;dog.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation width=\\&quot;300\\&quot; height=\\&quot;300\\&quot; background=\\&quot;auto\\&quot; effect=\\&quot;gradient_fade:symmetric_pad\\&quot; x=\\&quot;50\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;dog.jpg&#039;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, x: 50, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;dog.jpg&#039;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, x: 50, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;dog.jpg\\&quot;).image(width=300, height=300, background=\\&quot;auto\\&quot;, effect=\\&quot;gradient_fade:symmetric_pad\\&quot;, x=50, crop=\\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;dog.jpg\\&quot;).image(width=300, height=300, background=\\&quot;auto\\&quot;, effect=\\&quot;gradient_fade:symmetric_pad\\&quot;, x=50, crop=\\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;dog.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n-&gt;offsetX(50)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t)\\n\\t-&gt;effect(Effect::gradientFade()\\n\\t-&gt;type(\\n\\tGradientFade::symmetricPad())\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;dog.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n-&gt;offsetX(50)\\n\\t-&gt;background(\\n\\tBackground::auto())\\n\\t)\\n\\t-&gt;effect(Effect::gradientFade()\\n\\t-&gt;type(\\n\\tGradientFade::symmetricPad())\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;effect\\&quot;=&gt;\\&quot;gradient_fade:symmetric_pad\\&quot;, \\&quot;x\\&quot;=&gt;50, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, array(\\&quot;width\\&quot;=&gt;300, \\&quot;height\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto\\&quot;, \\&quot;effect\\&quot;=&gt;\\&quot;gradient_fade:symmetric_pad\\&quot;, \\&quot;x\\&quot;=&gt;50, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).x(50).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;dog.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).x(50).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;dog.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, x: 50, crop: \\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;dog.jpg\\&quot;, width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, x: 50, crop: \\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).X(50).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;dog.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(300).Height(300).Background(\\&quot;auto\\&quot;).Effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).X(50).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;dog.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n.offsetX(50)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.effect(Effect.gradientFade()\\n\\t.type(\\n\\tGradientFade.symmetricPad())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n.offsetX(50)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.effect(Effect.gradientFade()\\n\\t.type(\\n\\tGradientFade.symmetricPad())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setEffect(\\&quot;gradient_fade:symmetric_pad\\&quot;).setX(50).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(300).setHeight(300).setBackground(\\&quot;auto\\&quot;).setEffect(\\&quot;gradient_fade:symmetric_pad\\&quot;).setX(50).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).x(50).crop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().width(300).height(300).background(\\&quot;auto\\&quot;).effect(\\&quot;gradient_fade:symmetric_pad\\&quot;).x(50).crop(\\&quot;pad\\&quot;)).generate(\\&quot;dog.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n.offsetX(50)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.effect(Effect.gradientFade()\\n\\t.type(\\n\\tGradientFade.symmetricPad())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;dog.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n.offsetX(50)\\n\\t.background(\\n\\tBackground.auto())\\n\\t)\\n\\t.effect(Effect.gradientFade()\\n\\t.type(\\n\\tGradientFade.symmetricPad())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;dog.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n offsetX(50)\\n\\t background(\\n\\tBackground.auto())\\n\\t })\\n\\t effect(Effect.gradientFade() {\\n\\t type(\\n\\tGradientFade.symmetricPad())\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;dog.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n offsetX(50)\\n\\t background(\\n\\tBackground.auto())\\n\\t })\\n\\t effect(Effect.gradientFade() {\\n\\t type(\\n\\tGradientFade.symmetricPad())\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, x: 50, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;dog.jpg\\&quot;, {width: 300, height: 300, background: \\&quot;auto\\&quot;, effect: \\&quot;gradient_fade:symmetric_pad\\&quot;, x: 50, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;dog.jpg\\&quot;)\\n  .resize(\\n    pad()\\n      .width(300)\\n      .height(300)\\n      .offsetX(50)\\n      .background(auto())\\n  )\\n  .effect(gradientFade().type(symmetricPad()));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/w_300,h_300,c_pad,b_auto,e_gradient_fade:symmetric_pad,x_50\\\/dog.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;width&quot;:&quot;300&quot;,&quot;height&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto&quot;,&quot;effect&quot;:&quot;gradient_fade:symmetric_pad&quot;,&quot;x&quot;:&quot;50&quot;}],&quot;transformation_string&quot;:&quot;w_300,h_300,c_pad,b_auto,e_gradient_fade:symmetric_pad,x_50&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;dog.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto,e_gradient_fade:symmetric_pad,x_50\/dog.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_300,h_300,c_pad,b_auto,e_gradient_fade:symmetric_pad,x_50\/dog.jpg\" alt=\"Image with a 50 pixel wide gradient fade into automatic color padding\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a><\/p>\n<h2>More padding options<\/h2>\n<p>The examples in this article are some of the most frequent uses of padding options, but you can fine tune the way padding is added in a number of other ways. The following examples give a taste of what can be accomplished by tweaking the value of the <code>b_auto<\/code> parameter:<\/p>\n<ul>\n<li>Select the predominant color of the entire image or only the border pixels:<\/li>\n<\/ul>\n<div style=\"text-align:center;\">\n<span style=\"display:inline-block;\">\n<a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:border\/beach_huts.jpg\" target =\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:border\/beach_huts.jpg\" alt=\"b_auto:border\" title=\"b_auto:border\" style=\"margin-right: 10px;display:block;\" \/><\/a>\n<b>b_auto:border<\/b> \n<\/span><span style=\"display:inline-block;\">\n<a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant\/beach_huts.jpg\" target =\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant\/beach_huts.jpg\" alt=\"b_auto:predominant\" title=\"b_auto:predominant\" style=\"margin-right: 10px;display:block;\" \/><\/a>\n<b>b_auto:predominant<\/b>\n<\/span>\n<\/div>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;beach_huts.jpg\\&quot;, {height: 200, width: 200, background: \\&quot;auto:predominant\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;beach_huts.jpg\\&quot;, {height: 200, width: 200, background: \\&quot;auto:predominant\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;beach_huts.jpg\\&quot; &gt; &lt;Transformation height=\\&quot;200\\&quot; width=\\&quot;200\\&quot; background=\\&quot;auto:predominant\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;beach_huts.jpg\\&quot; &gt;\\n\\t&lt;Transformation height=\\&quot;200\\&quot; width=\\&quot;200\\&quot; background=\\&quot;auto:predominant\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;beach_huts.jpg\\&quot; &gt; &lt;cld-transformation height=\\&quot;200\\&quot; width=\\&quot;200\\&quot; background=\\&quot;auto:predominant\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;beach_huts.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation height=\\&quot;200\\&quot; width=\\&quot;200\\&quot; background=\\&quot;auto:predominant\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;beach_huts.jpg\\&quot; &gt; &lt;cl-transformation height=\\&quot;200\\&quot; width=\\&quot;200\\&quot; background=\\&quot;auto:predominant\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;beach_huts.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation height=\\&quot;200\\&quot; width=\\&quot;200\\&quot; background=\\&quot;auto:predominant\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;beach_huts.jpg&#039;, {height: 200, width: 200, background: \\&quot;auto:predominant\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;beach_huts.jpg&#039;, {height: 200, width: 200, background: \\&quot;auto:predominant\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).image(height=200, width=200, background=\\&quot;auto:predominant\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).image(height=200, width=200, background=\\&quot;auto:predominant\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;beach_huts.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(200)\\n-&gt;height(200)\\n\\t-&gt;background(\\n\\tBackground::predominant())\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;beach_huts.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(200)\\n-&gt;height(200)\\n\\t-&gt;background(\\n\\tBackground::predominant())\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;beach_huts.jpg\\&quot;, array(\\&quot;height\\&quot;=&gt;200, \\&quot;width\\&quot;=&gt;200, \\&quot;background\\&quot;=&gt;\\&quot;auto:predominant\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;beach_huts.jpg\\&quot;, array(\\&quot;height\\&quot;=&gt;200, \\&quot;width\\&quot;=&gt;200, \\&quot;background\\&quot;=&gt;\\&quot;auto:predominant\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().height(200).width(200).background(\\&quot;auto:predominant\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;beach_huts.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().height(200).width(200).background(\\&quot;auto:predominant\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;beach_huts.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;beach_huts.jpg\\&quot;, height: 200, width: 200, background: \\&quot;auto:predominant\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;beach_huts.jpg\\&quot;, height: 200, width: 200, background: \\&quot;auto:predominant\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(200).Width(200).Background(\\&quot;auto:predominant\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;beach_huts.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(200).Width(200).Background(\\&quot;auto:predominant\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;beach_huts.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;beach_huts.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(200)\\n.height(200)\\n\\t.background(\\n\\tBackground.predominant())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;beach_huts.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(200)\\n.height(200)\\n\\t.background(\\n\\tBackground.predominant())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(200).setWidth(200).setBackground(\\&quot;auto:predominant\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;beach_huts.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(200).setWidth(200).setBackground(\\&quot;auto:predominant\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;beach_huts.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().height(200).width(200).background(\\&quot;auto:predominant\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;beach_huts.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().height(200).width(200).background(\\&quot;auto:predominant\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;beach_huts.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;beach_huts.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(200)\\n.height(200)\\n\\t.background(\\n\\tBackground.predominant())\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;beach_huts.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(200)\\n.height(200)\\n\\t.background(\\n\\tBackground.predominant())\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;beach_huts.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(200)\\n height(200)\\n\\t background(\\n\\tBackground.predominant())\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;beach_huts.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(200)\\n height(200)\\n\\t background(\\n\\tBackground.predominant())\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;beach_huts.jpg\\&quot;, {height: 200, width: 200, background: \\&quot;auto:predominant\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;beach_huts.jpg\\&quot;, {height: 200, width: 200, background: \\&quot;auto:predominant\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;beach_huts.jpg\\&quot;).resize(\\n  pad()\\n    .width(200)\\n    .height(200)\\n    .background(predominant())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/h_200,w_200,c_pad,b_auto:predominant\\\/beach_huts.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;height&quot;:&quot;200&quot;,&quot;width&quot;:&quot;200&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto:predominant&quot;}],&quot;transformation_string&quot;:&quot;h_200,w_200,c_pad,b_auto:predominant&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;beach_huts.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_200,w_200,c_pad,b_auto:predominant\/beach_huts.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_200,w_200,c_pad,b_auto:predominant\/beach_huts.jpg\" alt=\"predominant vs contrast\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"200\" height=\"200\"\/><\/a><\/p>\n<ul>\n<li>Pad with the strongest contrasting color to the predominant color:<\/li>\n<\/ul>\n<div style=\"text-align:center;\">\n<span style=\"display:inline-block;\">\n<a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant\/painter_scene.jpg\" target =\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant\/painter_scene.jpg\" alt=\"b_auto:predominant\" title=\"b_auto:predominant\" style=\"margin-right: 10px;display:block;\" \/><\/a>\n<b>b_auto:predominant<\/b> \n<\/span><span style=\"display:inline-block;\">\n<a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_contrast\/painter_scene.jpg\" target =\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_contrast\/painter_scene.jpg\" alt=\"b_auto:predominant_contrast\" title=\"b_auto:predominant_contrast\" style=\"margin-right: 10px;display:block;\" \/><\/a>\n<b>b_auto:predominant_contrast<\/b>\n<\/span>\n<\/div>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;painter_scene.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_contrast\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;painter_scene.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_contrast\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;painter_scene.jpg\\&quot; &gt; &lt;Transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_contrast\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;painter_scene.jpg\\&quot; &gt;\\n\\t&lt;Transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_contrast\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;painter_scene.jpg\\&quot; &gt; &lt;cld-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_contrast\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;painter_scene.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_contrast\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;painter_scene.jpg\\&quot; &gt; &lt;cl-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_contrast\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;painter_scene.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_contrast\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;painter_scene.jpg&#039;, {height: 300, width: 300, background: \\&quot;auto:predominant_contrast\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;painter_scene.jpg&#039;, {height: 300, width: 300, background: \\&quot;auto:predominant_contrast\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).image(height=300, width=300, background=\\&quot;auto:predominant_contrast\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).image(height=300, width=300, background=\\&quot;auto:predominant_contrast\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;painter_scene.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::predominant()\\n\\t-&gt;contrast()\\n\\t)\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;painter_scene.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::predominant()\\n\\t-&gt;contrast()\\n\\t)\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;painter_scene.jpg\\&quot;, array(\\&quot;height\\&quot;=&gt;300, \\&quot;width\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto:predominant_contrast\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;painter_scene.jpg\\&quot;, array(\\&quot;height\\&quot;=&gt;300, \\&quot;width\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto:predominant_contrast\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_contrast\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;painter_scene.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_contrast\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;painter_scene.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;painter_scene.jpg\\&quot;, height: 300, width: 300, background: \\&quot;auto:predominant_contrast\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;painter_scene.jpg\\&quot;, height: 300, width: 300, background: \\&quot;auto:predominant_contrast\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(300).Width(300).Background(\\&quot;auto:predominant_contrast\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;painter_scene.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(300).Width(300).Background(\\&quot;auto:predominant_contrast\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;painter_scene.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;painter_scene.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominant()\\n\\t.contrast()\\n\\t)\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;painter_scene.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominant()\\n\\t.contrast()\\n\\t)\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(300).setWidth(300).setBackground(\\&quot;auto:predominant_contrast\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;painter_scene.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(300).setWidth(300).setBackground(\\&quot;auto:predominant_contrast\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;painter_scene.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_contrast\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;painter_scene.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_contrast\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;painter_scene.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;painter_scene.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominant()\\n\\t.contrast()\\n\\t)\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;painter_scene.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominant()\\n\\t.contrast()\\n\\t)\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;painter_scene.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.predominant() {\\n\\t contrast()\\n\\t })\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;painter_scene.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.predominant() {\\n\\t contrast()\\n\\t })\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;painter_scene.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_contrast\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;painter_scene.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_contrast\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;painter_scene.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominant().contrast())\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/h_300,w_300,c_pad,b_auto:predominant_contrast\\\/painter_scene.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;height&quot;:&quot;300&quot;,&quot;width&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto:predominant_contrast&quot;}],&quot;transformation_string&quot;:&quot;h_300,w_300,c_pad,b_auto:predominant_contrast&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;painter_scene.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_contrast\/painter_scene.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_contrast\/painter_scene.jpg\" alt=\"predominant vs contrast\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a><\/p>\n<ul>\n<li>Select multiple predominant colors and use a gradient effect to blend them together:<\/li>\n<\/ul>\n<div style=\"text-align:center;\">\n<span style=\"display:inline-block;\">\n<a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_gradient:2\/phone_wood.jpg\" target =\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_gradient:2\/phone_wood.jpg\" alt=\"b_auto:predominant_gradient:2\" title=\"b_auto:predominant_gradient:2\" style=\"margin-right: 10px;display:block;\" \/><\/a>\n<b>b_auto:predominant_gradient:2<\/b> \n<\/span><span style=\"display:inline-block;\">\n<a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_gradient:4\/phone_wood.jpg\" target =\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_gradient:4\/phone_wood.jpg\" alt=\"b_auto:predominant_gradient:4\" title=\"b_auto:predominant_gradient:4\" style=\"margin-right: 10px;display:block;\" \/><\/a>\n<b>b_auto:predominant_gradient:4<\/b>\n<\/span>\n<\/div>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;phone_wood.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:2\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;phone_wood.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:2\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;phone_wood.jpg\\&quot; &gt; &lt;Transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:2\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;phone_wood.jpg\\&quot; &gt;\\n\\t&lt;Transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:2\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;phone_wood.jpg\\&quot; &gt; &lt;cld-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:2\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;phone_wood.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:2\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;phone_wood.jpg\\&quot; &gt; &lt;cl-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:2\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;phone_wood.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:2\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;phone_wood.jpg&#039;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:2\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;phone_wood.jpg&#039;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:2\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).image(height=300, width=300, background=\\&quot;auto:predominant_gradient:2\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).image(height=300, width=300, background=\\&quot;auto:predominant_gradient:2\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;phone_wood.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::predominantGradient()\\n\\t-&gt;gradientColors(2)\\n\\t)\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;phone_wood.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::predominantGradient()\\n\\t-&gt;gradientColors(2)\\n\\t)\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;phone_wood.jpg\\&quot;, array(\\&quot;height\\&quot;=&gt;300, \\&quot;width\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto:predominant_gradient:2\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;phone_wood.jpg\\&quot;, array(\\&quot;height\\&quot;=&gt;300, \\&quot;width\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto:predominant_gradient:2\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_gradient:2\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;phone_wood.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_gradient:2\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;phone_wood.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;phone_wood.jpg\\&quot;, height: 300, width: 300, background: \\&quot;auto:predominant_gradient:2\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;phone_wood.jpg\\&quot;, height: 300, width: 300, background: \\&quot;auto:predominant_gradient:2\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(300).Width(300).Background(\\&quot;auto:predominant_gradient:2\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;phone_wood.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(300).Width(300).Background(\\&quot;auto:predominant_gradient:2\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;phone_wood.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;phone_wood.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominantGradient()\\n\\t.gradientColors(2)\\n\\t)\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;phone_wood.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominantGradient()\\n\\t.gradientColors(2)\\n\\t)\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(300).setWidth(300).setBackground(\\&quot;auto:predominant_gradient:2\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;phone_wood.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(300).setWidth(300).setBackground(\\&quot;auto:predominant_gradient:2\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;phone_wood.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_gradient:2\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;phone_wood.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_gradient:2\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;phone_wood.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;phone_wood.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominantGradient()\\n\\t.gradientColors(2)\\n\\t)\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;phone_wood.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominantGradient()\\n\\t.gradientColors(2)\\n\\t)\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;phone_wood.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.predominantGradient() {\\n\\t gradientColors(2)\\n\\t })\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;phone_wood.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.predominantGradient() {\\n\\t gradientColors(2)\\n\\t })\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;phone_wood.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:2\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;phone_wood.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:2\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;phone_wood.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(predominantGradient().gradientColors(2))\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/h_300,w_300,c_pad,b_auto:predominant_gradient:2\\\/phone_wood.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;height&quot;:&quot;300&quot;,&quot;width&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto:predominant_gradient:2&quot;}],&quot;transformation_string&quot;:&quot;h_300,w_300,c_pad,b_auto:predominant_gradient:2&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;phone_wood.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_gradient:2\/phone_wood.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_gradient:2\/phone_wood.jpg\" alt=\"predominant vs contrast\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a><\/p>\n<ul>\n<li>Limit the selected gradient colors to specific values (i.e. provide your own palette). The predominant color is then selected from the closest match in the provided palette:<\/li>\n<\/ul>\n<p><cld-code-widget\n      class=\" c-code-widget\"\n      snippets=\"[{&quot;sdkId&quot;:&quot;nodejs&quot;,&quot;framework&quot;:&quot;nodejs&quot;,&quot;language&quot;:&quot;nodejs&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(\\&quot;string.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(\\&quot;string.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Node.js&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_2&quot;,&quot;framework&quot;:&quot;react_2&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;react&quot;,&quot;framework&quot;:&quot;react&quot;,&quot;language&quot;:&quot;react&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;string.jpg\\&quot; &gt; &lt;Transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/Image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;Image publicId=\\&quot;string.jpg\\&quot; &gt;\\n\\t&lt;Transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/Image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React&quot;,&quot;packageName&quot;:&quot;cloudinary-react&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue_2&quot;,&quot;framework&quot;:&quot;vue_2&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/vue&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;vue&quot;,&quot;framework&quot;:&quot;vue&quot;,&quot;language&quot;:&quot;vue&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;string.jpg\\&quot; &gt; &lt;cld-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt; &lt;\\\/cld-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cld-image public-id=\\&quot;string.jpg\\&quot; &gt;\\n\\t&lt;cld-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot; crop=\\&quot;pad\\&quot; \\\/&gt;\\n&lt;\\\/cld-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Vue.js&quot;,&quot;packageName&quot;:&quot;cloudinary-vue&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular_2&quot;,&quot;framework&quot;:&quot;angular_2&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/ng&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;angular&quot;,&quot;framework&quot;:&quot;angular&quot;,&quot;language&quot;:&quot;angular&quot;,&quot;rawCodeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;string.jpg\\&quot; &gt; &lt;cl-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot; crop=\\&quot;pad\\&quot;&gt; &lt;\\\/cl-transformation&gt; &lt;\\\/cl-image&gt;&quot;,&quot;codeSnippet&quot;:&quot;&lt;cl-image public-id=\\&quot;string.jpg\\&quot; &gt;\\n\\t&lt;cl-transformation height=\\&quot;300\\&quot; width=\\&quot;300\\&quot; background=\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot; crop=\\&quot;pad\\&quot;&gt;\\n\\t&lt;\\\/cl-transformation&gt;\\n&lt;\\\/cl-image&gt;&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Angular&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/angular-5.x&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js_2&quot;,&quot;framework&quot;:&quot;js_2&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;@cloudinary\\\/url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;js&quot;,&quot;framework&quot;:&quot;js&quot;,&quot;language&quot;:&quot;js&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.imageTag(&#039;string.jpg&#039;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.imageTag(&#039;string.jpg&#039;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop: \\&quot;pad\\&quot;}).toHtml();&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;JS&quot;,&quot;packageName&quot;:&quot;cloudinary-core&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;python&quot;,&quot;framework&quot;:&quot;python&quot;,&quot;language&quot;:&quot;python&quot;,&quot;rawCodeSnippet&quot;:&quot;CloudinaryImage(\\&quot;string.jpg\\&quot;).image(height=300, width=300, background=\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;CloudinaryImage(\\&quot;string.jpg\\&quot;).image(height=300, width=300, background=\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop=\\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Python&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;php_2&quot;,&quot;framework&quot;:&quot;php_2&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;(new ImageTag(&#039;string.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::predominantGradient()-&gt;gradientColors(4)\\n\\t-&gt;palette(Color::RED,Color::ORANGE,Color::BROWN)\\n\\t)\\n\\t);&quot;,&quot;codeSnippet&quot;:&quot;(new ImageTag(&#039;string.jpg&#039;))\\n\\t-&gt;resize(Resize::pad()-&gt;width(300)\\n-&gt;height(300)\\n\\t-&gt;background(\\n\\tBackground::predominantGradient()-&gt;gradientColors(4)\\n\\t-&gt;palette(Color::RED,Color::ORANGE,Color::BROWN)\\n\\t)\\n\\t);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;php&quot;,&quot;framework&quot;:&quot;php&quot;,&quot;language&quot;:&quot;php&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;string.jpg\\&quot;, array(\\&quot;height\\&quot;=&gt;300, \\&quot;width\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;string.jpg\\&quot;, array(\\&quot;height\\&quot;=&gt;300, \\&quot;width\\&quot;=&gt;300, \\&quot;background\\&quot;=&gt;\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, \\&quot;crop\\&quot;=&gt;\\&quot;pad\\&quot;))&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;PHP&quot;,&quot;packageName&quot;:&quot;cloudinary_php&quot;,&quot;packageStatus&quot;:&quot;legacy&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;java&quot;,&quot;framework&quot;:&quot;java&quot;,&quot;language&quot;:&quot;java&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;string.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;).crop(\\&quot;pad\\&quot;)).imageTag(\\&quot;string.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Java&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;ruby&quot;,&quot;framework&quot;:&quot;ruby&quot;,&quot;language&quot;:&quot;ruby&quot;,&quot;rawCodeSnippet&quot;:&quot;cl_image_tag(\\&quot;string.jpg\\&quot;, height: 300, width: 300, background: \\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cl_image_tag(\\&quot;string.jpg\\&quot;, height: 300, width: 300, background: \\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop: \\&quot;pad\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Ruby&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;csharp&quot;,&quot;framework&quot;:&quot;csharp&quot;,&quot;language&quot;:&quot;csharp&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(300).Width(300).Background(\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;string.jpg\\&quot;)&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.Api.UrlImgUp.Transform(new Transformation().Height(300).Width(300).Background(\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;).Crop(\\&quot;pad\\&quot;)).BuildImageTag(\\&quot;string.jpg\\&quot;)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;.NET&quot;,&quot;packageName&quot;:&quot;CloudinaryDotNet&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;dart&quot;,&quot;framework&quot;:&quot;dart&quot;,&quot;language&quot;:&quot;dart&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;string.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominantGradient().gradientColors(4)\\n\\t.palette(Color.RED,Color.ORANGE,Color.BROWN)\\n\\t)\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;string.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominantGradient().gradientColors(4)\\n\\t.palette(Color.RED,Color.ORANGE,Color.BROWN)\\n\\t)\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Dart&quot;,&quot;packageName&quot;:&quot;cloudinary_dart&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;swift&quot;,&quot;framework&quot;:&quot;swift&quot;,&quot;language&quot;:&quot;swift&quot;,&quot;rawCodeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(300).setWidth(300).setBackground(\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;string.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;codeSnippet&quot;:&quot;imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setHeight(300).setWidth(300).setBackground(\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;).setCrop(\\&quot;pad\\&quot;)).generate(\\&quot;string.jpg\\&quot;)!, cloudinary: cloudinary)&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;iOS&quot;,&quot;packageName&quot;:&quot;cloudinary&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;5.x&quot;},{&quot;sdkId&quot;:&quot;android&quot;,&quot;framework&quot;:&quot;android&quot;,&quot;language&quot;:&quot;android&quot;,&quot;rawCodeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;string.jpg\\&quot;);&quot;,&quot;codeSnippet&quot;:&quot;MediaManager.get().url().transformation(new Transformation().height(300).width(300).background(\\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;).crop(\\&quot;pad\\&quot;)).generate(\\&quot;string.jpg\\&quot;);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Android&quot;,&quot;packageName&quot;:&quot;cloudinary-android&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;3.x&quot;},{&quot;sdkId&quot;:&quot;flutter&quot;,&quot;framework&quot;:&quot;flutter&quot;,&quot;language&quot;:&quot;flutter&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image(&#039;string.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominantGradient().gradientColors(4)\\n\\t.palette(Color.RED,Color.ORANGE,Color.BROWN)\\n\\t)\\n\\t));&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image(&#039;string.jpg&#039;).transformation(Transformation()\\n\\t.resize(Resize.pad().width(300)\\n.height(300)\\n\\t.background(\\n\\tBackground.predominantGradient().gradientColors(4)\\n\\t.palette(Color.RED,Color.ORANGE,Color.BROWN)\\n\\t)\\n\\t));&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Flutter&quot;,&quot;packageName&quot;:&quot;cloudinary_flutter&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;kotlin&quot;,&quot;framework&quot;:&quot;kotlin&quot;,&quot;language&quot;:&quot;kotlin&quot;,&quot;rawCodeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;string.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.predominantGradient() { gradientColors(4)\\n\\t palette(Color.RED,Color.ORANGE,Color.BROWN)\\n\\t })\\n\\t }) \\n}.generate()&quot;,&quot;codeSnippet&quot;:&quot;cloudinary.image {\\n\\tpublicId(\\&quot;string.jpg\\&quot;)\\n\\t resize(Resize.pad() { width(300)\\n height(300)\\n\\t background(\\n\\tBackground.predominantGradient() { gradientColors(4)\\n\\t palette(Color.RED,Color.ORANGE,Color.BROWN)\\n\\t })\\n\\t }) \\n}.generate()&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;Kotlin&quot;,&quot;packageName&quot;:&quot;kotlin-url-gen&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;},{&quot;sdkId&quot;:&quot;jquery&quot;,&quot;framework&quot;:&quot;jquery&quot;,&quot;language&quot;:&quot;jquery&quot;,&quot;rawCodeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;string.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;codeSnippet&quot;:&quot;$.cloudinary.image(\\&quot;string.jpg\\&quot;, {height: 300, width: 300, background: \\&quot;auto:predominant_gradient:4:palette_red_orange_brown\\&quot;, crop: \\&quot;pad\\&quot;})&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;jQuery&quot;,&quot;packageName&quot;:&quot;cloudinary-jquery&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;2.x&quot;},{&quot;sdkId&quot;:&quot;react_native&quot;,&quot;framework&quot;:&quot;react_native&quot;,&quot;language&quot;:&quot;react_native&quot;,&quot;rawCodeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;codeSnippet&quot;:&quot;new CloudinaryImage(\\&quot;string.jpg\\&quot;).resize(\\n  pad()\\n    .width(300)\\n    .height(300)\\n    .background(\\n      predominantGradient()\\n        .gradientColors(4)\\n        .palette(\\&quot;red\\&quot;, \\&quot;orange\\&quot;, \\&quot;brown\\&quot;)\\n    )\\n);&quot;,&quot;status&quot;:0,&quot;statusText&quot;:&quot;Ok&quot;,&quot;displayName&quot;:&quot;React Native&quot;,&quot;packageName&quot;:&quot;cloudinary-react-native&quot;,&quot;packageStatus&quot;:&quot;&quot;,&quot;packageVersion&quot;:&quot;1.x&quot;}]\"\n      parsed-url=\"{&quot;url&quot;:&quot;https:\\\/\\\/res.cloudinary.com\\\/demo\\\/image\\\/upload\\\/h_300,w_300,c_pad,b_auto:predominant_gradient:4:palette_red_orange_brown\\\/string.jpg&quot;,&quot;cloud_name&quot;:&quot;demo&quot;,&quot;host&quot;:&quot;res.cloudinary.com&quot;,&quot;type&quot;:&quot;upload&quot;,&quot;resource_type&quot;:&quot;image&quot;,&quot;transformation&quot;:[{&quot;height&quot;:&quot;300&quot;,&quot;width&quot;:&quot;300&quot;,&quot;crop_mode&quot;:&quot;pad&quot;,&quot;background&quot;:&quot;auto:predominant_gradient:4:palette_red_orange_brown&quot;}],&quot;transformation_string&quot;:&quot;h_300,w_300,c_pad,b_auto:predominant_gradient:4:palette_red_orange_brown&quot;,&quot;url_suffix&quot;:&quot;&quot;,&quot;version&quot;:&quot;&quot;,&quot;secure&quot;:true,&quot;public_id&quot;:&quot;string.jpg&quot;,&quot;extension&quot;:&quot;jpg&quot;,&quot;format&quot;:&quot;jpg&quot;,&quot;format_code&quot;:true,&quot;url_code&quot;:false,&quot;signature&quot;:&quot;&quot;,&quot;private_cdn&quot;:false,&quot;result_asset_type&quot;:&quot;image&quot;}\"\n      with-url=\"true\"\n    >\n      <span class=\"u-visually-hidden\">Loading code examples<\/span>\n    <\/cld-code-widget><a class=\"c-image-link\" href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_gradient:4:palette_red_orange_brown\/string.jpg\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/h_300,w_300,c_pad,b_auto:predominant_gradient:4:palette_red_orange_brown\/string.jpg\" alt=\"b_auto:predominant_gradient:4:palette_red_orange_brown\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"300\" height=\"300\"\/><\/a><\/p>\n<p>See the <a href=\"\/documentation\/image_transformations#content_aware_padding\">documentation<\/a> for more information on these values and more details on the various padding options.<\/p>\n<h2>Summary<\/h2>\n<p>There are many cool things you can do if you need to add padding to an image as you\u2019ve seen, Cloudinary enables you to easily do these enhancements in the cloud using simple, <a href=\"https:\/\/cloudinary.com\/documentation\/image_transformations\">dynamic transformation parameters<\/a> and delivery URLs. Context-aware padding is especially useful for making sure your images take up the exact space allocated for the image while looking good.<\/p>\n<p>The context-aware features are available for use with all Cloudinary accounts, including <a href=\"https:\/\/cloudinary.com\/users\/register_free\">free<\/a> accounts.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":21529,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[156,165],"class_list":["post-21528","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-image-enhancement","tag-image-transformation"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Auto padding images with content-aware color padding<\/title>\n<meta name=\"description\" content=\"How to automatically pad your images with content-aware colors that adjust to the predominant color in the image.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to pad images with automatic color selection\" \/>\n<meta property=\"og:description\" content=\"How to automatically pad your images with content-aware colors that adjust to the predominant color in the image.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-22T14:38:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-02T17:36:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding-jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1100\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"How to pad images with automatic color selection\",\"datePublished\":\"2017-05-22T14:38:51+00:00\",\"dateModified\":\"2025-03-02T17:36:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection\"},\"wordCount\":8,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA\",\"keywords\":[\"Image Enhancement\",\"Image Transformation\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2017\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection\",\"url\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection\",\"name\":\"Auto padding images with content-aware color padding\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA\",\"datePublished\":\"2017-05-22T14:38:51+00:00\",\"dateModified\":\"2025-03-02T17:36:34+00:00\",\"description\":\"How to automatically pad your images with content-aware colors that adjust to the predominant color in the image.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA\",\"width\":2000,\"height\":1100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to pad images with automatic color selection\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Auto padding images with content-aware color padding","description":"How to automatically pad your images with content-aware colors that adjust to the predominant color in the image.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection","og_locale":"en_US","og_type":"article","og_title":"How to pad images with automatic color selection","og_description":"How to automatically pad your images with content-aware colors that adjust to the predominant color in the image.","og_url":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection","og_site_name":"Cloudinary Blog","article_published_time":"2017-05-22T14:38:51+00:00","article_modified_time":"2025-03-02T17:36:34+00:00","og_image":[{"width":2000,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding-jpg?_i=AA","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection"},"author":{"name":"","@id":""},"headline":"How to pad images with automatic color selection","datePublished":"2017-05-22T14:38:51+00:00","dateModified":"2025-03-02T17:36:34+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection"},"wordCount":8,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA","keywords":["Image Enhancement","Image Transformation"],"inLanguage":"en-US","copyrightYear":"2017","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection","url":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection","name":"Auto padding images with content-aware color padding","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA","datePublished":"2017-05-22T14:38:51+00:00","dateModified":"2025-03-02T17:36:34+00:00","description":"How to automatically pad your images with content-aware colors that adjust to the predominant color in the image.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA","width":2000,"height":1100},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/how_to_pad_images_with_automatic_color_selection#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to pad images with automatic color selection"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649732323\/Web_Assets\/blog\/smart_padding\/smart_padding.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=21528"}],"version-history":[{"count":10,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21528\/revisions"}],"predecessor-version":[{"id":37080,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21528\/revisions\/37080"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/21529"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=21528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=21528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=21528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}