Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultEncodings = []Encoding{ &RawEncoding{}, &TightEncoding{}, &TightPNGEncoding{}, }
DefaultEncodings lists the encodings enabled by default on the server.
Functions ¶
This section is empty.
Types ¶
type Encoding ¶
type Encoding interface { // Code should return the int32 code of the encoding type. Code() int32 // HandleBuffer should craft a rectangle from the given image and // queue it onto the given writer. HandleBuffer(w io.Writer, format *types.PixelFormat, img *image.RGBA) }
Encoding is an interface to be implemented by different encoding handlers.
func GetDefaults ¶
func GetDefaults() []Encoding
GetDefaults returns a slice of the default encoding handlers.
type RawEncoding ¶
type RawEncoding struct{}
RawEncoding implements an Encoding intercace using raw pixel data.
func (*RawEncoding) HandleBuffer ¶
func (r *RawEncoding) HandleBuffer(w io.Writer, f *types.PixelFormat, img *image.RGBA)
HandleBuffer handles an image sample.
type TightEncoding ¶
type TightEncoding struct{}
TightEncoding implements an Encoding intercace using Tight encoding.
func (*TightEncoding) HandleBuffer ¶
func (t *TightEncoding) HandleBuffer(w io.Writer, f *types.PixelFormat, img *image.RGBA)
HandleBuffer handles an image sample.
type TightPNGEncoding ¶
type TightPNGEncoding struct{}
TightPNGEncoding implements an Encoding intercace using Tight encoding.
func (*TightPNGEncoding) HandleBuffer ¶
func (t *TightPNGEncoding) HandleBuffer(w io.Writer, f *types.PixelFormat, img *image.RGBA)
HandleBuffer handles an image sample.
Click to show internal directories.
Click to hide internal directories.