Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Screen copy of an area outside of a window.
Print
Pages: [
1
]
Author
Topic: Screen copy of an area outside of a window. (Read 1124 times)
0 Members and 1 Guest are viewing this topic.
bbel91
Newbie
Posts: 2
Screen copy of an area outside of a window.
«
on:
August 24, 2018, 10:53:48 am »
Hello,
I'm trying to make a copy of an area of the screen under Visual C ++ and with SFML.
The result must be in the form of a memory zone or an array in BMP format.
Do you have links or post to give me, please?
Thank you.
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11030
Re: Screen copy of an area outside of a window.
«
Reply #1 on:
August 24, 2018, 11:22:50 am »
You can for example:
Update
a texture from a window
CopyToImage
the texture to an image
Create
a new image with the size of the area you want to copy
Copy
the are from one to the other image
Then you can either
saveToFile
as BMP
or
getPixelPtr
and have access to the data in memory
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Screen copy of an area outside of a window.
anything