imageclip

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package imageclip reads image data from the operating system clipboard.

Index

Constants

View Source
const (
	// MaxImageBytes is the largest clipboard image jiratui will read.
	MaxImageBytes = 25 << 20
	// MaxImageDimension is the largest supported width or height in pixels.
	MaxImageDimension = 16_384
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Filename string
	MIMEType string
	Data     []byte
	Width    int
	Height   int
}

Image is an image read from the clipboard.

type Reader

type Reader interface {
	ReadImage(context.Context) (Image, error)
}

Reader reads an image from the system clipboard.

type SystemReader

type SystemReader struct{}

SystemReader uses the clipboard tools available on the current platform.

func (SystemReader) ReadImage

func (SystemReader) ReadImage(ctx context.Context) (Image, error)

ReadImage reads PNG, JPEG, or GIF data from the system clipboard.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL