A thumbnailing library for Go. https://code.ivysaur.me/thumbnail/
Go to file
2018-12-31 16:49:44 +13:00
cmd/mkthumb mkthumb: fix build for post-refactor 2018-06-09 17:18:07 +12:00
vendor vendor: update code.ivysaur.me/imagequant 2018-12-31 16:49:44 +13:00
.hgignore hgignore 2018-06-04 18:22:07 +12:00
.hgtags Added tag v1.0.0 for changeset 8bfdf42aed32 2018-06-09 17:50:41 +12:00
CachingThumbnailer.go add RenderFileAs() for user-supplied mime-type 2018-06-09 18:07:54 +12:00
config.go scaler: support Stretch 2018-06-09 17:20:27 +12:00
decodeImage.go major refactor - add png(noncrush),bmp thumbnail output 2018-06-09 16:39:41 +12:00
decodeVideo.go major refactor - add png(noncrush),bmp thumbnail output 2018-06-09 16:39:41 +12:00
DirectThumbnailer.go add RenderFileAs() for user-supplied mime-type 2018-06-09 18:07:54 +12:00
go.mod build: convert from dep to Go Modules 2018-12-31 16:49:18 +13:00
go.sum build: convert from dep to Go Modules 2018-12-31 16:49:18 +13:00
imagecrush_disabled.go swap build tag disableimagecrush to new 'withimagecrush' 2018-06-09 16:16:38 +12:00
imagecrush.go swap build tag disableimagecrush to new 'withimagecrush' 2018-06-09 16:16:38 +12:00
make_archive.sh make_archive: update to exclude vendor dir from release tarballs 2018-06-09 17:50:37 +12:00
README.md doc: top-level README.md 2018-12-31 16:48:52 +13:00
scaler.go scaler: support Stretch 2018-06-09 17:20:27 +12:00
Thumbnailer.go add RenderFileAs() for user-supplied mime-type 2018-06-09 18:07:54 +12:00

A thumbnailing library for Go.

Written in Go

  • Supports jpeg / png / gif / bmp / webp files (internally)
  • Supports video files (requires ffmpeg in $PATH)
  • Optional LRU cache of recent thumbnails for performance
  • Sampling algorithms: Nearest-neighbour, Bilinear (fast), Bilinear (accurate), Bicubic (Catmull-Rom)
  • Scaling algorithms: Fit inside, Fit outside, Stretch
  • Output formats: JPG, PNG, Quantised/lossy PNG (via go-imagequant), BMP

A standalone binary mkthumb is provided as a sample utility.

This package can be installed via go get: go get code.ivysaur.me/thumbnail [go-get]code.ivysaur.me/thumbnail git https://git.ivysaur.me/code.ivysaur.me/thumbnail.git[/go-get]

=CHANGELOG=

2018-06-09 1.0.0

  • Feature: Major speed improvement
  • Feature: Support FitInside, FitOutside, and Stretch stretching modes
  • Feature: Support Bilnear (Fast), Bilnear (Accurate), and Bicubic (Catmull-Rom) scaling algorithms
  • Feature: Support PNG output without imagequant; support BMP output
  • Feature: Support Webp and BMP input files
  • Fix wrong dimension output for video input files
  • Fix jagged output of bilinear resizer

2018-06-04 0.2.1

  • Add disableimagecrush build tag option to exclude cgo library dependency

2017-11-18 0.2.0

  • Initial standalone release
  • Feature: Decode input with specified mime type
  • Feature: Allow passing zero as thumbnail cache size

2017-01-03 0.1.0

  • Version of thumbnail vendored with webdir 1.0 (previously tagged as release-1.0)