Documentation ¶
Overview ¶
Example (Hexify) ¶
fmt.Println(hexify([]byte{0, 7, 0x80, 0xff}))
Output: [0x00 0x07 0x80 0xff]
Index ¶
Examples ¶
Constants ¶
View Source
const ( // VersionString contains the current package name and version VersionString = "xpm 1.3.0" // AllowedLetters is the 93 available ASCII letters // ref: https://en.wikipedia.org/wiki/X_PixMap // They are in the same order as GIMP, but with the question mark character as // well. Double question marks may result in trigraphs in C, but this is // avoided by checking specifically for this. // ref: https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C AllowedLetters = " .+@#$%&*=-;>,')!~{]^/(_:<[}|1234567890" + azAZ + "`?" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Encoder ¶
type Encoder struct { // The internal image name ImageName string // With comments? Comments bool // The alpha threshold AlphaThreshold float64 // These are used when encoding the color ID as ASCII AllowedLetters []rune // MaxColors is the maximum allowed number of colors, or -1 for no limit. The default is 256. MaxColors int }
Encoder contains encoding configuration that is used by the Encode method
func NewEncoder ¶ added in v1.2.0
NewEncoder creates a new Encoder configuration struct
Click to show internal directories.
Click to hide internal directories.