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
-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
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
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
] 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
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
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
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
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
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
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
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:
12 matches
Mail list logo