How to save a 2D image?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Quillraven
Posts: 62
Joined: Fri Aug 22, 2008 7:22 am

How to save a 2D image?

Post by Quillraven »

hi,

i wonder if it is possible to save a 2D image into a .png file( or any other fileformat) with irrlicht?

for example:
Image

we got this editor and we "paint" different tiles (parts from the left side texture) on the gamefield (grid on the right).

my idea now was to render the gamefield without the grid and save this image (rect selection) in a file. is this possible?

the other solutation would be, to save the maintexture used for a tile and the part of the texture used for the tile and then draw tile per tile with the stored data. however this would be more work than drawing just the simple image.
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

For saving image data to a file take a look at IVideoDriver::writeImageToFile()
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Quillraven
Posts: 62
Joined: Fri Aug 22, 2008 7:22 am

Post by Quillraven »

-_- thx

was looking:
IImage->save/store
or
IVideoDriver->save/store


write is intuitiv do (shame on me :( ).
Post Reply