If you resize picture by defining new width or height from normal size, you will get the picture resolution's distorted or broken quality. There's a method how to make the picture keeps soft and smooth.
Create a utility class
package com.jackBite.utils
{
import mx.controls.Image;
import flash.display.Bitmap;
public class CleanImage extends Image
{
/*public function CleanImage()
{
}*/
override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
if(content is Bitmap)
{
var bmp:Bitmap = Bitmap(content);
if(bmp && bmp.smoothing == false)
bmp.smoothing = true;
}
}
}
}
In MXML Component, You Put this
<utils:CleanImage id="feedLogo" height="30" source="{_imageRss}"/>
No Response to "Anti Distorted resolution picture when resizing"
Post a Comment