bitmapdata

How do you load a bitmap file into a BitmapData object?

In Flash, the BitmapData object can be used to store bitmaps in RAM, you can later draw them to a MovieClip using the beginBitmapFill() method. How do you load an external bitmap file (.jpg) into a BitmapData object? Even AS3 code would be helpful. Thanks. ...

source to image

how to show a image with AS3 from source like: "GIF89a,.,...... ..sR....8.d.4..p...%...h..'$W..." etc... thanks in advance Leo ...

image with external interface

I need to send a picture to flash with external interface (as3)... can not be an url because don't have connection... I'm trying open the image file and send to flash like text but without success any idea? ...

What is the best way to resize a BitmapData object?

Say I have a BitmapData of 600x600 and I want to scale it down to 100x100. ...

Why is JPGEncoded bytearray sent from AS3 to AMFPHP resulting in an invalid image?

Hi, Im loading images into Flash and using JPGEncoder to encode the image to a ByteArray and send this to AMF PHP which writes out the bytearray to a file. This all appears to work correctly and I can download the resulting file in Photoshop CS4 absolutely fine. When i try to open it from the desktop or open it back in Flash it doesnt w...

Why can I not access bitmap data of FLV video coming from Amazon S3?

I have a video player that loads progressive flv video from a server and applies a reflection to it. I do this by creating a bitmapData object and then drawing the video to it. This worked absolutely fine until we moved our content from testing server to Amazon S3. Now there is no reflection. Can anyone explain why this is happening and...

What Windows "Performance monitor" settings should I use to debug a Flash movie that throws an InvalidBitmap error?

Hi guys - Here's my problem: I have a Flash swf that uploads files from local machine and if they are images it resizes them if needed. This involves creating a JPGEncoded bytearray from a bitmapData object. After im finished with the bitmapData I dispose() of it. I am noticing that flash will get stuck while resizing an image someti...

AS3:How to change a colored Bitmap's BitmapData to black and white ?

How can I change the bitmapdata of a coloured Bitmap to Black and White in AS3 ? I'm developing a simple image editor tool for a CMS in flash. People should be able to switch the colour of the uploaded Bitmap to black and white. I want the bitmapdata itself to change So I can write it to a ByteArray with Adobe's JPGEncoder Class after...

AS3: copyPixels - Maintaining Transparency On Multiple Copies

I need to copy multiple images with transparency to the same BitmapData without the overlapping images' transparencies overwriting the existing pixels. By default when you use the copyPixels method on a BitmapData with transparency to a BitmapData without transparency, the images layer like I want. The issue is I need to render to a Bit...

AS3: ByteArray and BitmapData

I'm doing a simple test. I want to write BitmapData into a ByteArray. I'm trying to do this with writeObject() and readObject(). Read object seems to have trouble making sense of the BitmapData. var byteArray : ByteArray = new ByteArray(); var _cache : BitmapData = new BitmapData( 640, 480, true, 0x000000 ); var _blank : BitmapData = ne...

AS3/Air: PNG > File > FileStream > ByteArray > BitmapData

I want to use FileSteam.open() to synchronously read image files from disk. I can then get them into a ByteArray with readBytes(), but I can't find how to get that into BitmapData. I know Image can read it as is, but I need BitmapData. Any suggestions? ...

Flash CS3 swf loaded inside flex issue (Bitmap)

I have loaded a SWF which is created in Flash CS9 (AS3). I'm having problem passing Bitmap (or BitmapData) from the flex app to the loaded SWF. Invoking of other functions in the loaded from Flex works, but when I try to pass a Bitmap to the loaded SWF, nothing happens. Here's a sample code: FLEX: try{ var bm:Bitmap = (someEvent....

How to use Flash BitmapData to scale up a image without losing the quality?

I'm trying scale up an image in Flash without making it pixelated, I know that I will loose some quality by scaling up, but i'm not trying to scale 6 times bigger or something :) I tried to use matrix and scale, but the quality is just bad... is there any other ways to do this? so here's my code, var _bmpData:BitmapData = new Bitm...

How to take a screencap of a SWF and download it to user's desktop with AS3?

Does anyone know how to take a screencap and download it to desktop in AS3? I know there is a great BitmapDataExporter in AS2 by Mario Klingenman but it doesn't work in AS3. ...

how to get only pixels from inside a irregular shape from uiimageview in iphone?

i want to get only those pixels which are inside an irregular shape..using core graphics not openGL.here is an image where i have drawn an irregular shape. and here is the drawing code - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { if(drawLineClicked) { UITouch *touch = [touches anyObject]; ...

Image Processing and Effects in ActionScript-3

I want to implement various effects like Sepia, GrayScale, Posterization etc. on BitmapData in ActionScript-3. How to do this and What is most efficient way to do this ? Thanks in advance!! ...

How to continuously fade a BitmapData to a certain color?

I'm drawing stuff on a bitmapData and I need to continuously fade every pixel to 0x808080 while still drawing (its for a DisplacementMapFilter)... I think this illustrates my problem: http://www.ventdaval.com/lab/grey.swf The simpler approach I tried was drawing a semi-transparent grey box on it, but it never reaches a single color (i....

Screendump from within Actionscript 3.0 is it possible or?

We have Bitmap and Bitmapdata objects now. And when using the webcam, we can get raw-pixeldata output from it. But, can we get raw-pixeldata from the "stage" or "swf" object somehow? I would like to use this to make "small thumbnails" of certain parts of Actionscript applications and these could be complex compositions of dynamic text, ...

AS3/FP9 - Resize a Sprite

I've loaded a JPG with dimensions 3264x2448 into a Sprite. How can I resize it proprtionally to allow meto draw the Sprite into a BitmapData object (which in CS3/Flash Player 9 is limited to 2880 height or width). My goal is to use the Soulwire [DisplayUtils][1] to create a thumbnail. Here is the code that works fine with other, small...

Flex BitmapData or ImageSnapshot for uninitialized components

Hi! I would like to make some kind of thumbnail with capturing BitmapData or ImageSnapshot of some UNINITIALIZED components in my Flex application. Is it possible? Thanks in advance! m. ...