Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
denisbrodbeck committed Nov 24, 2017
1 parent 1d94cf6 commit 5911487
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
19 changes: 18 additions & 1 deletion cmd/sqip/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
package main
// Package main provides the command line app for SVG-based LQIP image creation.
//
// Usage: sqip [-n <int>] [-o <path>] [options...] <file>
// Flags:
// -n <int> number of primitive SVG shapes (default: 8)
// -o <path> save the placeholder SVG to a file (default: empty)
// Options:
// -mode <int> shape type (default: 0)
// -alpha <int> color alpha (use 0 to let the algorithm choose alpha for each shape) (default: 128)
// -bg <hex> background color as hex (default: avg)
//
// If no output path is provided, an example <img> tag will be printed to stdout.
// Available shape types: 0=combo 1=triangle 2=rect 3=ellipse 4=circle 5=rotatedrect 6=beziers 7=rotatedellipse 8=polygon
//
// Try:
// sqip -n 12 path/to/image.jpg
// sqip -mode 8 -o ./image.svg path/to/image.jpg
package main // import "github.com/denisbrodbeck/sqip/cmd/sqip"

import (
"flag"
Expand Down
6 changes: 5 additions & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
//
// https://godoc.org/github.com/denisbrodbeck/sqip/cmd/sqip
//
// TODO
// This package is a go implementation of Tobias Baldauf‘s SVG-based LQIP technique
// (see https://github.com/technopagan/sqip).
//
// SQIP is an evolution of the classic LQIP technique: it makes use of Primitive to generate a SVG consisting of several simple shapes that approximate the main features visible inside the image, optimizes the SVG using minify and adds a Gaussian Blur filter to it.
// This produces a SVG placeholder which weighs in at only ~800-1000 bytes, looks smooth on all screens and provides an visual cue of image contents to come.
package sqip // import "github.com/denisbrodbeck/sqip"

0 comments on commit 5911487

Please sign in to comment.