Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajstarks/gift
Command line interface to the Go Image Filtering toolkit
https://github.com/ajstarks/gift
go golang image image-manipulation image-processing
Last synced: 3 months ago
JSON representation
Command line interface to the Go Image Filtering toolkit
- Host: GitHub
- URL: https://github.com/ajstarks/gift
- Owner: ajstarks
- Created: 2014-07-26T13:33:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T15:58:33.000Z (11 months ago)
- Last Synced: 2024-06-19T05:41:14.173Z (7 months ago)
- Topics: go, golang, image, image-manipulation, image-processing
- Language: Go
- Size: 1.09 MB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gift
====Command line interface to the [Go Image Filtering Toolkit](https://github.com/disintegration/gift)
Install
===go get github.com/ajstarks/gift
Usage
===gift reads either from a single file (PNG or JPEG) or standard input and always writes to standard output:
gift -contrast 80 foo.jpg > contrast.jpg
gift -flipv < foo.png > flipped.png
Filters can be combined. For example to blur and invert:gift -invert -blur 4 foo.jpg > inverted-blurred.jpg
Here are the command flags:
```
-blur float
blur value
-brightness float
brightness value (-100, 100) (default -200)
-colorbalance string
color balance (%red, %green, %blue)
-colorize string
colorize (hue, saturation, percentage)
-contrast float
contrast value (-100, 100) (default -200)
-crop string
crop x1,y1,x2,y2
-cropsize string
crop w h
-edge
edge filter
-emboss
emboss
-fliph
flip horizontal
-flipv
flip vertical
-gamma float
gamma value
-gray
grayscale
-hue float
hue value (-180, 180) (default -200)
-invert
invert
-max int
local maximum (kernel size)
-mean int
local mean filter (kernel size)
-median int
local median filter (kernel size)
-min int
local minimum (kernel size)
-opacity float
opacity (alpha) (0-100)
-pixelate int
pixelate
-resize string
resize w,h
-resizefill string
resizefill w,h
-resizefit string
resizefit w,h
-rotate int
rotate specified degrees counter-clockwise
-saturation float
saturation value (-100, 500) (default -200)
-sepia float
sepia percentage (0-100) (default -1)
-sigmoid string
sigmoid contrast (midpoint,factor)
-sobel
sobel filter
-threshold float
color threshold percentage (0-100) (default -1)
-transpose
flip horizontally and rotate 90° counter-clockwise
-transverse
flips vertically and rotate 90° counter-clockwise
-unsharp string
unsharp mask (sigma,amount,threshold)
```See testgift.sh for typical usage
Performance
===Processing a 3264x2448 JPEG image on a Lenovo X1 Carbon 5th Generation, i5-6200U CPU @ 2.30GHz, Linux 5.13.5
![perf-table](perf3264x2448.png)