I’m pretty sure this has been suggested a few times over the past many years. But I’d like to discuss it with people again.
I think it would be cool if we had a GetScreenshot() method that returned some asset ID that could be used immediately in-game.
Use-case example: I have a game where people can build their own maps. When they save, it would be cool to have a thumbnail picture of their built map instead of just a title.
I can imagine such a method being attached to a camera. And so it takes a snapshot from the perspective of the given camera. Perhaps resolution parameters could be added: GetScreenshot(int width, int height)
I imagine a large barrier to such a method would be creating an asset that avoids a moderation process. Perhaps such images had to be taken client-side and are only viewable for that player?
You can already do this with CreatePlaceAsync() so I don’t think moderation is an issue. What might be an issue, is where are these pictures stored? On the server? On the website? What if I call the function 10,000,000 times? That would create lots of unnecessary files on either of those. That’s something that would have to be considered, but I definitely support the idea of being able to utilize screenshots.
The function calling could be limited just like http requests and data stores.[/quote]
It could be limited, like only 10 screenshots per minute per server/client. And maybe they don’t have to be a decal image and saved forever, but it could be deleted after a week or so.
I have asked about this feature many times before both on this forum and on roblox forum. They can just temporary save it and when loaded delete it (or until server is shut down) or something that way and limit the request if it it will make the server slow. I hope some day it can be implemented I have a project that really needs it.
Maybe the best idea is for ROBLOX to create a new “ImageData” object that stores the data of an image in byte/hex code, but this data can’t be altered (prevent misuse), and you can store this data as any other UserData value. Then the image data itself isn’t stored anywhere but in an ImageData object. Then the ImageData object is returned from Camera:TakeScreenshot().
I also suggest that Camera:TakeScreenshot() would look more like this:
Camera:TakeScreenshot(startUDim2 = UDim2.new(0, 0, 0, 0), endUDim2 = UDim2.new(1, 0, 1, 0))
That could be used to help cutdown on ImageData sizes and increase the speed of this.
Maybe the best idea is for ROBLOX to create a new “ImageData” object that stores the data of an image in byte/hex code, but this data can’t be altered (prevent misuse), and you can store this data as any other UserData value. Then the image data itself isn’t stored anywhere but in an ImageData object. Then the ImageData object is returned from Camera:TakeScreenshot().
I also suggest that Camera:TakeScreenshot() would look more like this:
Camera:TakeScreenshot(startUDim2 = UDim2.new(0, 0, 0, 0), endUDim2 = UDim2.new(1, 0, 1, 0))
That could be used to help cutdown on ImageData sizes and increase the speed of this.[/quote]
Or better, Camera:TakeShot(CFrame cf, int width, int height)
We cannot have clients connect to arbitrary web servers due to privacy concerns. We probably also shouldn’t allow unregistered players (i.e. guests) to upload arbitrary images to our CDN.