I make a image: #test_image1 and try to draw a image from datasection in it. Then i try to debug the color from a chosen point, for some reason i dont understand, gives it 0 back. While the color is red.
my goal here is to read all the points (colors) from the image and put it in a array.
(i found some forum posts from 2012, but that didnt work for me)
Any help is appreciated!
schuinestreep.png:

code:
Code: Select all
Enumeration
#test_image1
#Image_Schuinestreep
EndEnumeration
DataSection
schuinestreep:
IncludeBinary "Data_ImageTools/acties/polygon/fillins/schuinestreep.png"
EndDataSection
Dim image_pixel_data.l(29, 29)
CreateImage(#test_image1, 30, 30, 32, #PB_Image_Transparent)
If StartDrawing(ImageOutput(#test_image1))
DrawImage(ImageID(CatchImage(#Image_Schuinestreep, ?schuinestreep)), 0, 0)
x = 0
y = 0
Debug Red(Point(x, y))
Debug Green(Point(x, y))
Debug Blue(Point(x, y))
Debug Alpha(Point(x, y))
; For x = 0 To 29
; For y = 0 To 29
; image_pixel_data(x, y) = Point(x, y)
; Next y
; Next x
StopDrawing()
EndIf