Documentation
¶
Overview ¶
Package png implements some of the PNG format using Restruct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chunk ¶
type Chunk struct {
Len uint32
Type string `struct:"[4]byte"`
Data struct {
IHDR *ChunkIHDR `struct-case:"$'IHDR'" json:",omitempty"`
IDAT *ChunkIDAT `struct-case:"$'IDAT'" json:",omitempty"`
IEND *ChunkIEND `struct-case:"$'IEND'" json:",omitempty"`
Raw *ChunkRaw `struct:"default" json:",omitempty"`
} `struct-switch:"Type"`
CRC uint32
}
Chunk contains the data of a single chunk.
type ChunkIDAT ¶
type ChunkIDAT struct {
Parent *Chunk `struct:"parent" json:"-"`
Data []byte `struct-size:"Parent.Len"`
}
ChunkIDAT contains the body of a IDAT chunk.
type ChunkIHDR ¶
type ChunkIHDR struct {
Width uint32
Height uint32
BitDepth byte
ColorType ColorType
CompressionMethod byte
FilterMethod byte
InterlaceMethod byte
}
ChunkIHDR contains the body of a IHDR chunk.
type ChunkRaw ¶
type ChunkRaw struct {
Parent *Chunk `struct:"parent" json:"-"`
Data []byte `struct-size:"Parent.Len"`
}
ChunkRaw contains the body of an unrecognized chunk.
Click to show internal directories.
Click to hide internal directories.