Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jordic/tthumb
Single binary thumbnail server written in go (100LOC) (that uses imagemagick command to generate thumbnails)
https://github.com/jordic/tthumb
Last synced: 2 days ago
JSON representation
Single binary thumbnail server written in go (100LOC) (that uses imagemagick command to generate thumbnails)
- Host: GitHub
- URL: https://github.com/jordic/tthumb
- Owner: jordic
- Created: 2016-04-08T11:05:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-13T07:30:02.000Z (almost 8 years ago)
- Last Synced: 2024-11-06T02:56:55.306Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Thumbnail server in go
Simple and high performance thumbnail server written in go.
## Key points
- Simple (100LOC)
- No dependencies ( only a readable installation of Imagemagick )
- Uses imagemagick command to generate thumbnails
- Cached thumbnails from disk. Internally go uses file_serve to get maximum performance
- http server from go stdlib## Operation
Create a presets.json wich each of the params you provide to imagemagic for creating an image
```bash
convert initial.jpg -colorspace gray -level +10% +level-colors "#000000","#ffec00" -thumbnail 300x200^ -extent 300x200 -quality 82 init_thumb.jpg
```
preset wil be:```json
{
"red300": "-colorspace gray -level +10% +level-colors '#000000','#ffec00' -thumbnail 350x250^ -extent 350x250 -quality 82"
}
```
Launch the server and you can access generated thumbnails from,http://yourlocaladdress/pathtoimage/image?p=red300
## Docker
There is a Dockerfile provided to build a self contained image that can run everywhere :)
## Improvements
- Mount remote storage services from the app. (This way will also be allowed to be used as a cloud cache)