0 Replies Latest reply on May 7, 2008 8:25 AM by Flipline

    Copy bitmap to Clipboard with Alpha Channel

    Flipline Level 1
      Just started looking into AIR development from Flash, and I'm having issues with copying a bitmapData to the Clipboard and preserving its alpha channel. I'll create a semi-transparent red image, for example, and use setData to copy that bitmapData object to the system clipboard --- but when I paste this into Photoshop, the alpha of that image is lost, and I'm instead left with a dark red image. It's as if it's overlaying the transparent bitmap onto a black background before copying, instead of retaining its alpha channel.

      Is there any way to for this alpha information to be retained? Here's my stripped-down code:

      import flash.desktop.Clipboard;
      import flash.desktop.ClipboardFormats;
      import flash.display.*;

      var myBMP:BitmapData = new BitmapData(200, 200, true, 0x55FF0000);
      Clipboard.generalClipboard.setData(ClipboardFormats.BITMAP_FORMAT, myBMP, false);