https://github.com/pierrre/imageserver
Image server toolkit in Go
https://github.com/pierrre/imageserver
golang image server toolkit
Last synced: 22 days ago
JSON representation
Image server toolkit in Go
- Host: GitHub
- URL: https://github.com/pierrre/imageserver
- Owner: pierrre
- License: mit
- Created: 2013-04-09T19:30:48.000Z (about 12 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T12:17:22.000Z (12 months ago)
- Last Synced: 2024-04-19T13:36:41.451Z (12 months ago)
- Topics: golang, image, server, toolkit
- Language: Go
- Homepage:
- Size: 15.7 MB
- Stars: 2,034
- Watchers: 71
- Forks: 199
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - pierrre/imageserver - Image server toolkit in Go (Go)
README
# Image Server
An image server toolkit in Go (Golang)[](https://godoc.org/github.com/pierrre/imageserver)
[](https://travis-ci.org/pierrre/imageserver)
[](https://goreportcard.com/report/github.com/pierrre/imageserver):warning: This repository is not maintained anymore.
## Features
- HTTP server
- Resize ([GIFT](https://github.com/disintegration/gift), [nfnt resize](https://github.com/nfnt/resize), [Graphicsmagick](http://www.graphicsmagick.org/))
- Rotate
- Crop
- Convert (JPEG, GIF (animated), PNG , BMP, TIFF, ...)
- Cache ([groupcache](https://github.com/golang/groupcache), [Redis](https://github.com/garyburd/redigo), [Memcache](https://github.com/bradfitz/gomemcache), in memory)
- Gamma correction
- Fully modular## Examples
- [Simple](https://github.com/pierrre/imageserver/blob/master/examples/simple/simple.go)
- [Advanced](https://github.com/pierrre/imageserver/blob/master/examples/advanced/advanced.go)
- [Cache](https://github.com/pierrre/imageserver/blob/master/examples/cache/cache.go)
- [Groupcache](https://github.com/pierrre/imageserver/blob/master/examples/groupcache/groupcache.go)
- [HTTP Source](https://github.com/pierrre/imageserver/blob/master/examples/httpsource/httpsource.go)
- [Mandelbrot](https://github.com/pierrre/mandelbrot/blob/master/examples/httpserver/httpserver.go) ([see interactive demo](https://mandelbrot.pierredurand.fr))## 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](http://www.ericbrasseur.org/gamma.html))
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%
![]()
## 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.