Captures APIs are now available!

Will it ever be possible for us to capture screenshots from other CameraInstances? @TheGamer101 @merlin_codes

2 Likes

Not intentional, we will fix this.

1 Like

Bumpy bump, I’m still waiting on an answer please. Thanks!

Hi there! I’m interested to know!

Hey folks, some quick updates on the feature:

  • In order to declutter user captured images, watermarks no longer appear in user-initiated captures or in Selfie Mode dev module images. The following properties have been deprecated:
    • ScreenshotHud OverlayFont
    • ScreenshotHud UsernameOverlayEnabled
    • ScreenshotHud ExperienceNameOverlayEnabled
  • The CaptureService CaptureSaved signal has been deprecated in favor of the UserCaptureSaved signal
  • Users on most desktop clients can now initiate a capture by pressing Alt + 1 (Windows non-UWP) or Option + 1 (Mac)
    • Developers can disable this hotkey by disabling the captures feature via SetCoreGuiEnabled
1 Like

Im probably messing something up here but in this little demo the image is visible in the capture despite being disabled before the capture resulting in a white background

local captureService = game:GetService("CaptureService")
local AssetService = game:GetService("AssetService")
local Runservice = game:GetService("RunService")
local Canvas = Instance.new("EditableImage")

Canvas.Parent = script.Parent.ImageLabel
Canvas.Size = script.Parent.ImageLabel.AbsoluteSize

--stored because vec2 is costly to build for reasons
local v2z = Vector2.zero

--Before capture disable canvas
captureService.CaptureBegan:Connect(function()
	script.Parent.ImageLabel.Visible = false
end)

--After capture enable canvas for viewing
captureService.CaptureEnded:Connect(function()
	script.Parent.ImageLabel.Visible = true
end)

--every second take a screenshot and render it to the canvas
while task.wait(1) do
	captureService:CaptureScreenshot(function(capture)
		Canvas:DrawImage(v2z, AssetService:CreateEditableImageAsync(capture), Enum.ImageCombineType.Overwrite)
	end)
end


(ignore the stretching I know how to fix it, im just trying to solve this first)

Hey, coming across this issue too. I think the CaptureBegin and CaptureEnded signals are only fired for the user’s capture method, rather than developer-triggered captures unfortunately.

I hope that this will change because not having the ability to capture the user’s UI severely limits the application of developer-created capture systems.

1 Like

is there any way to take a photo with this API that is with another camera that is not the main camera? for example to have multiple photos of ur character but from diferent angles

Great question, we have some hard technical limitations that prevent us from enabling this kind of functionality, so there won’t be a way to do this in the near future.

1 Like

oh thank you, and I got other question if u can answer me, in the RDC they show that a video capture feature is coming for this API but in the RDC devforum post they don’t talk about it, there is anything like a date or how it will work that we should know? (sorry for my english is not my first lenguage :slight_smile:)

Yes, we’re so excited about the video capture capability! It’s an upcoming feature so the details on a timeline are a bit sparse, but we’ll keep the community posted on updates as we can give them.

We invite you to give feedback on how you’d plan on using a video API! We got the chance to hear from several creators on this topic at RDC, and we would love to continue hearing feedback on it.

1 Like

I have a use case for the Capture APIs in general; allowing users to report abuse in my game through taking screenshots of the abusive content. It’s possible to have users take a capture and generate those images to be displayed in EditableImages in-game, however it’s not possible to transfer these externally to platforms like Discord. I guess this would be more of a feature request towards the EditableImages team. :man_shrugging:

It seems no matter what I try, using the content id from CaptureService | Documentation - Roblox Creator Hub in AssetService:CreateEditableImageAsync() will not work on a live server. It works in studio just fine. It says it hasn’t been enabled yet.

The API Doc does say “it must be associated with and/or owned by a creator of the experience, or it must have been created inside the experience” Does this not count as being created inside the experience?

I would just like to know for sure if this if for security purposes or I just need to wait? And if it is for security purposes, really what extra info could be recorded that couldn’t already be if a developer wanted to log every keystroke and cframe and send it offsite like has been mentioned? Thanks!

Currently EditableImage is in a Studio beta, so the API is not available in-experience yet.

When EditableImage is launched in experiences we do plan to allow you to use EditableImages with Captures but there will be security limitations.

The limitations have not been finalized yet but as an example we don’t want to make it possible for you to prompt a user to purchase an item and then take a screenshot of their Robux balance. So it’s likely that Captures where the CoreGui is visible will not be eligible to be used with EditableImage for user privacy reasons.

3 Likes

I finally tried this today and I’m pretty disappointed at how it works and some of what I’ve read here about its restrictions.

  1. The IsContentSharingAllowed field of PolicyService just doesn’t exist. Why is there a paragraph dedicated to something that, based on reading this thread, has never existed?
  2. There are differences between how developer initiated captures work and how player initiated captures work. Player initiated captures don’t at all respect ScreenshotHud properties. Not respecting those makes the capturing screenshots through the API a lot less appealing, and maybe unusable for people who really want to cut out all core GUIs.
  3. There seems to be no way to detect whether or not sharing screenshots is available for the user. I would really like an API to check beforehand if sharing a screenshot is available so I can prompt a save in the event where it isn’t.
  4. It would be nice if sharing screenshots on PC did something despite there being no native interface for sharing stuff like on mobile. (Maybe prompting to copy the capture to their clipboard?)
  5. Only being able to initiate a capture for 13+ users restricts this feature from being worth using for anything meaningful for a pretty decent portion of the userbase.
  6. As far as I can tell captures a purely local which might be the most disappointing aspect of all here. It would be nice if there was a secure solution for taking screenshots and immediately sharing them with other users in the experience. Giving users the ability to show off their screenshots was probably one of the coolest things I thought about using this for but poses a security risk if I just let users share through editable images once they’re available.

Wouldn’t a better solution to this be to hide purchase GUIs no matter what during a capture? I would really prefer to be able to initiate capture when the game deems necessary and to not have arbitrary restrictions put on the screenshot because something was left in that, as far as I know, could be hidden as simply as other core GUIs are hidden during captures.

3 Likes

Any update on this? There still seems to be memory leaks and it’s been 4 months.

1 Like

Would it ever be possible to edit a screenshot before saving it to the captures gallery? For example:

  1. User takes a screenshot.
  2. Screenshot is turned into EditableImage so it can be cropped/drawn on/etc.
  3. Edited screenshot is then saved to captures with PromptSaveCapturesToGallery.

I’d really like to be able to do this, but this is impossible at the moment because:

  1. PromptSaveCapturesToGallery only takes an array of asset IDs; it doesn’t accept EditableImages. You also can’t generate an asset ID from an EditableImage.
  2. Even if you could do that, the screenshot would get shrunk down because of the 1024x1024 size limit of EditableImages.

EDIT: Looks like this might be possible once Roblox finishes replacing all APIs to use the new Content data type.

Assuming that PromptSaveCapturesToGallery will be upgraded to use Content instead of asset URI strings, you should be able to generate a Content from an EditableImage through Content.fromObject(EditableImage), and then pass this to whatever new method that will replace PromptSaveCapturesToGallery.

The 1024x1024 size limit is still a problem, though.

1 Like

Why do SurfaceGui and BillboardGui always disappear for captures? Personally I’d prefer a case where I can hide specific GUIs (screen/surface/billboard) as separate options, but I was going to manually handle just hiding all the ScreenGui with HidePlayerGuiForCaptures set to false. Unfortunately, no matter whether the SurfaceGui and BillboardGui are parented to PlayerGui or not doesn’t matter. They will always be hidden during captures.

Captures Hide SurfaceGui and BillboardGui.rbxl (60.4 KB)

1 Like

Captures ALT - 1 keybind doesn’t appear to work in studio tests I have Next Gen Studio Preview and New Studio Camera Controls enabled.

Also please consider making it so when you click and hold/tap and hold on the capture button it opens up a settings menu so you can configure if you want to hide GUI/players etc.

It seems like CaptureBegan and CaptureEnded aren’t fired when we use :CaptureScreenshot(). Is this intentional or will it be resolved in the future? Are there any workarounds?