image and pixel
Blitz3D Forums/Blitz3D Beginners Area/image and pixel
| ||
hello blitzbasic fans, hear's a problem . Alpha information are lost or deleted. why this code does not he work? I don't know . Global NBtest% = $23DEDEDE , colorpixel% = $00000000 Global image% = 0 , buffimage% = 0 Graphics3D 400 , 200 image = LoadImage ( "kaleid.png" ) buffimage = ImageBuffer ( image ) colorpixel = ReadPixel ( 100 , 100 , buffimage ) Print "colorpixel = ReadPixel" Print "Hex$ ( NBtest ) = " + Hex$ ( NBtest ) Print "Hex$ ( colorpixel ) = " + Hex$ ( colorpixel ) WaitKey ( ) If colorpixel = NBtest Then Print "OK !" Else Print "WritePixel NBtest" WritePixel ( 100 , 100 , NBtest , buffimage ) SaveBuffer ( buffimage , "kaleid.png" ) EndIf WaitKey ( ) End Do you want to try it , and give me any explanation . Thank you . |
| ||
LoadImage doesn't support alpha, simple as that. There is no alpha support in the entire 2D system - you shouldn't rely on the values read from the alpha channel to even be consistent; they're simply not valid. If you need a buffer with alpha support, use a texture instead. |
| ||
As simple as that ! Certainly thank you, Yasha . I could think it . |