Header Ad

Showing posts with label scaling. Show all posts
Showing posts with label scaling. Show all posts

Monday, May 5, 2014

Scaling an image to match the content width

To scale an image, so that it should fit 100% of content width. The following is the sample code.



In the above scaleContent, width and maintainAspectRatio are important, we need to define them in order scale the image to 100% width of cotent width.