Giter VIP home page Giter VIP logo

imageserver's Introduction

Image Server

An image server written in Go (Golang)

Features

  • Http server
  • Resize / convert / process (Graphicsmagick)
  • Cache (Redis, Memcache, in memory)
  • Fully modular

Demo

Normal
http://fuckingfrogs.fr:8080/?source=https://raw.github.com/pierrre/imageserver/master/testdata/small.jpg

Normal

Resize animated gif
http://fuckingfrogs.fr:8080/?source=https://raw.github.com/pierrre/imageserver/master/testdata/animated.gif&width=300&height=300

Resize animated gif

Resize and crop
http://fuckingfrogs.fr:8080/?source=https://raw.github.com/pierrre/imageserver/master/testdata/medium.jpg&width=200&height=200&extent=1&fill=1

Resize and crop

Resize jpeg low quality
http://fuckingfrogs.fr:8080/?source=https://raw.github.com/pierrre/imageserver/master/testdata/large.jpg&width=400&format=jpeg&quality=50

Resize jpeg low quality

Resize huge image (5000x5000)
http://fuckingfrogs.fr:8080/?source=https://raw.github.com/pierrre/imageserver/master/testdata/huge.jpg&width=300&height=300

Resize huge image (5000x5000)

Resize benchmark

go test -bench=. -benchtime=10s ./processor/graphicsmagick
testing: warning: no tests to run
PASS
BenchmarkResizeSmallWorker1-8	    5000	   8188875 ns/op
BenchmarkResizeMediumWorker1-8	    1000	  23143921 ns/op
BenchmarkResizeLargeWorker1-8	     500	  52679041 ns/op
BenchmarkResizeHugeWorker1-8	      50	 389060935 ns/op
BenchmarkResizeAnimatedWorker1-8	      50	 311136430 ns/op
BenchmarkResizeSmallWorker2-8	    5000	   5786665 ns/op
BenchmarkResizeMediumWorker2-8	    1000	  16159015 ns/op
BenchmarkResizeLargeWorker2-8	     500	  36070204 ns/op
BenchmarkResizeHugeWorker2-8	      50	 247750150 ns/op
BenchmarkResizeAnimatedWorker2-8	      50	 221887473 ns/op
BenchmarkResizeSmallWorker4-8	    5000	   5674571 ns/op
BenchmarkResizeMediumWorker4-8	    2000	  13427690 ns/op
BenchmarkResizeLargeWorker4-8	    1000	  29846192 ns/op
BenchmarkResizeHugeWorker4-8	      50	 217280287 ns/op
BenchmarkResizeAnimatedWorker4-8	      50	 243820932 ns/op
BenchmarkResizeSmallWorker8-8	    5000	   4770737 ns/op
BenchmarkResizeMediumWorker8-8	    2000	  12349114 ns/op
BenchmarkResizeLargeWorker8-8	    1000	  27195685 ns/op
BenchmarkResizeHugeWorker8-8	      50	 214468274 ns/op
BenchmarkResizeAnimatedWorker8-8	      50	 200378466 ns/op
ok  	github.com/pierrre/imageserver/processor/graphicsmagick	443.701s

Status

Build Status

Usage / Build

You have to compile/configure your own image server.

See examples:

Documentation

http://godoc.org/github.com/pierrre/imageserver

Help

  • Twitter: @pierredurand87
  • Github issue

TODO

  • more tests
  • add new "parameter error", convert in http
  • don't ignore error from cache
  • clean HTTPProvider tests (createTestHTTPProvider)
  • clean NativeProcessor (use interface instead of func)
  • add ProcessorImageServer (move Processor)
  • add ProviderImageServer (move Provider)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.