Converting TPixMap <> TImage

BlitzMax Forums/BlitzMax Beginners Area/Converting TPixMap <> TImage

OscarBraindeaD(Posted 2010) [#1]
Hi there!
Anybody knows which is the best method to convert a TImage to TPixMap and a TPixMap to TImage.
Sorry if this topic have been asked many times, but I'm a bit confused about this.

Thanks in advance.
Best regards.


Otus(Posted 2010) [#2]
Create a TImage and use the Lock method to edit the TPixmap or SetPixmap if you already have one.


OscarBraindeaD(Posted 2010) [#3]
Thanks Otus!


degac(Posted 2010) [#4]
Tpixmap --> Timage

LoadImage(Tpixmap)


Timage --> Tpixmap

LockImage(Timage)


OscarBraindeaD(Posted 2010) [#5]
Perfect, Degac.
Thank you.