Adobe Flex Image Scaling Quality

I have an image viewer that I wrote in Flex that scales the size of the image you are currently viewing, depending on the size of the browser. This is what the tag looks like:

<mx:Image id="img"
    maintainAspectRatio="true"
    source="{horizontalList.selectedItem.image}-large.jpg"
    height="100%"
    horizontalCenter="0"
    horizontalAlign="center"
    top="5" 
    width="{horizontalList.width}"
    updateComplete="onImageChange()"
    click="onImgClick()"
    />

The original image size is always larger than the browser area, and unfortunately Flex doesn't seem to do very well with zooming out. In fact, HTML in IE does a much better job if I use its image tag. Is there a “quality” setting for scaling in Flex that I am missing?

Thanks.

+5
source share
5 answers
+8

Flash , . , , (), .

, :

var smoothBitmapData : BitmapData = new BitmapData(
    loadedBitmap.width + (loadedBitmap.width % 2),
    loadedBitmap.height + (loadedBitmap.height % 2),
    true, 0x00FF0000);
smoothBitmapData.draw(loadedBitmap, null, null, null, null, true);

smoothBitmap = new Bitmap(smoothBitmapData, PixelSnapping.NEVER, true);
+1

Flex 3 - . , .

scaleContent maintainAspectRatio Image?

.

0

scaleContent true

0
source

set the scaleContent property to true

0
source

All Articles