Parts of this topic have been dealt with but I need a more direct response than what I've found.
How do I grab a screen and copy it to an image. I know I can grab a screen and store it in a sprite. I do not know how to display the sprite on an image to complete the process. I imagine that a large sprite could be used to replace the use of the image as the destination, though it doesn't answer how to display a sprite on an image.
Would it have to be done via the screen capture methods with DirectX that have been posted elsewhere? I was hoping it wouldn't.
Speed is important, as usual.
As a side note, a new language feature that may be useful is duplicating the contents of the flipbuffers() for double buffering. This means to duplicate the displayed buffer contents in the hidden buffer.
Demivec
Screen to Image
- travismcgee
- New User
- Posts: 9
- Joined: Mon May 29, 2006 2:16 am
Perhaps he is making a game and he wants to have a screenshot feature in his game which allows the user to take a screenshot of the game. I am not sure, but I think I saw an example in PureArea which did that.travismcgee wrote:May I ask why you want it in image form? What are you going to do with it that a sprite would not be suitable for?
Look in www.purearea.net in CodeArchiv.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Demivec,
perhaps you can get some interesting some stuff useful for you here:
http://www.purebasic.fr/english/viewtop ... 6779#96779
There, the macros called MyCopyBuffer and MyCopyBufferEx are useful to get displayed graphic info to an image or whatever buffer in memory.
What you need is to convert graphic data (add BMP , JPG, or whatever header) after copy the graph info.
perhaps you can get some interesting some stuff useful for you here:
http://www.purebasic.fr/english/viewtop ... 6779#96779
There, the macros called MyCopyBuffer and MyCopyBufferEx are useful to get displayed graphic info to an image or whatever buffer in memory.
What you need is to convert graphic data (add BMP , JPG, or whatever header) after copy the graph info.
I wanted to do so because I had wanted to use the image as a type of buffer to test or change display types and then redisplay them as a whole composition. So in effect, with sprites moving over a background I would want to take a screen shot, then use this as a background (it could be retransferred to back into large sprites) for what would be displayed next with additional sprites over the top. I would also be able to test the parts of that new background image for effects based on conditions of what was present (in color form for instance).travismcqee wrote:May I ask why you want it in image form? What are you going to do with it that a sprite would not be suitable for?
This may fit the bill, though I think I still have questions about the conversion at the end you mentioned (how to accomplish it).psycopantha wrote:There, the macros called MyCopyBuffer and MyCopyBufferEx are useful to get displayed graphic info to an image or whatever buffer in memory.
What you need is to convert graphic data (add BMP , JPG, or whatever header) after copy the graph info.
We are exploring other methods but the obvious ones seem to have roadblocks.
Demivec
Are you talking about just a basic screen capture?
Maybe some info in these posts also that might help you:
http://www.purebasic.fr/english/viewtop ... en+capture
http://www.purebasic.fr/english/viewtop ... en+capture
http://www.purebasic.fr/english/viewtop ... en+capture
Maybe some info in these posts also that might help you:
http://www.purebasic.fr/english/viewtop ... en+capture
http://www.purebasic.fr/english/viewtop ... en+capture
http://www.purebasic.fr/english/viewtop ... en+capture