ASPX templates
Version 6.x > ASPX templates > How to get image of the EXACT width & height in transformation View modes: 
User avatar
Member
Member
jurijp-yandex - 2/21/2013 5:21:31 PM
   
How to get image of the EXACT width & height in transformation
How can we get an image of the Exact width and height in transformation? When using GetImage(...) or using query string params ?width&height we don't get the specified WIDHT and HEIGHT, but they are still proportionally recalculated.

E.g. GetImage(xxx, 100, 200) returns images of size 100x87, 98x200 etc. and we need 100x200 - I know it looks strange...but we need it.


User avatar
Kentico Support
Kentico Support
kentico_janh - 2/25/2013 9:21:58 AM
   
RE:How to get image of the EXACT width & height in transformation
Hello,

This is not possible using that method, because you always get an image with appropriate ratio, however you can build that img tag by yourself or create a transformation function for that and then you can apply inline styles which change image proportions according your needs:

style="width: 100px; height: 200px;"


Best regards,
Jan Hermann