Can anybody help

BlitzMax Forums/BlitzMax Programming/Can anybody help

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

I want to automate the maskcolor setting for my App
For Local i:Int = 0 Until 4
	Local pic:TImage = LoadImage("pic.png")
	Local pm:TPixmap = LockImage(pic) 
	Local px:Int = ReadPixel(pm,ImageWidth(pic)-1,1)

	Local r:Byte = px Shr 16
	Local g:Byte = px Shr 8
	Local b:Byte = px
	
	SetMaskColor(r,g,b)

	Print r
	Print g
	Print b
Next


This only work everyother time.. ?
Can anybody help me