canvas alternatives and similar packages
Based on the "Images" category.
Alternatively, view canvas alternatives based on common mentions on social networks and blogs.
Primitive Pictures9.7 0.0 canvas VS Primitive PicturesReproducing images with geometric primitives.
gocv9.3 6.1 canvas VS gocvGo package for computer vision using OpenCV 4 and beyond.
imaging9.1 0.0 canvas VS imagingImaging is a simple image processing package for Go
imaginary9.1 1.0 canvas VS imaginaryFast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
gg8.9 0.0 canvas VS ggGo Graphics - 2D rendering in Go with a simple API.
pigo8.9 0.0 canvas VS pigoFast face detection, pupil/eyes localization and facial landmark points detection library in pure Go.
bild8.8 0.0 canvas VS bildImage processing algorithms in pure Go
resize8.7 0.0 canvas VS resizePure golang image resizing
ln8.7 0.0 canvas VS ln3D line art engine.
bimg8.5 3.0 canvas VS bimgGo package for fast high-level image processing powered by libvips C library
svgo8.3 0.0 canvas VS svgoGo Language Library for SVG generation
gowitness8.3 8.1 canvas VS gowitness🔍 gowitness - a golang, web screenshot utility using Chrome Headless
pt8.2 0.0 canvas VS ptA path tracer written in Go.
picfit8.1 2.7 canvas VS picfitAn image resizing server written in Go
imagick8.1 2.0 canvas VS imagickGo binding to ImageMagick's MagickWand C API
gift8.0 0.0 canvas VS giftGo Image Filtering Toolkit
smartcrop8.0 1.0 canvas VS smartcropsmartcrop finds good image crops for arbitrary crop sizes
go-opencv7.9 0.0 canvas VS go-opencvGo bindings for OpenCV / 2.x API in gocv / 1.x API in opencv
stegify7.6 0.0 canvas VS stegify🔍 Go tool for LSB steganography, capable of hiding any file within an image.
geopattern7.6 0.0 canvas VS geopattern:triangular_ruler: Create beautiful generative image patterns from a string in golang.
govips7.4 4.8 canvas VS govipsA lightning fast image processing and resizing library for Go
image2ascii7.1 2.4 canvas VS image2ascii:foggy: Convert image to ASCII
goimagehash6.8 3.6 canvas VS goimagehashGo Perceptual image hashing package
draft6.6 0.0 canvas VS draftGenerate High Level Cloud Architecture diagrams using YAML syntax.
govatar6.6 1.0 canvas VS govatarAvatar generation library for GO language
mort6.4 6.7 canvas VS mortStorage and image processing server written in Go
Angular 2 Image GalleryImage Gallery built with Angular 15+, node.js and GraphicsMagick
go-nude6.3 0.0 canvas VS go-nudeNudity detection with Go.
darkroom5.5 1.0 canvas VS darkroomAn image proxy with changeable storage backends and image processing engines with focus on speed and resiliency.
mergi5.4 0.0 canvas VS mergigo library for image programming (merge, crop, resize, watermark, animate, ease, transit)
steganography5.3 0.0 canvas VS steganographyPure Golang Library that allows LSB steganography on images using ZERO dependencies
rez5.3 0.0 canvas VS rezImage resizing in pure Go and SIMD
gltf5.3 5.2 canvas VS gltf:eyeglasses: Go library for encoding glTF 2.0 files
go-cairo4.9 0.0 canvas VS go-cairoGo binding for the cairo graphics library
img4.7 0.0 canvas VS imgA selection of image manipulation tools
go-webp4.6 0.0 canvas VS go-webpSimple and fast webp library for golang
cameron4.2 0.0 canvas VS cameronAn avatar generator for Go.
fastimage4.1 0.0 canvas VS fastimageFinds the type and/or size of a remote image given its uri, by fetching as little as needed.
go-gd3.8 0.0 canvas VS go-gdGo bingings for GD (http://www.boutell.com/gd/)
gridder3.7 0.0 canvas VS gridderA Grid based 2D Graphics library
webp-server3.4 0.0 canvas VS webp-serverSimple and minimal image server capable of storing, resizing, converting and caching images.
LookUp3.3 0.0 canvas VS LookUp:mag: Pure Go implementation of fast image search and simple OCR, focused on reading info from screenshots
tga2.9 0.0 canvas VS tgaPackage tga is a TARGA image format decoder/encoder.
goimghdr2.6 0.0 canvas VS goimghdrThe imghdr module determines the type of image contained in a file for go
go-webcolors2.5 0.0 canvas VS go-webcolorsPort of webcolors library from Python to Go
mpo1.5 0.0 canvas VS mpoJPEG-MPO Decoder / Converter Library and CLI Tool
fopix1.0 0.0 canvas VS fopixSimple pixel monospaced font package for golang
scout1.0 0.0 canvas VS scoutScout is a standalone open source software solution for DIY video security.
Access the most powerful time series database as a service
Do you think we are missing an alternative of canvas or a related project?
Canvas is a common vector drawing target that can output SVG, PDF, EPS, raster images (PNG, JPG, GIF, ...), HTML Canvas through WASM, OpenGL, and Gio. It has a wide range of path manipulation functionality such as flattening, stroking and dashing implemented. Additionally, it has a text formatter and embeds and subsets fonts (TTF, OTF, WOFF, WOFF2, or EOT) or converts them to outlines. It can be considered a Cairo or node-canvas alternative in Go. See the example below in Figure 1 for an overview of the functionality.
Figure 1: top-left you can see text being fitted into a box, justified using Donald Knuth's linea breaking algorithm to stretch the spaces between words to fill the whole width. You can observe a variety of styles and text decorations applied, as well as support for LTR/RTL mixing and complex scripts. In the bottom-right the word "stroke" is being stroked and drawn as a path. Top-right we see a LaTeX formula that has been converted to a path. Left of that we see an ellipse showcasing precise dashing, notably the length of e.g. the short dash is equal wherever it is on the curve. Note that the dashes themselves are elliptical arcs as well (thus exactly precise even if magnified greatly). To the right we see a closed polygon of four points being smoothed by cubic Béziers that are smooth along the whole path, and the blue line on the left shows a smoothed open path. On the bottom you can see a rotated rasterized image. The result is equivalent for all renderers (PNG, PDF, SVG, etc.).
Please see https://www.patreon.com/tdewolff for ways to contribute, otherwise please contact me directly!
- Renderers have been moved from
FontFamily.Use()is deprecated, use
FontFamily.SetFeatures()(not yet used)
DPMMis now a function just like
rasterizer.PNGWriter(5.0 * canvas.DPMM)=>
FontFaceis now passed around as a pointer
NewRichTextnow requires a default
*FontFaceto be passed
- Use the
latexbuild tag to use the original LaTeX expression parser
- Renderer writers have been moved from
rasterizer.Newis renamed to
- Path segment types: MoveTo, LineTo, QuadTo, CubeTo, ArcTo, Close
- Precise path flattening, stroking, and dashing for all segment type uing papers (see below)
- Smooth spline generation through points for open and closed paths
- LaTeX to path conversion (native Go and CGO implementations available)
- Font formats support
- - SFNT (such as TTF, OTF, WOFF, WOFF2, EOT) supporting TrueType, CFF, and CFF2 tables
- HarfBuzz for text shaping (native Go and CGO implementations available)
- FriBidi for text bidirectionality (native Go and CGO implementations available)
- Donald Knuth's line breaking algorithm for text layout
- sRGB compliance (use
SRGBColorSpace, only available for rasterizer)
- Font rendering with gamma correction of 1.43 (WIP)
- Rendering targets
- - Raster images (PNG, GIF, JPEG, TIFF, BMP, WEBP)
- - SVG and SVGZ
- - PS and EPS
- - HTMLCanvas
- - OpenGL
- - Gio
- - Fyne (WIP)
- Rendering sources
- - Canvas itself
- - go-chart
- - gonum/plot
Street Map: the centre of Amsterdam is drawn from data loaded from the Open Street Map API.
Mauna-Loa CO2 conentration: using data from the Mauna-Loa observatory, carbon dioxide concentrations over time are drawn
Document: an example of a text document.
OpenGL: an example using the OpenGL backend.
Gio: an example using the Gio backend.
TeX/PGF: an example showing the usage of the PGF (TikZ) LaTeX package as renderer in order to generated a PDF using LaTeX.
go-chart: an example using the go-chart library, plotting a financial graph.
gonum/plot: an example using the gonum/plot library.
PDF: an example using the PDF backend.
- Numerically stable quadratic formula
- Quadratic Bézier length
- Bézier spline through open path
- Bézier spline through closed path
- Point inclusion in polygon test
- M. Walter, A. Fournier, Approximate Arc Length Parametrization, Anais do IX SIBGRAPHI (1996), p. 143--150
- T.F. Hain, et al., Fast, precise flattening of cubic Bézier path and offset curves, Computers & Graphics 29 (2005). p. 656--666
- M. Goldapp, Approximation of circular arcs by cubic polynomials, Computer Aided Geometric Design 8 (1991), p. 227--238
- L. Maisonobe, Drawing and elliptical arc using polylines, quadratic or cubic Bézier curves (2003)
- S.H. Kim and Y.J. Ahn, An approximation of circular arcs by quartic Bezier curves, Computer-Aided Design 39 (2007, p. 490--493)
- D.E. Knuth and M.F. Plass, Breaking Paragraphs into Lines, Software: Practive and Experience 11 (1981), p. 1119--1184
Released under the [MIT license](LICENSE.md).
*Note that all licence references and agreements mentioned in the canvas README section above are relevant to that project's source code only.