library

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotInitializedError = errors.New("libheif was not initialized, you must call the Init() method")

Functions

func DeInit

func DeInit()

func DecodeConfig

func DecodeConfig(r io.Reader) (image.Config, error)

func DecodeImage

func DecodeImage(r io.Reader) (image.Image, error)

func Init

func Init(config Config) error

func RenderFile

func RenderFile(data *[]byte, options RenderOptions) (*[]byte, error)

Types

type Command

type Command struct {
	BinPath string
	Args    []string

	// StartTimeout is the timeout to wait for the plugin to say it
	// has started successfully.
	StartTimeout time.Duration
}

type Config

type Config struct {
	Command Command
}

type RenderFileOutputFormat

type RenderFileOutputFormat string // The file format to render output as.
const (
	RenderFileOutputFormatJPG RenderFileOutputFormat = "jpg" // Render the file as a JPEG file.
	RenderFileOutputFormatPNG RenderFileOutputFormat = "png" // Render the file as a PNG file.
)

type RenderOptions

type RenderOptions struct {
	OutputFormat RenderFileOutputFormat // The format to output the image as
	MaxFileSize  int64                  // The maximum filesize, if jpg is chosen as output format, it will try to compress it until it fits
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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