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
2
votes
1 answer

Is there a way to change the alpha of a 24-bit bitmap image using a byte field?

I am trying to do this by adjusting the hexadecimal values of the bitmap image however as far as I can tell there is no alpha byte. Would I be able to adjust the format of the file to allow for an alpha byte or would I have to adjust the brightness…
dillib
  • 359
  • 1
  • 2
  • 11
2
votes
2 answers

C# search for a bitmap within another bitmap

I've tried open source projects such as this one however it doesn't seem to work at all for me. I then attempted to write my own algorithm like so (tolerance isn't being used yet). public static Rectangle ImageSearch(Bitmap ToSearch, Bitmap ToFind,…
AnthonyOSX
  • 342
  • 5
  • 15
2
votes
2 answers

Fast Bitmap modifying using BitmapData and pointers in C#

I am capturing data from some camera (array of RAW data). Then I'm mapping this data to RGB values according to color palette. I need to map it as fast as possible, so I use BitmapDdata and edit pixels in unsafe piece of code using pointers. public…
Majak
  • 1,543
  • 1
  • 14
  • 28
2
votes
1 answer

BitmapData.draw starling MovieClip

Some imports I used: import flash.display.BitmapData; import flash.geom.Matrix; import flash.geom.Rectangle; import flash.geom.ColorTransform; import starling.display.Sprite; import starling.display.MovieClip; I have here a BitmapData: var…
João Paulo
  • 6,300
  • 4
  • 51
  • 80
2
votes
1 answer

Creating Bitmaps from ARGB strings (in actionscript-3)?

in actionscript 3, what's the fastest way to dump your data (not from a file) into a bitmap for display? I have it working with setPixels and colored rects but that's way too slow/inefficient. Is there a way to load in the raw bytes or hijack the…
user306492
  • 21
  • 1
2
votes
2 answers

Comparing bitmap data in AS3 pixel for pixel

I am looking for a fairly simple image comparison method in AS3. I have taken an image from a web cam (with no subject) passed it in to bitmap data, then a second image is taken (this time with a subject) to compare this data, from these two images…
Jono
  • 280
  • 1
  • 7
  • 15
2
votes
2 answers

Writing bitmapped data to create fonts in opengl

I know hexadecimal numbers but I can`t seem to get how it is used to create a bitmap image or fonts. I studied from the link http://www.glprogramming.com/red/chapter08.html which shows how to create an F. What do the hexadecimal numbers correspond…
user3124361
  • 471
  • 5
  • 21
2
votes
2 answers

Feathers / Starling / AS3 / Air - Texture too big (max is 2048x2048) - Camera Roll

When I try to load a photo from the Camera Roll. I get the following message: Error #3683: Texture too big (max is 2048x2048). The following code is what I'm using with Feathers/Starling: var Image_Loader:ImageLoader = new…
2
votes
1 answer

cacheAsBitmap on a scaled MovieClip holding a Bitmap - performance boost?

Say I have a 300x300 BitmapData. And say I have a MovieClip 'mc' holding a Bitmap with that BitmapData. If mc's scale is 0.5, it means that on every one of mc's draw requests the inner Bitmap will have to scale its BitmapData, right? So applying…
Eyal Katz
  • 165
  • 10
2
votes
2 answers

Android Renderscript Allocation.USAGE_SHARED crash

I am getting a crash while running my app which uses renderscript. Unfortunately, the logcat does not give any specific details. b = Bitmap.createBitmap(ib.getWidth(), ib.getHeight(),ib.getConfig()); Allocation mInAllocation =…
2
votes
2 answers

Can't display a very big image after loaded

I have a big JPEG image file. It's dimension is 19000*14000 and the file size is about 41M. i'm using AIR 3.3 SDK, but after the load completes I can't see the image on stage. Does anyone know what the cause of this issue is? Here is my…
ryanhex53
  • 577
  • 4
  • 15
2
votes
2 answers

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!!
DexTer
  • 2,043
  • 1
  • 22
  • 45
2
votes
2 answers

Getting an unexpected trace for getpixel32. Can anybody see why?

When running the following code, "-2" is being traced and I am wrecking my head trying to understand why. var bmd:BitmapData = new BitmapData(1,1,true,0xFFFFFFFF); bmd.setPixel32(0,0, 0x32FF6B45); trace(0x32FF6B45-bmd.getPixel32(0,0)); As far as I…
user1457366
  • 659
  • 3
  • 13
  • 19
2
votes
2 answers

Strange behaviour with Bitmap.Clone()

var source = new Bitmap(2000,2000); var sw = Stopwatch.StartNew(); for (int i = 0; i < 10000; i++) { //var copy = new Bitmap(source); var copy = source.Clone() as Bitmap; } …
Andreas
  • 3,843
  • 3
  • 40
  • 53
2
votes
2 answers

make visual clone of displayObject that's nested within other displayObjects, and add the clone to the stage layer in the same location, rotation, etc

I want to be able to grab a copy of a DisplayObject that is nested within other transformed DisplayObjects (rotated, scaled, stretched objects), and be able to stamp it back into the same visual location, but on the stage layer. Essentially, being…
Jimmi Heiserman
  • 109
  • 1
  • 10