PDA

View Full Version : Create Picture file format



guju
08-28-2002, 02:40 AM
Hi!
I want to copy my window into a file. It works fine to read the pixels, but now i do not know how to store them into a file. I do not care if it is a gif,ps or bmp file format. It should only be OS indepenedt.
Thanks
Juergen

zen
08-28-2002, 03:30 AM
I recommend the tga file format.It's quite simple.First go to wotsit.org and get the specs.Then all you have to do is write a file with the correct header(with info on resolution,bit depth,etc.)and the image data(in the correct format though,BGRA if I'm not mistaken).It might sound hard but it isn't.In fact there's a thread over at the beginners forum where some people have posted code.You can take a look.BTW it is only natural that common questions like this have been answered a lot of times.A quick search will get much more info than what peopleare gonna post in here and you won't have to wait either.Anyway hope that helps.

guju
08-28-2002, 04:02 AM
Thanks! That's it!
Juergen

Ozzy
08-28-2002, 10:15 AM
raw