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
4
votes
3 answers

Trying to capture stage area using BitmapData

I am trying to grab part of stage area using BitmapData and copyPixels method: bmd = new BitmapData(stage.stageWidth, stage.stageHeight); bmdRect = new BitmapData(320, 240); rectangle = new Rectangle(360, 20, 320, 240); bmdRect.copyPixels(bmd,…
Dimitree
  • 211
  • 2
  • 6
  • 15
4
votes
4 answers

How can I accurately draw my rotated bitmap?

I have a container with masked bitmap in it. The scale and rotation of this container changes at runtime, and I need to draw the masked bitmap but cannot figure out the appropriate matrix calculations to do so. My code works correctly to reflect…
WillyCornbread
  • 837
  • 1
  • 12
  • 21
4
votes
2 answers

Rotate bitmap data in AS3 180deg for export

I have a bitmap in AS3 flash and I am sending it over to javascript using a base64 encoded jpg string. All that works great. I need to send the img over scaled down, and rotated 180deg. The scaling works, but not the rotation. The rotation never…
Adam Meyer
  • 1,505
  • 1
  • 19
  • 28
4
votes
1 answer

Making sense of some bit magic in the Go standard library

so I've been sifting through some code in the Go standard library trying to make sense of their image and color packages but found some code I just can't make sense of. from http://golang.org/src/pkg/image/color/color.go?s=794:834#L14 From my…
Niklas Schnelle
  • 1,139
  • 1
  • 9
  • 11
3
votes
3 answers

Adding glow/border to edge of only the non-transparent portion of an image using javascript

I'm trying to come up with a way to mimik something we were previously doing in Adobe Flash using some sort of Bitmap Filter but instead with pure javascript. Previously we had a set of PNG images w/ transparency around the core image. When an…
James
  • 1,391
  • 2
  • 14
  • 20
3
votes
1 answer

AS3 get Bitmap from Movieclip with Mask

This works: var a:BitmapData = new BitmapData(640,480); var b:Bitmap = new Bitmap(a); a.draw(movieClip); This doesn't work: movieClip.mask = movieClipMask; var a:BitmapData = new BitmapData(640,480); var b:Bitmap = new…
user534312
  • 91
  • 2
  • 7
3
votes
1 answer

Syncing overlay to displacement map filter

I'm using a DisplacementMapFilter to created a globe-like effect on a flat map. My problem is, I also want to sync some labels to this map. I have the x/y coordinates for their locations on the flat map, but I need to map them to the now-displaced…
Alexis King
  • 43,109
  • 15
  • 131
  • 205
3
votes
1 answer

AS3-Copy the transparency from 1 BitmapData object(loaded PNG) and apply to another?

I have a problem involving loading transparent pngs. What I am trying to do, is to copy the alpha channel from a loaded png, and then apply this alpha channel to another Bitmapdata object. Can anyone suggest how I would do this?
Bachalo
  • 6,965
  • 27
  • 95
  • 189
3
votes
3 answers

AS3 How to check if BitmapData is empty

I have a code to erase a masked movieclip. (credits here) I would like to know how I can check if the whole movieclip is been erased. So I thought I had to check if the BitmapData is empty, but I could be terribly wrong! How can I check if every…
Opoe
  • 1,337
  • 8
  • 30
  • 56
3
votes
2 answers

What does the mask parameter do in the threshold method of the BitmapData class?

I'm trying to replace a color and colors near it in a bitmap. threshold() seems to work but it seems to be that you have to specify the exact color "==" or all colors before or after the exact color "<" & ">" plus "<=" and ">=". I am hoping that…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
3
votes
2 answers

BitmapData.draw clipRect not working as expected

I have a component that contains 4 layers: (in ascending depth order) bgImage:Sprite, dropZone:Sprite, dropMask:Sprite and line:Sprite. The bgImage is at 0,0, and the other objects are placed at various positive coordinates. dropMask is masking…
shanethehat
  • 15,460
  • 11
  • 57
  • 87
3
votes
1 answer

Flex - Save image with higher dpi

In Flex, I am using graphics.codec.JPEGEncoder to save image files that are edited inside application (normal manipulations like brightness etc.) I am able to save files perfectly. What I want to know is that is there any way I can save the image…
redGREENblue
  • 3,076
  • 8
  • 39
  • 57
3
votes
2 answers

How to get transparency to work on a bitmap in Actionscript

For a class project I'm working on "Pissed Off Pigs" (I think you get the idea, the pigs get revenge, don't worry, I'm not going to release it!) and I want to create circles with a fill from a bitmap (circles because the collision math is easier).…
tooshel
  • 1,556
  • 3
  • 19
  • 26
3
votes
6 answers

AS3 - bitmapData edge alpha transparency problem

I'm building a drawing application in as3 and am having problems with feathered or blurred edges on a brush. I'm using bitmapData.draw() to draw the brush but I'm seeing darker colored areas around the edges when drawing slowly. I've tried numerous…
James H
  • 63
  • 1
  • 5
3
votes
1 answer

What does it actually mean by "Bitmap locking"?

The MSDN says that: Locks a Bitmap into system memory. nothing much is explained. What does it actually mean by "Bitmap locking"? How do locking work in the memory? What is the benefit of locking?
user366312
  • 16,949
  • 65
  • 235
  • 452
1
2
3
27 28