PDA

View Full Version : How to resize an image


getwired
06-08-2005, 12:46 PM
I have an image resource that I am loading in a view. This image is 274 x 232. I would like to (on event) resize the image to a width of 137 and height of 116.

Here is what I have... Does anyone know how to perform a resize based on width and height?

<view name="wizImg" resource="wiz.png" x="490" y="14" width="274" height="232">

jey
06-08-2005, 05:02 PM
Try to add stretches attribute in your view tag.

Example:
<view name="wizImg" resource="wiz.png" x="490" y="14" width="137" height="116" stretches="both">

getwired
06-08-2005, 07:51 PM
Originally posted by jey
Try to add stretches attribute in your view tag.

Example:
<view name="wizImg" resource="wiz.png" x="490" y="14" width="137" height="116" stretches="both">

That did it... Thanks!

viaov
01-29-2006, 04:14 AM
Does anyone know how to resize an image, while keeping its aspect ratio?