Commit graph

7 commits

Author SHA1 Message Date
Robert Swain 2d202cec07 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
2017-06-07 01:12:49 +02:00
Robert Swain 923013aa55 mediaapi: Add support for downloading of remote files 2017-05-31 17:56:11 +02:00
Robert Swain a936ad5063 mediaapi/writers/download: Add local download support 2017-05-31 13:46:21 +02:00
Robert Swain 05e88d81cb mediaapi: Add database storage and upload handler 2017-05-26 16:49:54 +02:00
Robert Swain 0affdae889 mediaapi/types: Rename member to ActiveRemoteRequests.MXCToCond
Clearer that it's a map from mxc URLs to sync.Cond
2017-05-26 14:17:54 +02:00
Robert Swain e8d3b4648b mediaapi/routing: Use common.MakeAPI 2017-05-26 13:37:07 +02:00
Robert Swain a3aaa86ea3 mediaapi: Add initial skeleton 2017-05-26 09:57:09 +02:00