Skip to content

feat: Add macOS screenshot support#41

Open
MaxLeiter wants to merge 1 commit intoSnosMe:masterfrom
MaxLeiter:master
Open

feat: Add macOS screenshot support#41
MaxLeiter wants to merge 1 commit intoSnosMe:masterfrom
MaxLeiter:master

Conversation

@MaxLeiter
Copy link

@MaxLeiter MaxLeiter commented May 26, 2024

Usage:

  const screenshotBuffer = OverlayController.screenshot();
    const screenshotImage = nativeImage.createFromBuffer(screenshotBuffer, {
      width: OverlayController.targetBounds.width,
      height: OverlayController.targetBounds.height,
    });

Here is a result from the demo app:
screenshot

Colors are a bit off but I'm not sure why; you can see it in the traffic light buttons. I might need to adjust the CGColorSpaceRef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant