imgio

package module
v0.0.0-...-3aa6cc5 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 7 Imported by: 0

README

Image IO Build Status Go Report Card

Documentation

Index

Constants

View Source
const GentlePoint16Capacity = 2
View Source
const PointReadWriterRGBASimpleCapacity = 1
View Source
const PointReadWriterYCbCrSimpleCapacity = 1
View Source
const SimplePoint32Capacity = 4
View Source
const SimplePoint64Capacity = 8
View Source
const SmartPoint8Capacity = 1

Variables

View Source
var ErrImageReadWriterYCbCrOverflow = errors.New("Overflow")
View Source
var ErrOverflow = errors.New("Overflow")

Functions

func NewImage

func NewImage(img draw.Image, gen PointsSequenceGenerator, prw PointReadWriter) *rwImage

Types

type GentlePoint16ReadWriter

type GentlePoint16ReadWriter struct{}

func (GentlePoint16ReadWriter) Read

func (GentlePoint16ReadWriter) Read(start int, c color.Color, p image.Point) ([]byte, int)

func (GentlePoint16ReadWriter) Size

func (GentlePoint16ReadWriter) Write

func (GentlePoint16ReadWriter) Write(b []byte, start int, src color.Color, p image.Point) (color.Color, int)

type Image

type Image interface {
	io.ReadWriteSeeker
}

type ImageGroup

type ImageGroup struct {
	// contains filtered or unexported fields
}

func NewImageGroup

func NewImageGroup(images ...*rwImage) *ImageGroup

func (*ImageGroup) Read

func (ig *ImageGroup) Read(p []byte) (n int, err error)

Read implements io.Reader interface

func (*ImageGroup) Rewind

func (ig *ImageGroup) Rewind()

func (*ImageGroup) Size

func (ig *ImageGroup) Size() (size int64)

func (*ImageGroup) Write

func (ig *ImageGroup) Write(p []byte) (n int, err error)

Write implements io.Writer interface

type ImageReadWriterYCbCr

type ImageReadWriterYCbCr struct {
	// contains filtered or unexported fields
}

func (*ImageReadWriterYCbCr) At

func (i *ImageReadWriterYCbCr) At(x, y int) color.Color

At implements image.Image interface

func (*ImageReadWriterYCbCr) Bounds

func (i *ImageReadWriterYCbCr) Bounds() image.Rectangle

Bounds implements image.Image interface

func (*ImageReadWriterYCbCr) ColorModel

func (i *ImageReadWriterYCbCr) ColorModel() color.Model

ColorModel implements image.Image interface

func (*ImageReadWriterYCbCr) Read

func (i *ImageReadWriterYCbCr) Read(p []byte) (n int, err error)

Read implements io.Reader interface

func (*ImageReadWriterYCbCr) Seek

func (i *ImageReadWriterYCbCr) Seek(offset int64, whence int) (int64, error)

func (*ImageReadWriterYCbCr) Size

func (i *ImageReadWriterYCbCr) Size() (size int64)

func (*ImageReadWriterYCbCr) Write

func (i *ImageReadWriterYCbCr) Write(p []byte) (n int, err error)

Write implements io.Writer interface

type PointReadWriter

type PointReadWriter interface {
	// Read reads bytes from color c from position start on point p
	Read(start int, c color.Color, p image.Point) ([]byte, int)
	// Write writes bytes b into color c starts on position start on point p and returns number of written bytes
	Write(b []byte, start int, c color.Color, p image.Point) (color.Color, int)
	// Return number of bytes possible to be written to point p on current image
	Size(p image.Point) int64
}

type PointReadWriterRGBA

type PointReadWriterRGBA interface {
	Read(start int, c color.RGBA, p image.Point) ([]byte, int)
	Write(b []byte, start int, src color.RGBA, p image.Point) (color.RGBA, int)
	Size(p image.Point) int64
}

type PointReadWriterRGBASimple

type PointReadWriterRGBASimple struct{}

func (PointReadWriterRGBASimple) Read

func (PointReadWriterRGBASimple) Read(start int, c color.RGBA, p image.Point) ([]byte, int)

func (PointReadWriterRGBASimple) Size

func (PointReadWriterRGBASimple) Write

func (PointReadWriterRGBASimple) Write(b []byte, start int, src color.RGBA, p image.Point) (color.RGBA, int)

type PointReadWriterYCbCr

type PointReadWriterYCbCr interface {
	Read(start int, c color.YCbCr, p image.Point) ([]byte, int)
	Write(b []byte, start int, src color.YCbCr, p image.Point) (color.YCbCr, int)
	Size(p image.Point) int64
}

type PointReadWriterYCbCrSimple

type PointReadWriterYCbCrSimple struct {
	Y uint8
}

func (PointReadWriterYCbCrSimple) Read

func (PointReadWriterYCbCrSimple) Read(start int, c color.YCbCr, p image.Point) ([]byte, int)

func (PointReadWriterYCbCrSimple) Size

func (PointReadWriterYCbCrSimple) Write

func (prw PointReadWriterYCbCrSimple) Write(b []byte, start int, src color.YCbCr, p image.Point) (color.YCbCr, int)

type PointsSequenceGenerator

type PointsSequenceGenerator interface {
	Current() image.Point
	Next()
	Rewind()
	Valid() bool
	Seek(offset uint64)
}

type RandPointsSequenceGenerator

type RandPointsSequenceGenerator struct {
}

func (*RandPointsSequenceGenerator) Current

func (rpsg *RandPointsSequenceGenerator) Current() image.Point

func (*RandPointsSequenceGenerator) Next

func (rpsg *RandPointsSequenceGenerator) Next()

func (*RandPointsSequenceGenerator) Rewind

func (rpsg *RandPointsSequenceGenerator) Rewind()

func (*RandPointsSequenceGenerator) Seek

func (rpsg *RandPointsSequenceGenerator) Seek(offset uint64)

func (*RandPointsSequenceGenerator) Valid

func (rpsg *RandPointsSequenceGenerator) Valid() bool

type SimplePoint32ReadWriter

type SimplePoint32ReadWriter struct{}

func (SimplePoint32ReadWriter) Read

func (SimplePoint32ReadWriter) Read(start int, c color.Color, p image.Point) ([]byte, int)

func (SimplePoint32ReadWriter) Size

func (SimplePoint32ReadWriter) Write

func (SimplePoint32ReadWriter) Write(b []byte, start int, src color.Color, p image.Point) (color.Color, int)

type SimplePoint64ReadWriter

type SimplePoint64ReadWriter struct{}

func (SimplePoint64ReadWriter) Read

func (SimplePoint64ReadWriter) Read(start int, c color.Color, p image.Point) ([]byte, int)

func (SimplePoint64ReadWriter) Size

func (SimplePoint64ReadWriter) Write

func (SimplePoint64ReadWriter) Write(b []byte, start int, src color.Color, p image.Point) (color.Color, int)

type SimplePointsSequenceGenerator

type SimplePointsSequenceGenerator struct {
	// contains filtered or unexported fields
}

func NewSimplePointsSequenceGenerator

func NewSimplePointsSequenceGenerator(rect image.Rectangle) *SimplePointsSequenceGenerator

func (*SimplePointsSequenceGenerator) Current

func (spsg *SimplePointsSequenceGenerator) Current() image.Point

func (*SimplePointsSequenceGenerator) Next

func (spsg *SimplePointsSequenceGenerator) Next()

func (*SimplePointsSequenceGenerator) Rewind

func (spsg *SimplePointsSequenceGenerator) Rewind()

func (*SimplePointsSequenceGenerator) Seek

func (spsg *SimplePointsSequenceGenerator) Seek(offset uint64)

func (*SimplePointsSequenceGenerator) Valid

func (spsg *SimplePointsSequenceGenerator) Valid() bool

type SmartPoint8ReadWriter

type SmartPoint8ReadWriter struct{}

func (SmartPoint8ReadWriter) Read

func (SmartPoint8ReadWriter) Read(start int, c color.Color, p image.Point) ([]byte, int)

func (SmartPoint8ReadWriter) Size

func (SmartPoint8ReadWriter) Write

func (SmartPoint8ReadWriter) Write(b []byte, start int, src color.Color, p image.Point) (color.Color, int)

type Storage

type Storage interface {
	io.ReadWriteSeeker
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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