Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
denisbrodbeck committed Dec 18, 2017
1 parent 4fa8ecc commit db12571
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 32 deletions.
53 changes: 32 additions & 21 deletions cmd/sqip/main.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
// 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)
// -help <bool> show this help and exit
// -version <bool> show app version and exit
// 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 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)
-help <bool> show this help and exit
-version <bool> show app version and exit
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 (
Expand Down
23 changes: 12 additions & 11 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Package sqip allows SVG-based LQIP image creation
//
// https://github.com/denisbrodbeck/sqip
//
// https://godoc.org/github.com/denisbrodbeck/sqip/cmd/sqip
//
// 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 allows SVG-based LQIP image creation
https://github.com/denisbrodbeck/sqip
https://godoc.org/github.com/denisbrodbeck/sqip/cmd/sqip
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 db12571

Please sign in to comment.