Skip to main content
Inspiring
July 17, 2011
Answered

Resized and shrunk down image is distorted on ios/android

  • July 17, 2011
  • 1 reply
  • 1098 views

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 has been closed for replies.
Correct answer markc888

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;

}

}

1 reply

markc888
markc888Correct answer
Inspiring
July 17, 2011

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;

}

}

chotgor1Author
Inspiring
July 17, 2011

Bingo!

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