Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Extension is the extension for Extension image files. Extension = ".bi" // MagicNumber is the magic number at the start of BI files. MagicNumber = "bi" )
Variables ¶
This section is empty.
Functions ¶
func DecodeConfig ¶
DecodeConfig decodes the Model and dimensions of a BI image from Reader r.
func Encode ¶
Encode encodes the Image m to the Writer w in BI format using the Model mod. This is usually a very lossy process.
func RegisterModel ¶ added in v1.2.0
func RegisterModel(mod Model)
RegisterModel registers a Model for use by Decode.
Types ¶
type Model ¶ added in v1.1.0
type Model interface { ID() string color.Model ColorToName(c color.Color) string NameToColor(name string) (c color.Color, ok bool) }
Model can convert any Color to one from its own color model, and can convert a color to the name of the color, and can convert from a name of a color to the color.
var Hex Model = hex{}
Hex is a Model for hex quadruplet color codes in the format #FF69B4FF, including alpha.
var Standard Model = standard{}
Standard is a Model for CSS Color Module Level 4.
Click to show internal directories.
Click to hide internal directories.