Documentation
¶
Overview ¶
Image Library for Go
Ilib is a library (and some tools and examples) written in Go that can read, create, manipulate and save images. It is capable of using X11 BDF fonts for drawing text. That means you get lots of fonts to use. You can even create your own if you know how to create an X11 BDF font. It should be able to read any image file that the base Go image package supports. Copyright (C) 2001-2022 Craig Knudsen, craig@k5n.us http://github.com/craigk5n/ilibgo
Index ¶
- Constants
- func CopyImage(source *Image, dest *Image, gc GraphicsContext, srcX int, srcY int, width int, ...) errordeprecated
- func CopyImageScaled(source *Image, dest *Image, srcX int, srcY int, srcWidth int, srcHeight int, ...) errordeprecated
- func DrawArc(img *Image, gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, ...) errordeprecated
- func DrawCircle(img *Image, gc GraphicsContext, x int, y int, r int) errordeprecated
- func DrawEllipse(img *Image, gc GraphicsContext, x int, y int, r1 int, r2 int) errordeprecated
- func DrawEnclosedArc(img *Image, gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, ...) errordeprecated
- func DrawLine(img *Image, gc GraphicsContext, x1 int, y1 int, x2 int, y2 int) errordeprecated
- func DrawPoint(img *Image, gc GraphicsContext, x int, y int) errordeprecated
- func DrawPolygon(img *Image, gc GraphicsContext, points []Point) errordeprecated
- func DrawRectangle(img *Image, gc GraphicsContext, x int, y int, width int, height int) errordeprecated
- func DrawString(img *Image, gc GraphicsContext, x int, y int, text string)deprecated
- func DrawStringRotated(img *Image, gc GraphicsContext, x int, y int, text string, ...)deprecated
- func DrawStringRotatedAngle(img *Image, gc GraphicsContext, x int, y int, text string, angle float64)deprecated
- func Encode(w io.Writer, img *Image, format ImageFormat) error
- func FillArc(img *Image, gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, ...) errordeprecated
- func FillCircle(img *Image, gc GraphicsContext, x int, y int, r int) errordeprecated
- func FillPolygon(img *Image, gc GraphicsContext, points []Point) errordeprecated
- func FillRectangle(img *Image, gc GraphicsContext, x int, y int, width int, height int) errordeprecated
- func FloodFill(img *Image, gc GraphicsContext, x int, y int) errordeprecated
- func GetFontSize(font *Font) (height int, err error)
- func IDrawArc(img *Image, gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, ...) errordeprecated
- func IDrawCircle(img *Image, gc GraphicsContext, x int, y int, r int) errordeprecated
- func IDrawEllipse(img *Image, gc GraphicsContext, x int, y int, r1 int, r2 int) errordeprecated
- func IDrawEnclosedArc(img *Image, gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, ...) errordeprecated
- func IFillArc(img *Image, gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, ...) errordeprecated
- func IFillCircle(img *Image, gc GraphicsContext, x int, y int, r int) errordeprecated
- func ImageHeight(img *Image) int
- func ImageWidth(img *Image) int
- func IsSupportedFormat(stringFormat string) bool
- func SaveImageFile(path string, img *Image, format ImageFormat) error
- func SetBackground(gc *GraphicsContext, backgroundColor Color)
- func SetFont(gc *GraphicsContext, font *Font)
- func SetForeground(gc *GraphicsContext, foregroundColor Color)
- func SetLineStyle(gc *GraphicsContext, lineStyle LineStyle)
- func SetLineWidth(gc *GraphicsContext, lineWidth int)
- func SetPoint(img *Image, gc GraphicsContext, x int, y int) errordeprecated
- func SetTextStyle(gc *GraphicsContext, textStyle TextStyle)
- func TextDimensions(gc GraphicsContext, font *Font, text string) (width int, height int, err error)
- func TextHeight(gc GraphicsContext, font *Font, text string) (height int, err error)
- func TextWidth(gc GraphicsContext, font *Font, text string) (width int, err error)
- func WriteImageFile(f io.Writer, img *Image, format ImageFormat) error
- type BdfChar
- type BdfFont
- type Color
- type FillStyle
- type Font
- func LoadFontFromBytes(name string, data []byte) (*Font, error)
- func LoadFontFromData(name string, lines []string) (*Font, error)
- func LoadFontFromFile(path string, name string) (*Font, error)
- func LoadTrueTypeFromBytes(data []byte, name string, points float64, dpi float64) (*Font, error)
- func LoadTrueTypeFromFile(path string, name string, points float64, dpi float64) (*Font, error)
- func (f *Font) Ascent() int
- func (f *Font) Descent() int
- func (f *Font) FaceName() string
- func (f *Font) Family() string
- func (f *Font) Foundry() string
- func (f *Font) GlyphCount() int
- func (f *Font) IsTrueType() bool
- func (f *Font) Name() string
- func (f *Font) PixelSize() int
- func (f *Font) Proportional() bool
- func (f *Font) Slant() string
- func (f *Font) Weight() string
- type GraphicsContext
- type Image
- func (img *Image) At(x int, y int) color.Color
- func (img *Image) Bounds() image.Rectangle
- func (img *Image) ColorModel() color.Model
- func (dest *Image) CopyImage(source *Image, gc GraphicsContext, srcX int, srcY int, width int, height int, ...) error
- func (dest *Image) CopyImageScaled(source *Image, srcX int, srcY int, srcWidth int, srcHeight int, destX int, ...) error
- func (dest *Image) CopyImageScaledQuality(source *Image, srcX int, srcY int, srcWidth int, srcHeight int, destX int, ...) error
- func (image *Image) DrawArc(gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, a2 float64) error
- func (image *Image) DrawCircle(gc GraphicsContext, x int, y int, r int) error
- func (image *Image) DrawEllipse(gc GraphicsContext, x int, y int, r1 int, r2 int) error
- func (image *Image) DrawEnclosedArc(gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, a2 float64) error
- func (image *Image) DrawLine(gc GraphicsContext, x1 int, y1 int, x2 int, y2 int) error
- func (image *Image) DrawPoint(gc GraphicsContext, x int, y int) error
- func (image *Image) DrawPolygon(gc GraphicsContext, points []Point) error
- func (image *Image) DrawRectangle(gc GraphicsContext, x int, y int, width int, height int) error
- func (image *Image) DrawString(gc GraphicsContext, x int, y int, text string)
- func (image *Image) DrawStringRotated(gc GraphicsContext, x int, y int, text string, direction TextDirection)
- func (image *Image) DrawStringRotatedAngle(gc GraphicsContext, x int, y int, text string, angle float64)
- func (image *Image) FillArc(gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, a2 float64) error
- func (image *Image) FillCircle(gc GraphicsContext, x int, y int, r int) error
- func (image *Image) FillPolygon(gc GraphicsContext, points []Point) error
- func (img *Image) FillRectangle(gc GraphicsContext, x int, y int, width int, height int) error
- func (image *Image) FloodFill(gc GraphicsContext, x int, y int) error
- func (image *Image) GetPoint(x int, y int) Color
- func (img *Image) Set(x int, y int, c color.Color)
- func (image *Image) SetPoint(gc GraphicsContext, x int, y int) error
- type ImageFormat
- type ImageOption
- type LineStyle
- type Point
- type ScaleQuality
- type TextDirection
- type TextStyle
Examples ¶
Constants ¶
const ( DefaultFormatString = "ppm" IlibVersion = "2.0" IlibVersionDate = "11 Aug 2022" FormatGIF ImageFormat = 0 FormatPPM ImageFormat = 1 FormatPGM ImageFormat = 2 FormatPBM ImageFormat = 3 FormatXPM ImageFormat = 4 FormatXBM ImageFormat = 5 FormatPNG ImageFormat = 6 FormatJPEG ImageFormat = 7 FormatTIFF ImageFormat = 8 FormatBMP ImageFormat = 9 NumberOfFormats uint = 10 )
const BlackPixel int = 0
Default color values
const WhitePixel int = 1
Variables ¶
This section is empty.
Functions ¶
func DrawCircle
deprecated
func DrawEllipse
deprecated
func DrawEnclosedArc
deprecated
func DrawPolygon
deprecated
func DrawPolygon(img *Image, gc GraphicsContext, points []Point) error
Deprecated: use (*Image).DrawPolygon.
func DrawRectangle
deprecated
func DrawString
deprecated
func DrawString(img *Image, gc GraphicsContext, x int, y int, text string)
Deprecated: use (*Image).DrawString.
func DrawStringRotated
deprecated
func DrawStringRotated(img *Image, gc GraphicsContext, x int, y int, text string, direction TextDirection)
Deprecated: use (*Image).DrawStringRotated.
func DrawStringRotatedAngle
deprecated
func Encode ¶
func Encode(w io.Writer, img *Image, format ImageFormat) error
Encode writes img to w in the given format. It is the streaming core of the package's output path: w may be any io.Writer (a file, bytes.Buffer, HTTP response, gzip stream, etc.). The caller owns w and is responsible for closing it.
Example ¶
Encode an image to any io.Writer. A PNG begins with an 8-byte signature.
package main
import (
"bytes"
"fmt"
"github.com/craigk5n/ilibgo"
)
func main() {
white, _ := ilibgo.AllocNamedColor("white")
img := ilibgo.CreateImageWithBackground(16, 16, white)
var buf bytes.Buffer
if err := ilibgo.Encode(&buf, img, ilibgo.FormatPNG); err != nil {
panic(err)
}
fmt.Printf("%x\n", buf.Bytes()[:8])
}
Output: 89504e470d0a1a0a
func FillCircle
deprecated
func FillPolygon
deprecated
func FillPolygon(img *Image, gc GraphicsContext, points []Point) error
Deprecated: use (*Image).FillPolygon.
func FillRectangle
deprecated
func GetFontSize ¶
func IDrawCircle
deprecated
func IDrawEllipse
deprecated
func IDrawEnclosedArc
deprecated
func IFillCircle
deprecated
func ImageHeight ¶
func ImageWidth ¶
func IsSupportedFormat ¶
Check to see if the specified image format (as represented as the file suffix like "png") is supported. Some image formats
func SaveImageFile ¶
func SaveImageFile(path string, img *Image, format ImageFormat) error
SaveImageFile encodes img to the file at path, creating or truncating it. It is a convenience wrapper that opens the file, encodes, and closes it, joining any encode and close errors so a failed flush is not lost.
func SetBackground ¶
func SetBackground(gc *GraphicsContext, backgroundColor Color)
func SetFont ¶
func SetFont(gc *GraphicsContext, font *Font)
func SetForeground ¶
func SetForeground(gc *GraphicsContext, foregroundColor Color)
func SetLineStyle ¶
func SetLineStyle(gc *GraphicsContext, lineStyle LineStyle)
func SetLineWidth ¶
func SetLineWidth(gc *GraphicsContext, lineWidth int)
func SetTextStyle ¶
func SetTextStyle(gc *GraphicsContext, textStyle TextStyle)
func TextDimensions ¶
func TextHeight ¶
func TextHeight(gc GraphicsContext, font *Font, text string) (height int, err error)
Get the height (in pixels) of the specified text using the font currently set in the graphics context.
func TextWidth ¶
func TextWidth(gc GraphicsContext, font *Font, text string) (width int, err error)
Get the width (in pixels) of the specified text using the font currently set in the graphics context.
func WriteImageFile ¶
func WriteImageFile(f io.Writer, img *Image, format ImageFormat) error
WriteImageFile writes an image to an already-open file (or any io.Writer). The writer is left open for the caller to close. It is a thin wrapper over Encode.
Types ¶
type BdfChar ¶
type BdfChar struct {
// contains filtered or unexported fields
}
func FontBDFGetChar ¶
Get the BdfChar value for the specified letter. Note: Only tested on ASCII with English so far.
func FontBDFGetRune ¶
Get the BdfChar value for the specified letter. Note: Only tested on ASCII with English so far.
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
func AllocColor ¶
Allocate a color (with no alpha) from RGB values 0-255.
func AllocNamedColor ¶
Allocate a color (with no alpha) by its name (e.g. "red", "blue", etc)
Example ¶
Look up a color by its X11 name.
package main
import (
"fmt"
"github.com/craigk5n/ilibgo"
)
func main() {
red, err := ilibgo.AllocNamedColor("red")
if err != nil {
panic(err)
}
r, g, b, a := red.RGBA()
fmt.Println(r>>8, g>>8, b>>8, a>>8)
}
Output: 255 0 0 255
func NewColor ¶
NewColor constructs a Color from 8-bit red, green, blue and alpha values. Use this when you need control over alpha; AllocColor is the opaque shortcut.
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
Font is a loaded font. It is backed either by a bitmap BDF font (font != nil) or by a scalable TrueType/OpenType face at a fixed size (face != nil).
func LoadFontFromBytes ¶
LoadFontFromBytes parses a BDF font from its raw bytes, for example a file embedded with go:embed. It splits the data into lines (handling both "\n" and "\r\n") and delegates to LoadFontFromData.
func LoadFontFromData ¶
Parse the array of string lines that represent the BDF font. Example usage: LoadFontFromData("timR12", font_timR12)
func LoadFontFromFile ¶
Parse a BFF font file. Example usage: LoadFontFromFile("timR12.bdf", "timR12")
func LoadTrueTypeFromBytes ¶
LoadTrueTypeFromBytes parses a TrueType or OpenType font from raw bytes and builds a Font rasterized at the given point size and resolution. Because TrueType is scalable, the size is baked into the returned Font; load again at a different size to change it. A dpi of 0 defaults to 72 (so points == pixels).
Unlike BDF fonts, a TrueType font renders anti-aliased. It supports the etched/shadowed text styles and arbitrary-angle rotation via DrawStringRotatedAngle (the glyphs are rasterized horizontally and then affine-transformed).
func LoadTrueTypeFromFile ¶
LoadTrueTypeFromFile loads a TrueType/OpenType font file (see LoadTrueTypeFromBytes).
func (*Font) Ascent ¶
Ascent returns the font ascent in pixels. For TrueType fonts this is derived from the rasterized face height.
func (*Font) GlyphCount ¶
GlyphCount returns the number of defined glyphs (ASCII/Latin-1 plus any extra named glyphs). Zero for TrueType fonts.
func (*Font) IsTrueType ¶
IsTrueType reports whether the font is backed by a scalable TrueType/OpenType face rather than a bitmap BDF font.
func (*Font) Proportional ¶
Proportional reports whether the BDF font uses proportional (vs fixed) spacing. False for TrueType fonts.
type GraphicsContext ¶
type GraphicsContext struct {
// contains filtered or unexported fields
}
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func CreateImage ¶
func CreateImageWithBackground ¶
Example ¶
Create a blank canvas with a solid background color.
package main
import (
"fmt"
"github.com/craigk5n/ilibgo"
)
func main() {
white, _ := ilibgo.AllocNamedColor("white")
img := ilibgo.CreateImageWithBackground(320, 240, white)
fmt.Printf("%dx%d\n", ilibgo.ImageWidth(img), ilibgo.ImageHeight(img))
}
Output: 320x240
func Decode ¶
Decode reads an image from r (any io.Reader) and returns it as an *Image. The format is detected automatically from the stream contents via the registered image decoders. The caller owns r.
func LoadImageFile ¶
LoadImageFile opens the image file at path, decodes it, and closes the file.
func ReadImageFile ¶
ReadImageFile creates an image from an already-open file (or any io.Reader). The reader is left open for the caller to close. It is a thin wrapper over Decode.
func (*Image) ColorModel ¶
ColorModel returns the image's color model (color.RGBAModel).
func (*Image) CopyImage ¶
func (dest *Image) CopyImage(source *Image, gc GraphicsContext, srcX int, srcY int, width int, height int, destX int, destY int) error
CopyImage copies a rectangular region of source onto this (destination) image. The gc parameter is retained for API compatibility but is unused; the copy is a straight pixel transfer clipped to both images' bounds.
func (*Image) CopyImageScaled ¶
func (dest *Image) CopyImageScaled(source *Image, srcX int, srcY int, srcWidth int, srcHeight int, destX int, destY int, destWidth int, destHeight int) error
CopyImageScaled scales a region of source onto this (destination) image using nearest-neighbor sampling. For smoother results, use CopyImageScaledQuality.
func (*Image) CopyImageScaledQuality ¶
func (dest *Image) CopyImageScaledQuality(source *Image, srcX int, srcY int, srcWidth int, srcHeight int, destX int, destY int, destWidth int, destHeight int, quality ScaleQuality) error
CopyImageScaledQuality scales a region of source onto this (destination) image using the chosen resampling filter, delegating to golang.org/x/image/draw. Unlike CopyImageScaled (nearest-neighbor only), it can produce smooth, anti-aliased results. The destination region is overwritten (no alpha blending).
func (*Image) DrawArc ¶
func (image *Image) DrawArc(gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, a2 float64) error
Draw an arc. Both arc1 and arc2 are in degrees from 0 to 360.
func (*Image) DrawCircle ¶
DrawCircle draws the outline of a circle.
func (*Image) DrawEllipse ¶
DrawEllipse draws the outline of an ellipse with radii r1 and r2.
func (*Image) DrawEnclosedArc ¶
func (image *Image) DrawEnclosedArc(gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, a2 float64) error
Draw an arc and connect it to the center point.
func (*Image) DrawPoint ¶
func (image *Image) DrawPoint(gc GraphicsContext, x int, y int) error
DrawPoint sets the point at (x, y) using the graphics context's foreground color. (Alias for SetPoint.)
func (*Image) DrawPolygon ¶
func (image *Image) DrawPolygon(gc GraphicsContext, points []Point) error
func (*Image) DrawRectangle ¶
DrawRectangle draws the outline of a rectangle.
func (*Image) DrawString ¶
func (image *Image) DrawString(gc GraphicsContext, x int, y int, text string)
Example ¶
Render text with a bundled X11 BDF font. The font is loaded from the embedded accessor, set on the GraphicsContext, then drawn.
package main
import (
"fmt"
"github.com/craigk5n/ilibgo"
font "github.com/craigk5n/ilibgo/fonts/adobe_100dpi"
)
func main() {
white, _ := ilibgo.AllocNamedColor("white")
black, _ := ilibgo.AllocNamedColor("black")
img := ilibgo.CreateImageWithBackground(200, 40, white)
f, err := ilibgo.LoadFontFromData("helvB12", font.Font_helvB12())
if err != nil {
panic(err)
}
gc := ilibgo.CreateGraphicsContext()
ilibgo.SetForeground(&gc, black)
ilibgo.SetFont(&gc, f)
img.DrawString(gc, 10, 25, "Hello, ilibgo")
w, _ := ilibgo.TextWidth(gc, f, "Hello, ilibgo")
fmt.Println(w > 0)
}
Output: true
func (*Image) DrawStringRotated ¶
func (image *Image) DrawStringRotated(gc GraphicsContext, x int, y int, text string, direction TextDirection)
func (*Image) DrawStringRotatedAngle ¶
func (*Image) FillArc ¶
func (image *Image) FillArc(gc GraphicsContext, x int, y int, r1 int, r2 int, a1 float64, a2 float64) error
Fill an arc
func (*Image) FillCircle ¶
FillCircle draws a filled circle.
func (*Image) FillPolygon ¶
func (image *Image) FillPolygon(gc GraphicsContext, points []Point) error
Fill a polygonn
func (*Image) FillRectangle ¶
FillRectangle draws a filled rectangle. The rectangle is clipped to the image bounds, so off-image or negative coordinates are handled safely.
Example ¶
Fill a rectangle using the method-style drawing API. The GraphicsContext carries the foreground color; pass it to the draw method.
package main
import (
"fmt"
"github.com/craigk5n/ilibgo"
)
func main() {
white, _ := ilibgo.AllocNamedColor("white")
blue, _ := ilibgo.AllocNamedColor("blue")
img := ilibgo.CreateImageWithBackground(100, 100, white)
gc := ilibgo.CreateGraphicsContext()
ilibgo.SetForeground(&gc, blue)
if err := img.FillRectangle(gc, 10, 10, 50, 40); err != nil {
panic(err)
}
// The pixel at (30, 30) lies inside the filled rectangle.
r, g, b, _ := img.GetPoint(30, 30).RGBA()
fmt.Println(r>>8, g>>8, b>>8)
}
Output: 0 0 255
func (*Image) FloodFill ¶
func (image *Image) FloodFill(gc GraphicsContext, x int, y int) error
FloodFill replaces the contiguous region of pixels matching the color at (x, y) with the graphics context's foreground color. It uses an explicit scanline stack rather than recursion so that large regions cannot overflow the goroutine stack.
type ImageFormat ¶
type ImageFormat uint8
func FileType ¶
func FileType(filename string) (ImageFormat, error)
func FormatStringToType ¶
func FormatStringToType(formatString string) (ImageFormat, error)
Convert a string representation of an image format (typically the file extension like "png"), and convert it to the corresponding IImageFormat type. An error is returned if the type is not recognized or not supported.
type ImageOption ¶
type ImageOption uint8
const ( OptionNone ImageOption = 0 OptionGrayscale ImageOption = 1 OptionGreyscale ImageOption = OptionGrayscale OptionAscii ImageOption = 2 // ascii output for pbm/pgm/ppm images OptionInterlaced ImageOption = 4 // interlaced output (GIF) )
type Point ¶
Point is an (X, Y) coordinate. Its fields are exported so callers can construct points directly (e.g. for DrawPolygon/FillPolygon), either with a struct literal (Point{X: 1, Y: 2}) or the Pt helper.
type ScaleQuality ¶
type ScaleQuality int
ScaleQuality selects the resampling filter used by CopyImageScaledQuality. Higher-quality filters are smoother but slower; nearest-neighbor is fastest and blockiest.
const ( // ScaleNearestNeighbor picks the closest source pixel. Fastest and // blockiest; matches the behavior of CopyImageScaled. ScaleNearestNeighbor ScaleQuality = iota // ScaleApproxBiLinear is a fast bilinear approximation — a good default // for thumbnails. ScaleApproxBiLinear // ScaleBiLinear is full bilinear interpolation (smoother than the // approximate variant). ScaleBiLinear // ScaleCatmullRom is a high-quality bicubic filter; best for downscaling // photographs where sharpness matters. ScaleCatmullRom )
type TextDirection ¶
type TextDirection int
const ( TextLeftToRight TextDirection = 1 // default TextBottomToTop TextDirection = 2 TextTopToBottom TextDirection = 3 )
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
barcode renders a Code 39 barcode for the given text.
|
barcode renders a Code 39 barcode for the given text. |
|
bdfinfo prints the metadata of an X11 BDF bitmap font: foundry, family, face name, slant, weight, spacing, pixel size, ascent/descent, and the number of defined glyphs.
|
bdfinfo prints the metadata of an X11 BDF bitmap font: foundry, family, face name, slant, weight, spacing, pixel size, ascent/descent, and the number of defined glyphs. |
|
Create an go file from a BDF font file so that the BDF font can be bundled with the Go file.
|
Create an go file from a BDF font file so that the BDF font can be bundled with the Go file. |
|
captcha generates a distorted-text CAPTCHA image and prints the text it encodes.
|
captcha generates a distorted-text CAPTCHA image and prints the text it encodes. |
|
chart renders a simple bar chart to a PNG image.
|
chart renders a simple bar chart to a PNG image. |
|
Create a PNG file that displays the font for ASCII values up to 255.
|
Create a PNG file that displays the font for ASCII values up to 255. |
|
fonts
|
|
|
fontsheet renders a specimen catalog of the bundled BDF fonts: a sample line drawn in each font, stacked and labeled.
|
fontsheet renders a specimen catalog of the bundled BDF fonts: a sample line drawn in each font, stacked and labeled. |
|
iconvert converts an image from one format to another.
|
iconvert converts an image from one format to another. |
|
iresize scales an image to a new size using a selectable resampling filter.
|
iresize scales an image to a new size using a selectable resampling filter. |
|
mandelbrot renders the Mandelbrot set to an image, coloring each pixel by how quickly it escapes.
|
mandelbrot renders the Mandelbrot set to an image, coloring each pixel by how quickly it escapes. |
|
montage composes several images into a single labeled grid, scaling each to fit its cell while preserving aspect ratio.
|
montage composes several images into a single labeled grid, scaling each to fit its cell while preserving aspect ratio. |
|
Package qr is a small, dependency-free QR Code encoder.
|
Package qr is a small, dependency-free QR Code encoder. |
|
qrgen renders a QR code to a PNG image.
|
qrgen renders a QR code to a PNG image. |
|
Sample app for ilibgo package.
|
Sample app for ilibgo package. |
|
sparkline renders a small inline trend graph (a "sparkline") from a list of numbers to a PNG.
|
sparkline renders a small inline trend graph (a "sparkline") from a list of numbers to a PNG. |
|
Build an image that contains an index of a bunch of images.
|
Build an image that contains an index of a bunch of images. |
|
truetype renders text using a scalable, anti-aliased TrueType/OpenType font.
|
truetype renders text using a scalable, anti-aliased TrueType/OpenType font. |
|
watermark overlays a tiled, semi-transparent text watermark onto an image.
|
watermark overlays a tiled, semi-transparent text watermark onto an image. |
|
Report generator for apache2 access.log file
|
Report generator for apache2 access.log file |





