ipaPng

package
v0.0.0-...-b277d89 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	Length uint32 // chunk data length
	CType  string // chunk type
	Data   []byte // chunk data
	Crc32  uint32 // CRC32 of chunk data
	// contains filtered or unexported fields
}

Each chunk starts with a uint32 length (big endian), then 4 byte name, then data and finally the CRC32 of the chunk data.

func (*Chunk) Populate

func (c *Chunk) Populate(r io.Reader) error

Populate will read bytes from the reader and populate a chunk.

type IpaPNG

type IpaPNG struct {
	Img image.Image

	IsCgBI bool

	CompressionMethod uint32
	FilterMethod      uint32

	IDAT []byte
	// contains filtered or unexported fields
}

func Decode

func Decode(r io.ReadSeeker) (*IpaPNG, error)

Decode reads a PNG image from r and returns it as an image.Image. The type of Image returned depends on the PNG contents.

func (IpaPNG) PrintChunks

func (cgbi IpaPNG) PrintChunks() string

PrintChunks will return a string containign chunk number, name and the first 20 bytes of each chunk.

Jump to

Keyboard shortcuts

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