RepositoryTypeScriptDEĐức
javierbyte

javierbyte/pintr

Create single line illustrations from your pictures.

843sao
61fork
1issue
0lượt xem

Pintr

Turn your images into plotter-like line drawings, create single line SVG illustrations from your pictures.

All the processing is made locally, your images never leave your computer and you are free to use them as you please.

The platform-neutral, incremental generator is documented in PINTR core. It is currently a local module, not a published package.

pintr

Examples

Plotter Art

Thanks @sableRaph for helping me create those. Using an AxiDraw.

https://user-images.githubusercontent.com/2009676/119021927-4ba5e000-b9a0-11eb-9ad7-1f9e54e823ae.mp4

Animated Example

This is an exported SVG animated using Vivus.

pintr

How does it work?

  1. The image is normalized for brightness and transformed to grayscale. See preparePintrImage. I try to make the lightest zone white, and the darkest black.
  2. A point in the canvas is selected at random and a line starts looking for different paths to draw next. At each step, the pencil draws imaginary lines to different points of the image and asks itself which one of those points would make the drawing look more like the original image, then it picks that one, draws the line and moves the cursor. The amount of imaginary lines is controlled by the "definition" slider. More lines mean more precise (but less terrifying) images. See createPintr and the scan function.
  3. Lines are batched to be drawn and get flushed almost every frame.
  4. Results are exported as svg as a very simple polyline, see generateSvg. PNG export is taken directly from the canvas.

Pixel data and resizing were made using canvas-image-utils.

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryTypeScript
williamngan/pts

A library for visualization and creative-coding

5.4k
Oct 28, 2026
RepositoryJavaScript
lovell/sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.

32.9k
Nov 30, 2026
RepositoryHTML
rough-stuff/rough

Create graphics with a hand-drawn, sketchy, appearance

21.5k
Jul 28, 2024
RepositoryRust
storytold/vectorcraft

VectorCraft: An open-source vector art tool written from scratch in pure Rust

12.2k
Nov 30, 2026
RepositoryJavaScript
tsayen/dom-to-image

Generates an image from a DOM node using HTML5 canvas

10.8k
Apr 8, 2024
RepositoryGo
MariaLetta/free-gophers-pack

✨ This pack of 100+ gopher pictures and elements will help you to build own design of almost anything related to Go Programming Language: presentations, posts in blogs or social media, courses, videos and many, many more.

4.0k
Dec 22, 2024
RepositoryJavaScript
lovasoa/whitebophir

Online collaborative Whiteboard that is simple, free, easy to use and to deploy

2.7k
Nov 30, 2026
RepositoryShell
d3/d3

Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:

114.0k
Nov 23, 2026
RepositoryRust
storytold/photocraft

PhotoCraft: An open-source photo editor written from scratch in pure Rust

82.7k
Dec 2, 2026