png

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package png provides animated PNG image format support for deanimator.

Index

Constants

This section is empty.

Variables

View Source
var DecodeFunc = gopng.Decode

DecodeFunc lets you override the built-in PNG package decode if desired.

Functions

func IsAnimated

func IsAnimated(r io.Reader) (bool, error)

IsAnimated returns true if the reader is an animated PNG (APNG). A false result with no error indicates the buffer definitively contains a normal PNG.

func RenderFirstFrame

func RenderFirstFrame(src io.Reader, dst io.Writer) error

RenderFirstFrame extracts the first frame from an animated PNG (APNG). If the image is not complete, it scans the image, stripping non-public chunks while checking wether a complete default image is available (e.g. the start of an "fcTL" chunk after 1 or more "IDAT" chunks). If the complete default image can be extracted, it terminates the image with an "IEND" chunk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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