mediaapi: Add thumbnail support (#132)

* vendor: Add bimg image processing library

bimg is MIT licensed. It depends on the C library libvips which is LGPL
v2.1+ licensed. libvips must be installed separately.

* mediaapi: Add YAML config file support

* mediaapi: Add thumbnail support

* mediaapi: Add missing thumbnail files

* travis: Add ppa and install libvips-dev

* travis: Another ppa and install libvips-dev attempt

* travis: Add sudo: required for sudo apt* usage

* mediaapi/thumbnailer: Make comparison code more readable

* mediaapi: Simplify logging of thumbnail properties

* mediaapi/thumbnailer: Rename metrics to fitness

Metrics is used in the context of monitoring with Prometheus so renaming
to avoid confusion.

* mediaapi/thumbnailer: Use math.Inf() for max aspect and size

* mediaapi/thumbnailer: Limit number of parallel generators

Fall back to selecting from already-/pre-generated thumbnails or serving
the original.

* mediaapi/thumbnailer: Split bimg code into separate file

* vendor: Add github.com/nfnt/resize pure go image scaler

* mediaapi/thumbnailer: Add nfnt/resize thumbnailer

* travis: Don't install libvips-dev via ppa

* mediaapi: Add notes to README about resizers

* mediaapi: Elaborate on scaling libs in README
This commit is contained in:
Robert Swain 2017-06-07 01:12:49 +02:00 committed by GitHub
parent def49400bc
commit 2d202cec07
73 changed files with 10027 additions and 83 deletions

18
vendor/manifest vendored
View file

@ -114,6 +114,12 @@
"branch": "master",
"path": "/pbutil"
},
{
"importpath": "github.com/nfnt/resize",
"repository": "https://github.com/nfnt/resize",
"revision": "891127d8d1b52734debe1b3c3d7e747502b6c366",
"branch": "master"
},
{
"importpath": "github.com/pierrec/lz4",
"repository": "https://github.com/pierrec/lz4",
@ -179,6 +185,12 @@
"revision": "61e43dc76f7ee59a82bdf3d71033dc12bea4c77d",
"branch": "master"
},
{
"importpath": "github.com/tj/go-debug",
"repository": "https://github.com/tj/go-debug",
"revision": "ff4a55a20a86994118644bbddc6a216da193cc13",
"branch": "master"
},
{
"importpath": "golang.org/x/crypto/bcrypt",
"repository": "https://go.googlesource.com/crypto",
@ -225,6 +237,12 @@
"revision": "bfee1239d796830ca346767650cce5ba90d58c57",
"branch": "master"
},
{
"importpath": "gopkg.in/h2non/bimg.v1",
"repository": "https://gopkg.in/h2non/bimg.v1",
"revision": "45f8993550e71ee7b8001d40c681c6c9fa822357",
"branch": "master"
},
{
"importpath": "gopkg.in/yaml.v2",
"repository": "https://gopkg.in/yaml.v2",