Questions tagged [bitmapdata]

In GDI+, the BitmapData class is used by the Bitmap::LockBits and Bitmap::UnlockBits methods of the Bitmap class. A BitmapData object stores attributes of a bitmap.

412 questions
1
vote
1 answer

AS3: BitmapData.draw with alpha and blendmode has incorrect result

I have a sprite that contains overlapping shapes. The sprite itself will have it's alpha set to .5, so I have to set the sprite's blendmode to "layer" to keep the overlapping parts from looking transparent with each other. In this screenshot taken…
BladePoint
  • 632
  • 5
  • 16
1
vote
1 answer

flex/as3 - How to force BitmapData smooth not to draw

I'm gonna force a BitmapData smooth. but I can't do BitmapData.draw() because the performance of application. If I draw Bitmap, the application slow down to next step. (this is on flex mobile) so I need how to force bitmapData smooth without redraw…
1
vote
2 answers

Flash: What is `BitmapData.ctor`?

I'm profiling some Flash code, and one of the methods that's taking a lot of time is BitmapData.ctor. What, err, is that?
David Wolever
  • 148,955
  • 89
  • 346
  • 502
1
vote
1 answer

Index out of range exception while reading pixel data

Related post: Stride of the BitmapData is different than the original dimension. I have taken the source code from here and modified it. The code is generating a variety of exceptions in different occasions. . Error in BitmapLocker.cs At the…
user366312
  • 16,949
  • 65
  • 235
  • 452
1
vote
1 answer

How to check if a set of bits are 0 from a determinated position?

I'm writting a bitmap physical memory manager and i want implement a function that checks if a n bits are free starting from an specific bit. Right now I use this function that checks if a single bit is free and i call it n times to see if n bits…
1
vote
0 answers

How to create a 256-color NSImage from pixel and color-palette

I have a byte-array of pixels and a color-palette representing a 256-color palette-indexed Windows-bitmap. I need to create OSX NSImage from that. In Windows its just: public Bitmap CreateFromData(byte[] buffer, int width, int height, byte[]…
Tom
  • 190
  • 3
  • 18
1
vote
2 answers

Saving bitmap on iOS using Adobe AIR

I'm finally trying to port my Flash games to apps, starting with iOS. I'm stuck on the image saving functionality. In swf's, I used jpegencoder to save to the desktop server. It seemed with some research that that code should still work on…
ola.rogula
  • 307
  • 1
  • 9
1
vote
1 answer

Copying a 14bit grayscale image (saved in long[]) to a pictureBox

My camera gives me 14bit grayscale images, but the API's function returns a long* to the image data. (so i'm assuming 4 bytes for each pixel) My application is written in C++/CLI, and the pictureBox is of .NET type. I am currently using the…
Itsik
  • 3,920
  • 1
  • 25
  • 37
1
vote
1 answer

Flex/Actionscript image display problem

I'm trying to extend the Image class but hit a problem that I can't get past. I have a private image (img) that loads an image and a function that takes that image and copies it onto the parent. The debug function "copyit2" displays the image fine…
IanH
  • 31
  • 2
1
vote
1 answer

BitmapData cut-off

I am writing a MovieClip rasterizer which rasterizes all the frames in the specified movieclip. Here's the code for rasterizing: for ( var i:int = start; i <= end; i++ ) { //goto the next frame clip.gotoAndStop( i ); //get the bounds bounds =…
Fristi
  • 13
  • 5
1
vote
1 answer

FloodFill in AS3

I have been making a basic painting application similar to MS-Paint with basic paint, eraser and fill tools. It's this last one that's giving me some trouble. I'm pretty new to using BitmapData but the idea is that when the user clicks the board,…
James
  • 615
  • 1
  • 4
  • 22
1
vote
3 answers

Actionscript Retrieving BitmapData From Sprite Mouse Event

i've created a bitmap with data and placed it into a sprite so to receive mouse events. however, i'm struggling with reading the BitmapData within the sprite. function showBitmapData(e:Event):void { var bData:BitmapData = new…
Chunky Chunk
  • 16,553
  • 15
  • 84
  • 162
1
vote
1 answer

AccessVioilationException using BitmapData in c++

Below is my program. I am trying to apply grayscale filter using bitmapdata class in visual c++. I am getting AccessViolationException at 11, tagged by the comment. I have tried using CLR:Safe and CLR:pure but no use. In c# this would be solved by…
1
vote
1 answer

Apply some picture to the circle graphic in the as3

So, I already have the circle in my screen and showed it up, but I wanted to change the graphic from the "default circle", which is created by using the code like…
Kaoru
  • 2,853
  • 14
  • 34
  • 68
1
vote
1 answer

Loading images does not load them into memory

I am loading a batch of 150 HD images into my app - it is basically a 3D view of an object. Once I load the image files using Loader instances I store the loaders' first child's bitmapdata in a Vector. When all of the loaded, I want to begin to…
Fygo
  • 4,555
  • 6
  • 33
  • 47