Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

nirix/swift-screencapture

Repository files navigation

This framework makes capturing screenshots within OS X easy.

To capture a region of the screen, it makes use of NSTask to call /usr/sbin/screencapture.

Carthage

github "nirix/swift-screencapture"

How to use it

An example application can be found in the Example directory.

Screenshots

import ScreenCapture
// Capture part of the screen
let regionUrl = ScreenCapture.captureRegion("/path/to/save/to.png")
// Capture the entire screen
let screenUrl = ScreenCapture.captureScreen("/path/to/save/to.png")

Record screen

import ScreenCapture
let recorder = ScreenCapture.recordScreen("/path/to/save/to.mp4")
recorder.start()
...
recorder.stop()
let movieUrl = recorder.destination

License

This framework and it's code is released under the MIT license.

About

A Swift framework to easily capture the screen on OS X.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

AltStyle によって変換されたページ (->オリジナル) /