神刀安全网

Image Server

Image Server

An image server toolkit in Go (Golang)

Image Server Image Server Image Server Image Server

Features

  • HTTP server
  • Resize (GIFT, nfnt resize , Graphicsmagick )
  • Rotate
  • Crop
  • Convert (JPEG, GIF (animated), PNG , BMP, TIFF, …)
  • Cache (groupcache, Redis ,Memcache, in memory)
  • Gamma correction
  • Fully modular

Examples

Demos

These demos use the "advanced" example.

Click the images to see the URL parameters.

Resize

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

Rotate

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

Crop

Format: min_x,min_y|max_x,max_y

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

Animated GIF

Original Resized
Animated Image Server
Spaceship Image Server

Gamma correction ( more info )

Original Disabled Enabled
Dalai Gamma Image Server Image Server
Gray squares Image Server Image Server
Random Image Server Image Server
Rings Image Server Image Server

Resampling

Resampling Rings Large
Nearest neighbor Image Server Image Server
Box Image Server Image Server
Linear Image Server Image Server
Cubic Image Server Image Server
Lanczos Image Server Image Server

Quality

JPEG quality Result
5% Image Server
10% Image Server
50% Image Server

Convert (JPEG to GIF)

Image Server

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.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Image Server

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址