Skip to content
Image server toolkit in Go
Branch: master
Clone or download
Latest commit 05bccbf Aug 28, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cache fix lint Aug 27, 2018
examples tweak gometalinter Oct 21, 2017
graphicsmagick tweak gometalinter Oct 21, 2017
http tweak gometalinter Oct 21, 2017
image fix lint Aug 27, 2018
source source/file: fix separator (on Windows) Jan 8, 2017
testdata add rules / sucks gamma image Jun 6, 2017
.gitignore add makefile Dec 11, 2016
.travis.yml upgrade to Go 1.11 Aug 27, 2018
LICENSE small update Mar 1, 2015
Makefile fix lint Aug 27, 2018
README.md remove test coverage (I don't care anymore) Jun 27, 2017
handler.go update documentation Apr 21, 2016
handler_test.go fix errcheck May 26, 2016
image.go replace `ImageEqual()` by `compare.Compare()` Jun 27, 2017
image_benchmark_test.go use sub test + Go 1.7 Aug 16, 2016
image_test.go
params.go add support for int64 param Dec 11, 2016
params_benchmark_test.go use classic benchmark instead of parallel Jan 13, 2016
params_test.go replace `reflect.DeepEqual()` by `compare.Compare()` Jun 27, 2017
server.go create "source" package and move "httpsource" package to "source/http" Jun 5, 2016
server_test.go create "source" package and move "httpsource" package to "source/http" Jun 5, 2016

README.md

Image Server

An image server toolkit in Go (Golang)

GoDoc Build Status Go Report Card

Features

Examples

Demos

These demos use the "advanced" example.

Click the images to see the URL parameters.

Resize

Options Result
width=200
(preserve aspect ratio)
height=200
(preserve aspect ratio)
width=200&height=200
(change aspect ratio)
width=200&height=200&mode=fit
(fit in 200x200)
width=200&height=200&mode=fill
(fill 200x200 and crop)

Rotate

Options Result
rotation=90
(counterclockwise)
rotation=45&background=ffaa88
(background)

Crop

Format: min_x,min_y|max_x,max_y

Options Result
crop=556,111|2156,1711
crop=956,511|1756,1311
crop=1252,799|1460,1022

Animated GIF

Original Resized
Animated
Spaceship

Gamma correction (more info)

Original Disabled Enabled
Dalai Gamma
Gray squares
Random
Rings
Rules / sucks

Resampling

Resampling Rings Large
Nearest neighbor
Box
Linear
Cubic
Lanczos

Quality

JPEG quality Result
5%
10%
50%

Convert (JPEG to GIF)

Backward compatibility

There is no backward compatibility promises. If you want to use it, vendor it. It's always OK to change things to make things better. The API is not 100% correct in the first commit.

You can’t perform that action at this time.