dither_go

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePalette

func CreatePalette(colors ...color.Color) []color.Color

CreatePalette creates a palette slice of variable amount of color.RGBA structures.

WARNING: Always create color.RGBA values with CreateRGBA() function to avoid accessing invalid memory addresses.

func CreateRGBA

func CreateRGBA(r uint8, g uint8, b uint8, a uint8) color.RGBA

CreateRGBA creates new color.RGBA structure with provided (r,g,b,a) color channels.

NOTE: Argument types are set to unint8, values higher than 255 will result in 'Out of range' errors.

func OpenImage

func OpenImage(path string) (image.Image, error)

OpenImage opens image file and decodes its contents using image.Decode function.

func SaveImage

func SaveImage(img_data image.Image, output_path string, encode_format string) error

SaveImage saves provided image data in specified output path and encodes it to the supported format.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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