Scale an image by setting its width and height : Image Scale « Graphics « Flex






Scale an image by setting its width and height

Scale an image by setting its width and height
           


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    
    
    <mx:Spacer height="10" />
    <mx:Label text="Scaled Image" />
    <mx:Image source="@Embed('logo.png')" width="100" height="100"/>
    <mx:Image source="@Embed('logo.png')" width="100" height="50" maintainAspectRatio="false"/>
    
    
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Scale an Image with Embed settingScale an Image with Embed setting
2.BitMap ScalingBitMap Scaling
3.Using postLayoutTransformOffsets property to modify the position and scale of a component.Using postLayoutTransformOffsets property to modify the position and scale of a component.
4.Using 9-slice scaling to maintain a set border, regardless of how the image itself is resized.