Documentation
¶
Index ¶
- Variables
- func ConvertColor(model ColorModel, red, green, blue, alpha int) (int, int, int, int)
- func CopyImage(src image.Image, model ColorModel) image.Image
- func Decode(r io.Reader, encoding ImageEncoding) (image.Image, error)
- func Draw(base image.Image, sub image.Image, x, y, width, height int)
- func Encode(w io.Writer, img image.Image, encoding ImageEncoding) error
- func EncodingExtension(encoding ImageEncoding) string
- func NewImage(width, height int, model ColorModel) image.Image
- func PointToTable(state *golua.LState, p image.Point) *golua.LTable
- func RGBAToTable(state *golua.LState, rgba *color.RGBA) *golua.LTable
- func Set(img image.Image, x, y, red, green, blue, alpha int)
- func SubImage(img image.Image, x1, y1, x2, y2 int, copy bool) image.Image
- func TableToPoint(state *golua.LState, t *golua.LTable) image.Point
- func TableToRGBA(state *golua.LState, t *golua.LTable) *color.RGBA
- type ColorModel
- type ImageEncoding
- type PNGChunkStripper
Constants ¶
This section is empty.
Variables ¶
View Source
var EncodingList = []ImageEncoding{ ENCODING_PNG, ENCODING_JPEG, ENCODING_GIF, ENCODING_UNKNOWN, }
View Source
var ModelList = []ColorModel{ MODEL_RGBA, MODEL_RGBA64, MODEL_NRGBA, MODEL_NRGBA64, MODEL_ALPHA, MODEL_ALPHA16, MODEL_GRAY, MODEL_GRAY16, MODEL_CMYK, }
Functions ¶
func ConvertColor ¶
func EncodingExtension ¶
func EncodingExtension(encoding ImageEncoding) string
Types ¶
type ColorModel ¶
type ColorModel int
const ( MODEL_RGBA ColorModel = iota MODEL_RGBA64 MODEL_NRGBA MODEL_NRGBA64 MODEL_ALPHA MODEL_ALPHA16 MODEL_GRAY MODEL_GRAY16 MODEL_CMYK )
func Limit ¶
func Limit(img image.Image, model ColorModel) (image.Image, ColorModel)
type ImageEncoding ¶
type ImageEncoding int
const ( ENCODING_PNG ImageEncoding = iota ENCODING_JPEG ENCODING_GIF ENCODING_UNKNOWN )
func ExtensionEncoding ¶
func ExtensionEncoding(ext string) ImageEncoding
Click to show internal directories.
Click to hide internal directories.