How can I save a pixmap as a file. I'd like to save it as as JPG, TGA, etc. Is the possible with Max natively? Has anyone ported FreeImage yet ?
Thanks
RJJ
The PNG Loader module has a SavePixmapPng function, I don't know what other formats have a save yet.
Uhm... it says "Identifier not found" when trying to save a pixmap using SavePixmapPNG.
Identifier not found suggests you are using a non-existant variable.
It says: Identifier 'SavePixmapPNG' not found.
Try it yourself.
LoadPixmap doesn't work, too.
This works for me:
SetGraphicsDriver(GLMax2DDriver())
Graphics 640,480,0,0
Global myPixmap : TPixmap
While Not KeyDown(1)
Cls
DrawRect(10,10,100,100)
Flip
If KeyHit(KEY_P) Then myPixmap = GrabPixmap(0,0,640,480)
If KeyHit(KEY_S) Then SavePixmapPNG(myPixmap, "c:\myimage.png")
Wend
End
It's a bit old but you might find it interresting to look at :
http://www.blitzbasic.com/Community/posts.php?topic=41965