Re: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Jeroen Beckers
var n:Number = -16777216 trace(n.toString(16)); Gives me: -100 ? Claus Wahlers wrote: pixel = -16777216 -16777216 is 0xff00 (solid black) Try to trace pixel.toString(16) Cheers, Claus. ___ Flashcoders@chattyfig.figleaf.com To change

RE: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Merrill, Jason
-16777216 is 0xff00 (solid black) I thought solid black was 0xff 16777215 ? Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your

Re: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Claus Wahlers
Number.toString() is a little borked. Meister Skinner explains it here: http://www.gskinner.com/blog/archives/2005/12/source_code_tra.html Cheers, Claus. Jeroen Beckers wrote: var n:Number = -16777216 trace(n.toString(16)); Gives me: -100 ? Claus Wahlers wrote: pixel = -16777216

Re: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Claus Wahlers
Merrill, Jason wrote: -16777216 is 0xff00 (solid black) I thought solid black was 0xff 16777215 That'd be white. 0 is black. The additional 'ff' in the highest byte is the alpha value (returned by getPixel32). -- claus wahlers cĂ´deazur brasil http://codeazur.com.br

RE: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Merrill, Jason
] On Behalf Of Claus Wahlers Sent: Friday, September 15, 2006 11:09 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] BitmapData.getPixel() - negative value ? Merrill, Jason wrote: -16777216 is 0xff00 (solid black) I thought solid black was 0xff 16777215 That'd be white. 0 is black

Re: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Claus Wahlers
Oooops, you are right, I meant 0x00 Nevertheless, you had said, 0xff00 (solid black) ?? Yeah. Read the rest of my mail. ;) -16777216 is 0xff00 (solid black) I thought solid black was 0xff 16777215 That'd be white. 0 is black. The additional 'ff' in the highest byte is the

Re: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Zeh Fernando
Oooops, you are right, I meant 0x00 Nevertheless, you had said, 0xff00 (solid black) ?? It's because it has the alpha value on it (ARGB) with a opacity of 255 (100% opaque, or 0% transparent). 0x00 (or just 0) *IS* solid black, but if you're painting on a bitmap with an alpha

Re: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Jeroen Beckers
Thank you for the link, I will surely read it! Since I don't need the alpha, I changed getPixel32 to getPixel (oh, sorry for wrong topic-title) and it works fine now. Thanks for all the input :-). (Oh, and I also noticed that I was dividing by 0x0, which is off course '0' and dividing

RE: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Merrill, Jason
list Subject: Re: [Flashcoders] BitmapData.getPixel() - negative value ? Oooops, you are right, I meant 0x00 Nevertheless, you had said, 0xff00 (solid black) ?? Yeah. Read the rest of my mail. ;) -16777216 is 0xff00 (solid black) I thought solid black was 0xff 16777215

RE: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-15 Thread Merrill, Jason
PROTECTED] On Behalf Of Zeh Fernando Sent: Friday, September 15, 2006 11:42 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] BitmapData.getPixel() - negative value ? Oooops, you are right, I meant 0x00 Nevertheless, you had said, 0xff00 (solid black) ?? It's because it has

[Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-14 Thread Jeroen Beckers
Hi list! I was trying to create a little class that generates a 2d grid from a perlinNoise-bitmap image. Now, when I perform the getPixel32(), it returns a negative value. I did some research and it appears you can get '-1' when the indexes are out of bounds, but that's as negative as it

Re: [Flashcoders] BitmapData.getPixel() - negative value ?

2006-09-14 Thread Claus Wahlers
pixel = -16777216 -16777216 is 0xff00 (solid black) Try to trace pixel.toString(16) Cheers, Claus. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: