Hi All

I tried asking on the AIR forums but got no help. Does anyone here  
have any ideas on this?

Is anything you can suggest to improve the image quality we are  
seeing - even if it means changing the way we are generating our  
images. Please try this simple example that shows the problem we are  
facing. It can be compiled as both a flex app or a AIR app without  
modification. You will need to download the test png below and put it  
in the same directory as the .mxml file

You will notice the image quality is good when running as a flex app,  
but completely unusable as an AIR app. This is not a large image -  
2878x1863. The inability to handle large images is another problem  
altogether :(

http://lhsw.com/flex/image.png
http://lhsw.com/flex/StageQualityTest.mxml

Any help is appreciated,
charles

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";  
layout="absolute"
        applicationComplete="appCompleteHandler(event);"
        backgroundColor="#ffffff" >

        <mx:Script>
                <![CDATA[
                        import mx.controls.Image;
                        private function appCompleteHandler(event:Event) : void
                        {
                                stage.quality = StageQuality.BEST;
                        }
                        private function imgCompleteHandler(event:Event) : void
                {
                        var image:Image = event.target as Image;
                    var bitmap: Bitmap = image.content as Bitmap;
                                bitmap.pixelSnapping = PixelSnapping.NEVER;
                                bitmap.smoothing = true;
                }
                ]]>
        </mx:Script>

        <mx:Image source="image.png"
                width="100%" height="100%"
                maintainAspectRatio="true"
                scaleContent="true"
                complete="imgCompleteHandler(event);" />
        
</mx:Application>

Reply via email to