I think you're making it too complex as you're mixing pixmaps and images.
When you lock an image it automatically returns a pixmap.
You can readpixel/writepixel from/to this pixmap as you would have done an image buffer.
When you unlock the image the pixmap is deleted and the image is updated.
I can try this later if I have time but pseudo code would be...
Load image
My_pixmap:TPixmap = lock(image)
readpixel(my_pixmap)
Change RGB
writepixel(my_pixmap)
unlock(image)
drawimage(image)
.
If you also want to do composite sprites you can...
Loadimage(image1)
loadimage(image2)
cls
drawimage image1
drawimage image2
grabimage image3)
cls
drawimage image3
flip
.
If you want to make an image from a pixmap you simply...
image4:TImage = loadimage(my_pixmap:TPixmap)
Hope it helps
P.S. What you can't do is write two (or more) images to the same pixmap (hence the need to grabimage).
When you lock an image it automatically returns a pixmap.
You can readpixel/writepixel from/to this pixmap as you would have done an image buffer.
When you unlock the image the pixmap is deleted and the image is updated.
I can try this later if I have time but pseudo code would be...
Load image
My_pixmap:TPixmap = lock(image)
readpixel(my_pixmap)
Change RGB
writepixel(my_pixmap)
unlock(image)
drawimage(image)
.
If you also want to do composite sprites you can...
Loadimage(image1)
loadimage(image2)
cls
drawimage image1
drawimage image2
grabimage image3)
cls
drawimage image3
flip
.
If you want to make an image from a pixmap you simply...
image4:TImage = loadimage(my_pixmap:TPixmap)
Hope it helps
P.S. What you can't do is write two (or more) images to the same pixmap (hence the need to grabimage).