bitmapdata

ActionScript BitmapData Built-in To Bitmaps?

i've used a Loader and URLRequest to download a .png from the internet and add it to my display list. since it's already a bitmap, does it have built in bitmap data already? or do i have to create the bitmap data myself? also, why does the same trace statement return false in the mouseMoveHandler when it outputs true in the displayIma...

How to filter a specific color from a bitmapData object (or byte-array)

I'm looking for an efficient way to filter a specific color from a bitmapData object in ActionScript 3. Currently I use a loop with readByte32(). This takes about a second to process which is unacceptable. I have been trying to get paletteMap() to work but so far haven't been able to grasp its API (any truly useful links? Google has ...

Bitmap data draw method - replacing the non-present pixels with blue color

I have a Sprite which is in the shape of a Convex polygon(not rectangular). If I take its snapshot using : var bmd:BitmapData = new BitmapData(width,height); bmd.draw(someSprite,someMatrix,null,null,null); I get an image like this : Click here to see the image In this image, I have added the green boundary myself, just to ...

Can we got a dynamic cursor in Flex 4 with the CursorManager ?

Hi, I want a custom cursor I can edit in the .mxml file. For the moment I got a static one with a class extends Sprite. Is for a SketchPad application, the cursor will be the color and the size of the user choice. Let me know if it possible and how. Here the class in a .as file : package project { import flash.display.Sprite; ...

How to make transparent color in BitmapData in flex

I have a code like this: var bitmapData:BitmapData = new BitmapData(width, height); bitmapData.draw(this); var ba:ByteArray = (new PNGEncoder()).encodeByteArray(bitmapData.getPixels(clipRect),width,height,true); I want to make the white color in the generated PNG transparent. What is the best way to do so? ...

WPF/WinForms/GDI interop: converting a WriteableBitmap to a System.Drawing.Image?

How can I convert a WPF WriteableBitmap object to a System.Drawing.Image? My WPF client app sends bitmap data to a web service, and the web service needs to construct a System.Drawing.Image on that end. I know I can get the data of a WriteableBitmap, send the info over to the web service: // WPF side: WriteableBitmap bitmap = ...; in...

Replace Color Gradient In Transparent Image

I have small function which will recolor pixels in a Bitmap from a given color to a new given color. The problems I have with the code are as follows: 1) The function gives results which are remapping white pixels which should not be concidered since I have a threshold... (unless I have defined this calculation wrong) 2) When certain ...

whats the most efficient way to overwrite bitmapdata

Hi I have a bitmapdata object that is filled with n rectangles of a width of 1 pixel and of varying heights. I want to run through a loop and remove the old rectangle and replace it with a different one. Should I do something like reset the each bitmap column of pixels to a background color and then add the rect i want? for(i:int=0;i...

How to do this FadeOut Effect with openGL on iPhone?

Hello, I'm playing around with the GLPaint Example from Apple. But I don't know how to create an effect which fades the already drawn stuff out. I created an example in Flash which shows the effect I'm looking for: http://staging.rwichmann.com/openglexample/ In Flash I'm drawing a texture on a BitmapData and in every frame I'm adding ...

Flex 3 static bitmap issue

Hi everyone, Interesting problem here - I'm making a small game using Flex 3 - now I have a static ImageAccess class, which first loads up all images and stores them in a static array for quicker access in the future. Now since I address the physical bitmapdata without calling Clone() (for efficiency issues) and once by accident I've wr...

generating preview of BMP Image

Hi, I am working on a Media up-loader which uploads images to Server. Before start upload file i want to show small thumbnail of Image. I used Loader class to load image selected by user & used Canvas to draw image on it. This works fine with images like jpg & png. But for bmp file loader class doesn't work. Is there anyway to load ...

How to copyPixels() on AS3 from a huge BitmapData?

I need to load a very big image on AS3 (currently sized at 8192x8192). I am aware that it does not fit any of the limits imposed by Flash regarding drawing to screen or creating a BitmapData of that size. I just want to load the image so I can copyPixels() some parts of it here and there. The thing is, I'm loading the .jpg file of that ...

using BitmapData.draw() on a streaming (RTMP) .f4v with OSMF

I am trying to use BitmapData.draw() on a video object, but using the OSMF framework. My hosting service has set up the following so that I can access my rtmp video: <VideoSampleAccess enabled="true">/</VideoSampleAccess> Simplified code is as follows: _videoURL = "my-url-here" resource = new StreamingURLResource(_videoURL)...

Get Notified of Change in Flex Bitmap or BitmapData?

In Flex, how does one hook into a bitmap or bitmapdata variable so that a function is notified whenever the bitmap's data has changed (pixel has changed, or filter's been added)? I tried setting up binding but it doesn't work. There must be a way to do it, because I can bind an mx:Image to a bitmap via the 'source' attribute, and the...

Apply byte[] effect in c#

Hello, I have a bitmap image and a byte[]. The byte[] contains an effect such as noise (in my case, byte[] contains custom effect). I want to apply this byte[] effect to the bitmap image and save the resulted bitmap. I have the BitmapData and byte[] but I don't know how to mix merge these together? Thanks Update: Well the byte[] con...

BitmapData.draw() Matrix problem

Hello, I've run into an issue where the BitmapData.draw() method isn't accurately subtracting image data from a .png that uses transparency. I've put together a test file that shows this behavior, it's located here: http://www.filedropper.com/shield_1 In a nutshell, a sprite drops from the top of the screen and when it intersects with...