3 Replies Latest reply on Jul 18, 2007 4:56 AM by svaruupaa

    Image quality in flash

    svaruupaa
      When we load an image online - the image is skewed or stretched and its quality is bad. The type of image is gif because we need transparancy. Pls help for a better quality of the image inspite of changing its size.
        • 1. Re: Image quality in flash
          Rapatski Level 1
          The quality of a bitmap is always low when you transform the image in flash. I always make the images the correct size before importing them/loading them into Flash.
          • 2. Re: Image quality in flash
            Level 7
            svaruupaa wrote:
            > When we load an image online - the image is skewed or stretched and its quality
            > is bad. The type of image is gif because we need transparancy. Pls help for a
            > better quality of the image inspite of changing its size.
            >

            in authoring you can set the "allow smoothing" from the library property..

            when an image is loaded at runtime, the only way to apply antialias when
            scaled, rotated and skewed is to replace it with a BitmapData copy of
            the image where you can set the smoothing..
            it must be done runtime and after image loading finished

            --
            Mars Spider
            Flash Developer
            http://www.marsspider.net
            • 3. Re: Image quality in flash
              svaruupaa Level 1
              import flash.display.*;
              function loadBitmapSmoothed(url:String, target:MovieClip) {
              var bmc:MovieClip = target.createEmptyMovieClip("bmc", target.getNextHighestDepth());
              var listener:Object = new Object();
              listener.tmc = target;
              listener.onLoadInit = function(mc:MovieClip) {
              mc._visible = false;
              var bitmap:BitmapData = new BitmapData(mc._width-50, mc._height-50, true, 0x000000);
              this.tmc.attachBitmap(bitmap, this.tmc.getNextHighestDepth(), "auto", true);
              bitmap.draw(mc);
              };
              var loader:MovieClipLoader = new MovieClipLoader();
              loader.addListener(listener);
              loader.loadClip(url, bmc);
              }
              translate;
              createEmptyMovieClip("myMC", getNextHighestDepth());
              loadBitmapSmoothed("one.gif", myMC);
              stop();

              In the above coding if i reduce the width and height the image is cut into pieces
              :(