WritePixel

BlitzMax Forums/BlitzMax Programming/WritePixel

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You'd actually be better off doing something like:

local a:TPixmap=LoadPixmap("Pic.png")
a=ConvertPixmap(a,PF_RGBA8888)
local b:Byte Ptr=PixmapPixelPtr(a,0,0)
local c:Int=PixmapPitch(a)

'then e.g.

a[50+(50*c)]=$FF              'write one color component at the 50th component on line 50

Ie use pointers to write the bytes/integers in your preferred format - although this would potentially break if the pixmap system is changed somehow.