Issue

Is it possible to avoid having the Image Server pad an image if the aspect ratio does not match the width and height? Can I use fit with UGC (user-generated content) images, such as on a decal area or with IS templates?

Solution

Avoid padding to maintain aspect ratio

You can use the fit command to scale an image. This procedure is not recommended, since it can either distort the image, or crop aspects of it. A better option is to maintain a consistent aspect ratio for uploaded content. Or, you can allow the images to maintain aspect ratio by not restricting the height or width. If these methods are not an option, see the documentation for the fit command:

http://microsite.omniture.com/t2/help/en_US/s7/is_ir_api/index.html#is_api-http_ref-fit

Use a UGC image on an IR decal

The best practice is to query the UGC image to find out its aspect ratio. Then, size it and then add it to the decal area with the appropriate commands.

However, if this method is not possible, you can use the fit command as shown below:
....&decal&src=is(CompanyName/ugc/280675926.tif?wid=600&hei=300&fit=fit)....

Esta obra está autorizada con arreglo a la licencia de Reconocimiento-NoComercial-CompartirIgual 3.0 Unported de Creative Commons.  Los términos de Creative Commons no cubren las publicaciones en Twitter™ y Facebook.

Avisos legales   |   Política de privacidad en línea