Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorCode ¶
type ErrorCode int
ErrorCode is a gifski internal error code
const ( // Ok is the success error code Ok ErrorCode = iota // NullArg one of input arguments was NULL NullArg // InvalidState a one-time function was called twice, or functions were called in wrong order InvalidState // Quant internal error related to palette quantization Quant // GIF internal error related to gif composing GIF // ThreadLost internal error related to multithreading ThreadLost // NotFound I/O error: file or directory not found NotFound // PermissionDenied I/O error: permission denied PermissionDenied // AlreadyExists I/O error: file already exists AlreadyExists // InvalidInput invalid arguments passed to function InvalidInput // TimedOut misc I/O error TimedOut // WriteZero misc I/O error WriteZero // Interrupted misc I/O error Interrupted // UnexpectedEOF misc I/O error UnexpectedEOF // Aborted progress callback returned 0, writing aborted Aborted // Other should not happen, file a bug Other )
type Gifski ¶
type Gifski struct {
// contains filtered or unexported fields
}
Gifski abstracts the gifski API
func (*Gifski) AddFrame ¶
func (g *Gifski) AddFrame(frameNumber uint, width uint, height uint, pixels []byte, presentationTimeStamp float64) error
AddFrame adds a frame to the animation. This function is asynchronous.
type Settings ¶
type Settings struct {
// Resize to max this width if non-0
Width uint
// Resize to max this height if width is non-0. Note that aspect ratio is not preserved.
Height uint
// 1-100, but useful range is 50-100. Recommended to set to 100.
Quality uint
// If true, looping is disabled. Recommended false (looping on).
Once bool
// Lower quality, but faster encode.
Fast bool
// should we report progress (if so, then the progress channel must be consumed)
ReportProgress bool
}
Settings controls the operation of gifski
Click to show internal directories.
Click to hide internal directories.
