Page 1 of 1

Saving to tga from canvas?

PostPosted: Fri Apr 05, 2013 4:02 pm
by brandov
I'm sure it could most likely be done with arrays, but I'm not sure how to set up this code. Can anyone help me with this? I'd really appreciate it. :mrgreen:
I've searched tons of game editor threads, and I've found people talking about it but no actual examples :C

Re: Saving to tga from canvas?

PostPosted: Fri Apr 05, 2013 5:59 pm
by skydereign
With this kind of thing, it should be easy enough to find outside of gE. Here are a few helpful links.
http://danielbeard.wordpress.com/2011/06/06/image-saving-code-c/
http://en.wikipedia.org/wiki/Truevision_TGA#Required_sections
If you still need help from there, I can make an example. The key thing is that you'll have to have an array to represent the rgba of the canvas (easiest representation being a 3d array [width][height][4]).

Re: Saving to tga from canvas?

PostPosted: Sat Apr 06, 2013 3:59 am
by brandov
Thanks for replying, and for the links. They look like they might be promising, I'll play around with it and see if I can get it to work! If not, I'll most likely PM you sometime :lol: