Documentation ¶
Overview ¶
Package im8f contains a format for encoding/decoding im8 images.
Index ¶
Constants ¶
const Magic = "\x69IM8\n"
Magic is the string that appears at the beginning of every im8f encoding.
Variables ¶
This section is empty.
Functions ¶
func DecodeConfig ¶
DecodeConfig reads an image.Config from r in im8f format.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder holds the data that is read in im8f format.
func NewDecoder ¶
func NewDecoder() *Decoder
NewDecoder returns an empty Decoder, ready for use. &Decoder{} also works fine for this.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder contains all of the data that needs to be written in im8f format.
func NewEncoder ¶
NewEncoder creates an Encoder for any image, using im8.Convert.
func NewIm8Encoder ¶
NewIm8Encoder creates an Encoder for an Im8.
type MagicMismatchError ¶
MagicMismatchError is an error that occurs when the decoded data doesn't match Magic.
func (MagicMismatchError) Error ¶
func (m MagicMismatchError) Error() string
Error returns a string representation of the MagicMismatchError.