Clementine is a light-weight service to convert and compress images on the fly.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
static
.gitignore
README.md
compress.go
handlers.go
main.go

README.md

Clementine

Clementine is a light-weight service to convert and compress images on the fly.

Features

  • Convert/compress both local and remote images
  • Support for JPEG, PNG, BMP, and GIF input
  • User-defined output compression rates

Installation

We're not quite ready yet, please check back later!

Endpoints

GET /ping

HTTP Heartbeat for service.

Example Request

$ curl clementine/ping

Example Response

OK

POST /compress

Compress and convert an image.

Parameters

Name Type Required Default Description
rate int   N 75 Rate of compression(1-100)
img string Y N/A URL to remote image for compression/conversion

Example Request

$ curl -X POST --data "img=http%3A%2F%2Fimage.com%2Ftest.jpeg&rate=60" localhost/compress

Example Response

http://localhost/srv/355c9d67fa17c7ad6bea34cf4537e824322e6485dac09e1dcc383452e7b1a7f8.jpeg