Documentation ¶
Index ¶
- Variables
- func DeInit()
- func DecodeConfig(r io.Reader) (image.Config, error)
- func DecodeImage(r io.Reader) (image.Image, error)
- func Init(config Config) error
- func RenderFile(data *[]byte, options RenderOptions) (*responses.RenderFile, error)
- type Command
- type Config
- type RenderFileOutputFormat
- type RenderOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var NotInitializedError = errors.New("libheif was not initialized, you must call the Init() method")
Functions ¶
func RenderFile ¶
func RenderFile(data *[]byte, options RenderOptions) (*responses.RenderFile, error)
Types ¶
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 // Only used when OutputFormat RenderFileOutputFormatJPG. The maximum filesize, if jpg is chosen as output format, it will try to lower the quality it until it fits. OutputQuality int // Only used when OutputFormat RenderFileOutputFormatJPG. Ranges from 1 to 100 inclusive, higher is better. The default is 95. Progressive bool // Only used when OutputFormat RenderFileOutputFormatJPG and with build tag go_libheif_use_turbojpeg. Will render a progressive jpeg. }
Click to show internal directories.
Click to hide internal directories.