Verge and BMPs
Displaying 1-10 of 10 total.
1
CypherAlmasy
|
I'm trying to use the GrabRegion function to write a part of my screen to a bitmap. None of my graphics programs recognize the bmp, though, they say that's the file type is unrecognized. Am I doing something incorrectly? I'm using WinV2 b.2 Thanks.
CypherAlmasy
"If any of you step out of line, I'll promise to kill you in the name of T.G. Cid too. I'm watching you. Especially you over there, elfy." -Orlandu
Posted on 2001-11-14 23:35:36
|
vecna
|
Well WinV2 doesnt have any builtin BMP writing routines so if your writing your own I'm guessing youre just not doing it right if they're not loading.
If you wanna take screenshots or something I'd suggest just pressing PrtScrn during game play, then start up PSP or Photoshop and Paste the image.
-vecna
Posted on 2001-11-15 10:46:53
|
CypherAlmasy
|
What I'm trying to do is use GrabRegion to get a piece of the screen and then write that buffer to a file with fwrite (or one of those functions, I don't actually have the code in front of me). Will that not work?
CypherAlmasy
"If any of you step out of line, I'll promise to kill you in the name of T.G. Cid too. I'm watching you. Especially you over there, elfy." -Orlandu
Posted on 2001-11-16 00:19:08
|
Praetor
|
a RAW file... the bitmap is probably the single ugliest image file format in the history of graphical computing. You have a header with a bunch of information about the image and then you have the image data going from left-to-right bottom-to-top in (in the case of 24bit BMPs) 3 byte blocks per pixel of, usually, BGR order.
I can't remember exactly how PSP did it, but photoshop lets you open RAW files as long as you specify the height, width and, if it's a highcolor chunk, the channels will be 3 and the bits will be 16. You'll have to play with the interleavedness until it looks right, but the header would be 0. Once you have it open, you can then save it in a better format.
Let it never be said that it goes without saying!
Posted on 2001-11-16 10:01:53
|
Praetor
|
well, I warned you, didn't I?
Let it never be said that it goes without saying!
Posted on 2001-11-16 10:03:15
|
CypherAlmasy
|
I'll try that once I get home. Can I load and work with this data via the LoadRaw() function, or does that refer to something else?
CypherAlmasy
"If any of you step out of line, I'll promise to kill you in the name of T.G. Cid too. I'm watching you. Especially you over there, elfy." -Orlandu
Posted on 2001-11-16 14:13:56
|
Praetor
|
though for VPaint, which I did in V2k oh-so-long ago, I think I just malloc'd the size of the file, opened it, fread it into the buffer and then blitted it... they both probably do the same thing, though if you want to write your own image loader in VC you might want to take a look at my DMA article on tVS... And, as most old-timers around here remember, Kisai wrote a fully working PCX loader/writer in VergeC back in V2, so anything's possible
Let it never be said that it goes without saying!
Posted on 2001-11-17 02:29:54
|
TomT64
|
I'm sure that wouldn't be too difficult, and would save people from learning PrtScreen and cutting down the image. You know n00bs....
TomT64
http://www.spatial-infinity.com
http://www.spatial-infinity.com/vergetut
Posted on 2001-11-19 03:58:46
|
TomT64
|
But why are you doing this? What is it you need to do? I'd love to know what purpose you have for doing this.
TomT64
http://www.spatial-infinity.com
http://www.spatial-infinity.com/vergetut
Posted on 2001-11-19 04:01:43
|
CypherAlmasy
|
Ummmm. . . are you talking to me? Well, to be honest, what I'm trying to do is something similar to the Baldur's Gate games, where the Load Game screen has a small screenshot that allows you to see where you are and what you're doing before you load the game. It's not really an essential thing, just a nice little extra I'd like to add. :-)
"If any of you step out of line, I'll promise to kill you in the name of T.G. Cid too. I'm watching you. Especially you over there, elfy." -Orlandu
Posted on 2001-11-21 01:07:39
|