Skip to main content
Inspiring
Jul 17, 2011 2:15 AM UTC
Answered

Resized and shrunk down image is distorted on ios/android

It should be something very simple that just dont know.  When i proprtionally resize large image and display it on my mobile apps (ios & android) the image is slightly distorted and some smaller texts are little hard to read, or just doesnt look good.. As3 on desktop doesnt show it, and seems like only on mobile apps it happens.  I am using remote jpeg images loaded as bitmap and changing the width and height, is there something i can do to make it resize more correctly?  Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.
markc888
markc888Correct answer
Inspiring
Jul 17, 2011 6:32 AM UTC

You could try applying smoothing to the image.

_urlRequest=new URLRequest("pathtofile");

_loader=new Loader;

_loader.load(_urlRequest);

_loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void{ trace(e) });

_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,smooth);

private function smooth(e:Event) {

var bit:Bitmap = e.target.content;          

if (bit != null) {

   bit.smoothing = true;

}

}

3 replies

markc888
markc888Correct answer
Inspiring
Jul 17, 2011 6:32 AM UTC

You could try applying smoothing to the image.

_urlRequest=new URLRequest("pathtofile");

_loader=new Loader;

_loader.load(_urlRequest);

_loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void{ trace(e) });

_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,smooth);

private function smooth(e:Event) {

var bit:Bitmap = e.target.content;          

if (bit != null) {

   bit.smoothing = true;

}

}

Translate
chotgor1Author
Inspiring
Jul 17, 2011 7:10 AM UTC

Bingo!

Thanks bunch. I knew it was something simple and I was missing it.

Translate