问题
Sorry, if the question title is little confusing (not very creative at it :) Here's the problem .
I have an image loaded from BitmapData displayed in an Image control. This Image control has dragEnabled and user can drag and drop small images (from a bunch of images in a TileList) on top of it.
The image loaded from the Bitmapdata can be different every time with different resolution and the Image control scales it down to fit its fixed with/height. But while saving the image after editing I am saving it with its original width/height. For this purpose I am storing the original Bitmapdata in a temp object and applying any edits there before saving.
My problem here is that I have no clue on how to create an image combining the Large image and the small images dropped into it. May be I can use display object snapshot but then I want to save the image with its original with/height and preferably after converting it to Bitmapdata. Any help on how to go about this?
回答1:
Maybe this will help: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#merge()
回答2:
In addition to merge method() from the previous post you can use BitmapData::draw() method. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#draw%28%29
The method allows you to combine scaled bitmaps while merge() works only with original sizes of bitmaps.
来源:https://stackoverflow.com/questions/6167715/flex-bitmapdata-from-multiple-images-drag-dropped