Documentation
¶
Overview ¶
Package xcf implements an image encoder and decoder for GIMPs XCF format
Index ¶
- Variables
- func Decode(r io.ReaderAt) (limage.Image, error)
- func DecodeCompressed(r io.ReaderAt) (limage.Image, error)
- func DecodeConfig(r io.ReaderAt) (image.Config, error)
- func Encode(w io.WriterAt, im image.Image) error
- type CompressedGray
- type CompressedGrayAlpha
- type CompressedNRGBA
- type CompressedPaletted
- type CompressedPalettedAlpha
- type CompressedRGB
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidFileTypeID = errors.New("invalid file type identification") ErrUnsupportedVersion = errors.New("unsupported file version") ErrInvalidHeader = errors.New("invalid header") ErrInvalidProperties = errors.New("invalid property list") ErrInvalidOpacity = errors.New("opacity not in valid range") ErrInvalidGuideLength = errors.New("invalid guide length") ErrInvalidUnit = errors.New("invalid unit") ErrInvalidSampleLength = errors.New("invalid sample points length") ErrInvalidGroup = errors.New("invalid or unknown group specified for layer") ErrUnknownCompression = errors.New("unknown compression method") ErrMissingAlpha = errors.New("non-bottom layer missing alpha channel") ErrNeedReaderAt = errors.New("need a io.ReaderAt") )
Errors
var ( ErrInvalidLayerType = errors.New("invalid layer type") ErrInvalidItemPathLength = errors.New("invalid item path length") ErrInconsistantData = errors.New("inconsistant data read") )
Errors
var ( ErrInvalidParasites = errors.New("invalid parasites layout") ErrNoOpen = errors.New("didn't receive Open token") ErrNoName = errors.New("didn't receive Name token") )
Errors
var ( ErrInconsistantClosedState = errors.New("inconsistant closed state") ErrUnknownPathsVersion = errors.New("unknown paths version") )
Errors
var ( ErrInvalidString = errors.New("string is invalid") ErrStringTooLong = errors.New("string exceeds maximum length") ErrInvalidSeek = errors.New("invalid seek") )
Errors
var ( ErrUnknownVectorVersion = errors.New("unknown vector version") ErrUnknownStrokeType = errors.New("unknown stroke type") ErrInvalidFloatsNumber = errors.New("invalids number of floats") )
Errors
var (
ErrInvalidBoolean = errors.New("invalid boolean value")
)
Errors
var (
ErrInvalidRLE = errors.New("invalid RLE data")
)
Errors
var (
ErrTooBig = errors.New("write too big")
)
Errors
Functions ¶
func DecodeCompressed ¶
DecodeCompressed reads an XCF layered image, as Decode, but defers decoding and decompressing, doing so upon an At method
func DecodeConfig ¶
DecodeConfig retrieves the color model and dimensions of the XCF image
Types ¶
type CompressedGray ¶
CompressedGray is an image.Image for which the data remains in a compressed form until read.
func (*CompressedGray) At ¶
func (c *CompressedGray) At(x, y int) color.Color
At returns colour at the specified coords
func (*CompressedGray) Bounds ¶
func (c *CompressedGray) Bounds() image.Rectangle
Bounds returns a Rect containg the boundary data for the image
func (CompressedGray) ColorModel ¶
func (CompressedGray) ColorModel() color.Model
ColorModel returns the Gray Color Model
type CompressedGrayAlpha ¶
CompressedGrayAlpha is an image.Image for which the data remains in a compressed form until read.
func (*CompressedGrayAlpha) At ¶
func (c *CompressedGrayAlpha) At(x, y int) color.Color
At returns colour at the specified coords
func (*CompressedGrayAlpha) Bounds ¶
func (c *CompressedGrayAlpha) Bounds() image.Rectangle
Bounds returns a Rect containg the boundary data for the image
func (CompressedGrayAlpha) ColorModel ¶
func (CompressedGrayAlpha) ColorModel() color.Model
ColorModel returns the Gray Alpha Color Model
func (*CompressedGrayAlpha) GrayAlphaAt ¶
func (c *CompressedGrayAlpha) GrayAlphaAt(x, y int) lcolor.GrayAlpha
GrayAlphaAt returns Gray+Alpha colour at the specified coords
type CompressedNRGBA ¶
CompressedNRGB is an image.Image for which the data remains in a compressed form until read.
func (*CompressedNRGBA) At ¶
func (c *CompressedNRGBA) At(x, y int) color.Color
At returns colour at the specified coords
func (*CompressedNRGBA) Bounds ¶
func (c *CompressedNRGBA) Bounds() image.Rectangle
Bounds returns a Rect containg the boundary data for the image
func (CompressedNRGBA) ColorModel ¶
func (CompressedNRGBA) ColorModel() color.Model
ColorModel returns the NRGBA Color Model
type CompressedPaletted ¶
type CompressedPaletted struct { Rect image.Rectangle Palette color.Palette // contains filtered or unexported fields }
CompressedPaletted is an image.Image for which the data remains in a compressed form until read.
func (*CompressedPaletted) At ¶
func (c *CompressedPaletted) At(x, y int) color.Color
At returns colour at the specified coords
func (*CompressedPaletted) Bounds ¶
func (c *CompressedPaletted) Bounds() image.Rectangle
Bounds returns a Rect containg the boundary data for the image
func (*CompressedPaletted) ColorModel ¶
func (c *CompressedPaletted) ColorModel() color.Model
ColorModel returns the Pallette of the image
type CompressedPalettedAlpha ¶
type CompressedPalettedAlpha struct { Rect image.Rectangle Palette lcolor.AlphaPalette // contains filtered or unexported fields }
CompressedPalettedAlpha is an image.Image for which the data remains in a compressed form until read.
func (*CompressedPalettedAlpha) At ¶
func (c *CompressedPalettedAlpha) At(x, y int) color.Color
At returns colour at the specified coords
func (*CompressedPalettedAlpha) Bounds ¶
func (c *CompressedPalettedAlpha) Bounds() image.Rectangle
Bounds returns a Rect containg the boundary data for the image
func (*CompressedPalettedAlpha) ColorModel ¶
func (c *CompressedPalettedAlpha) ColorModel() color.Model
ColorModel returns the Pallette of the image
type CompressedRGB ¶
CompressedRGB is an image.Image for which the data remains in a compressed form until read.
func (*CompressedRGB) At ¶
func (c *CompressedRGB) At(x, y int) color.Color
At returns colour at the specified coords
func (*CompressedRGB) Bounds ¶
func (c *CompressedRGB) Bounds() image.Rectangle
Bounds returns a Rect containg the boundary data for the image
func (CompressedRGB) ColorModel ¶
func (CompressedRGB) ColorModel() color.Model
ColorModel returns the RGB Color Model