png

package
v0.0.0-...-2a0e038 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColorType = []uint32{
	0: 1,
	2: 3,
	3: 3,
	4: 2,
	6: 4,
}

ColorType Mapping of color type to number of samples

Functions

This section is empty.

Types

type PNG

type PNG struct {
	Chunks []chunk.Chunk
	// contains filtered or unexported fields
}

PNG Represents a PNG file as described at www.png.org

func Parse

func Parse(file []byte) (PNG, error)

Parse Will parse a byte array to PNG structure

func (*PNG) GetHeader

func (r *PNG) GetHeader() map[string]interface{}

GetHeader returns the image header (IDHR chunk)

func (*PNG) GetHeight

func (r *PNG) GetHeight() uint32

GetHeight returns the image height

func (*PNG) HideData

func (r *PNG) HideData(data []byte, dataType string, bitloss int) error

HideData Hide some data in this png file

func (*PNG) RevealData

func (r *PNG) RevealData() (data []byte, dataType string, bitloss int, err error)

RevealData Reveal hidden data in this png image

func (PNG) String

func (r PNG) String() string

String Text representation of the PNG

func (*PNG) ToBytes

func (r *PNG) ToBytes() []byte

ToBytes Reduces this PNG structure to a byte array

Jump to

Keyboard shortcuts

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