Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cretz/go-scrap
/ functions
Functions
51 in github.com/cretz/go-scrap
⨍
Functions
51
◇
Types & classes
9
↓ 7 callers
Function
failIfErr
(t interface{ Fatal(args ...interface{}) }, err error)
scrap_test.go:144
↓ 6 callers
Method
Frame
Frame gets an individual frame for this captured display. If an error occurs, it is returned. If capturing the frame would be a blocking call, wouldBl
scrap.go:184
↓ 5 callers
Function
fromCgoErr
(raw *C.char)
scrap.go:290
↓ 5 callers
Function
panicIfErr
(err error)
scrap_test.go:150
↓ 3 callers
Method
Bounds
ColorModel implements image.Bounds.
scrap.go:235
↓ 3 callers
Method
FrameImage
FrameImage wraps the result of Frame into a FrameImage. It inherits the same ownership rules and restrictions of the Frame slice result.
scrap.go:197
↓ 3 callers
Method
assertOwned
()
scrap.go:79
↓ 3 callers
Function
newDisplay
(d *C.struct_Display)
scrap.go:71
↓ 3 callers
Function
primaryScreenCapturer
()
scrap_test.go:136
↓ 2 callers
Method
At
At implements image.At.
scrap.go:238
↓ 2 callers
Method
Height
Height gets the height of this display. This will panic if it is called after the display has been passed to NewCapturer.
scrap.go:126
↓ 2 callers
Method
Width
Width gets the width of this display. This will panic if it is called after the display has been passed to NewCapturer.
scrap.go:119
↓ 2 callers
Method
setOwned
(owned bool)
scrap.go:85
↓ 1 callers
Method
Detach
Detach simply replaces Pix with a copy so the ownership rules and regulations of the underlying array no longer apply and this can be freely used with
scrap.go:264
↓ 1 callers
Method
PixOffset
PixOffset gives the index of the Pix where the 4-value BGRA pixel is.
scrap.go:250
↓ 1 callers
Method
RGBAAt
RGBAAt returns the RGBA color at the given point.
scrap.go:241
↓ 1 callers
Method
ToRGBAImage
ToRGBAImage converts this image to a image.RGBA image. This has value because in some packages such as image/draw and image/png, image.RGBA values are
scrap.go:275
↓ 1 callers
Function
capturer
()
example/video/main.go:114
↓ 1 callers
Function
getScreenshot
()
example/screenshot/main.go:38
↓ 1 callers
Function
recordToVideo
(ctx context.Context, fileName string)
example/video/main.go:44
↓ 1 callers
Function
saveScreenshotPNG
(fileName string)
example/screenshot/main.go:25
Function
BenchmarkFrameToRGBAImageApproaches
(b *testing.B)
scrap_test.go:98
Function
BenchmarkRepeatedFrames
(b *testing.B)
scrap_test.go:70
Method
ColorModel
ColorModel implements image.ColorModel.
scrap.go:232
Function
Displays
Displays returns the set of known displays.
scrap.go:52
Function
Example_screenshot
()
scrap_test.go:26
Function
GetDisplay
GetDisplay returns a display on the specified index
scrap.go:108
Method
Height
Height returns the height of this captured display.
scrap.go:164
Function
MakeDPIAware
MakeDPIAware enables the DPI aware setting for this process. This is currently only applicable for Windows. When DPI aware, the Width and Height of th
scrap.go:44
Function
NewCapturer
NewCapturer creates a capturer for the given display. Methods on the display can no longer be called after passed to this function.
scrap.go:142
Method
Opaque
Opaque always returns false as is present a performance optimization for algorithms such as PNG saving.
scrap.go:256
Function
PrimaryDisplay
PrimaryDisplay returns the primary display of the system or an error.
scrap.go:99
Function
TestFrameToRGBAImage
(t *testing.T)
scrap_test.go:47
Function
TestMain
(m *testing.M)
scrap_test.go:14
Method
Width
Width returns the width of this captured display.
scrap.go:159
Function
capturer_frame
(c: *mut scrap::Capturer)
scrap-sys/src/lib.rs:140
Function
capturer_free
(c: *mut scrap::Capturer)
scrap-sys/src/lib.rs:117
Function
capturer_height
(c: *mut scrap::Capturer)
scrap-sys/src/lib.rs:127
Function
capturer_new
(d: *mut scrap::Display)
scrap-sys/src/lib.rs:102
Function
capturer_width
(c: *mut scrap::Capturer)
scrap-sys/src/lib.rs:122
Function
display_free
(d: *mut scrap::Display)
scrap-sys/src/lib.rs:81
Function
display_height
(d: *mut scrap::Display)
scrap-sys/src/lib.rs:91
Function
display_list
()
scrap-sys/src/lib.rs:18
Function
display_primary
()
scrap-sys/src/lib.rs:48
Function
display_width
(d: *mut scrap::Display)
scrap-sys/src/lib.rs:86
Function
error_free
(err: *mut libc::c_char)
scrap-sys/src/lib.rs:6
Function
finalizeCapturer
(c *Capturer)
scrap.go:138
Function
finalizeDisplay
(d *Display)
scrap.go:77
Function
get_display
(index: libc::c_int)
scrap-sys/src/lib.rs:62
Function
main
This example creates a screenshot at screenshot.png or a given filename.
example/screenshot/main.go:14
Function
main
This example records the current screen to out.mp4 or the given filename. Note, the ffmpeg executable must be on the PATH.
example/video/main.go:19