Releases: cshum/imagor
v0.9.10
Revamp Config Initialization
When using Imagor as a Go package, it is now much easier to reuse and enable/disable components being loaded. For instance the main function now looks like this:
package main
import (
"github.com/cshum/imagor/config"
"github.com/cshum/imagor/config/awsconfig"
"github.com/cshum/imagor/config/gcloudconfig"
"github.com/cshum/imagor/config/vipsconfig"
"os"
)
func main() {
var server = config.CreateServer(
os.Args[1:],
vipsconfig.WithVips, // enable libvips Processor config
awsconfig.WithAWS, // enable AWS Loader, Storage, Result Storage config
gcloudconfig.WithGCloud // enable GCS Loader, Storage, Result Storage config
)
if server != nil {
server.Run()
}
}
Better PNG Performance
Added libspng to Docker build. When possible, libvips 8.13 will use the library for PNG write as well as PNG read. This can produce a useful increase in PNG speed.
What's Changed
- build(vips): meson build for libvips by @cshum in #87
- build(deps): bump cloud.google.com/go/storage from 1.23.0 to 1.24.0 by @dependabot in #86
- refactor: revamp config architecture by @cshum in #88
- build(docker): add jp2 by @cshum
- build(docker): add libspng by @cshum in #89
- build(docker): improve docker build and push workflow by @cshum in #92
Full Changelog: v0.9.8...v0.9.10
v0.9.8
libvips 8.13
Imagor now with upgraded libvips to v8.13:
https://www.libvips.org/2022/05/28/What's-new-in-8.13.html
Much better GIF performance
The most noticeable improvements is GIF handling, which has been reworked again in libvips 8.13, producing smaller files with much lower CPU and memory load.
Compared to imagemagick6, libvips is around 10x faster, needs 4x less memory, makes GIFs which are 20% smaller, and produces higher quality output.
What's Changed
- build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.5 by @dependabot in #69
- build(deps): bump cloud.google.com/go/storage from 1.22.1 to 1.23.0 by @dependabot in #70
- build(deps): bump github.com/fsouza/fake-gcs-server from 1.37.12 to 1.38.2 by @dependabot in #72
- build(deps): bump github.com/aws/aws-sdk-go from 1.44.25 to 1.44.41 by @dependabot in #71
- docs: ghcr badge by @cshum in #82
- build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 by @dependabot in #76
- fix(vips): fix rotate with fill by @cshum in #83
- build: vips 8.13 by @cshum in #84
New Contributors
- @dependabot made their first contribution in #69
Full Changelog: v0.9.7...v0.9.8
v0.9.7
Custom HMAC Signer Support
Imagor uses SHA1 HMAC signer by default, the same one used by Thumbor. However, SHA1 is not considered cryptographically secure. If that is a concern it is possible to configure different HMAC signing method and truncate length. Imagor supports sha1
, sha256
, sha512
signer type:
IMAGOR_SIGNER_TYPE=sha256
IMAGOR_SIGNER_TRUNCATE=32
An example URL signature generator in Node.js:
var hmacSHA256 = require("crypto-js/hmac-sha256")
var Base64 = require("crypto-js/enc-base64")
function sign(path, secret) {
var hash = hmacSHA256(path, secret)
hash = Base64.stringify(hash).slice(0, 32).replace(/\+/g, '-').replace(/\//g, '_')
return hash + '/' + path
}
What's Changed
- feat(imagor): imagor-signer-type by @cshum in #67
- fix(imagor): fix fanout reader upstream error and premature close handling
- fix(imagor): ErrPass handling
- refactor(imagor): fanout reader lazy init
- build: docker go 1.18.3
Full Changelog: v0.9.6...v0.9.7
v0.9.6
What's Changed
- fix(imagor): should not write empty bytes if blob originated from storage
- refactor(imagor): loader storage sequence enhancement
- feat(imagor): blob.Sniff() method
- feat: storage.Del interface and implementation for filestorage, s3storage, gcloudstorage
- refactor(imagor): imagor.ErrInvalid
Full Changelog: v0.9.3...v0.9.6
v0.9.3
Improved Throughput with imagor.Blob
Imagor v0.9 introduced imagor.Blob
as the mechanism for bytes transfer and content type sniffing, which supports spawning multiple concurrent Reader stream from a single source. This greatly improved the throughput across Loader, Storage, Result Storage and HTTP response.
Base Params Support
Using -imagor-base-pararms
You can now configure predefined endpoint params that applies to all resulting images.
For example, a watermark for every generated images:
docker run -p 8000:8000 shumc/imagor:0.9.3 -imagor-unsafe -imagor-base-params 'filters:watermark(raw.githubusercontent.com/cshum/imagor/master/testdata/gopher-front.png,-15,-15,20,30,30)'
Try out the following URLs:
http://localhost:8000/unsafe/fit-in/200x200/filters:fill(white)/raw.githubusercontent.com/cshum/imagor/master/testdata/gopher.png
http://localhost:8000/unsafe/fit-in/200x200/filters:fill(yellow)/raw.githubusercontent.com/cshum/imagor/master/testdata/nyan-cat.gif
New Config Options
-imagor-base-params string
Imagor endpoint base params that applies to all resulting images e.g. fitlers:watermark(example.jpg)
-imagor-disable-params-endpoint
Imagor disable /params endpoint
-imagor-disable-error-body
Imagor disable response body on error
What's Changed
- feat(imagor): metadata from result storage by @cshum in #65
- feat(imagor): io.Reader, io.Writer stream based Blob container by @cshum in #66
- feat(imagor): -imagor-disable-error-body
- feat(imagor): -imagor-disable-params-endpoint
- feat(imagor): base endpoint params support with -imagor-base-params
- fix(vips): fix image ref gc
- fix(imagor): fix blob error expansion
Full Changelog: v0.8.29...v0.9.3
v0.8.29
Stability Release
- fix(imagor): empty bytes handling
- perf: improve bytes content-type determination
- fix(vips): find trim fail should not disrupt image operations
- fix(imagor): emtpy image key handling
- fix(imagor): empty filter arg handling
- improved test coverage
Full Changelog: v0.8.28...v0.8.29
v0.8.28
Cache-Control Header Options
New options for Cache-Control header - stale-while-revalidate
and no-cache
support
-imagor-cache-header-swr duration
Imagor HTTP Cache-Control header stale-while-revalidate for successful image response (default 24h0m0s)
-imagor-cache-header-no-cache
Imagor HTTP Cache-Control header no-cache for successful image response
What's Changed
- feat(imagor): Cache-Control header stale-while-revalidate support by @cshum in #63
- fix(vips): crop with trim handling
- fix(vips): focal filter with crop
- feat(imagor): http HEAD method support
- fix(imagor): fix avif load error
Full Changelog: v0.8.23...v0.8.28
v0.8.23
Filter focal(AxB:CxD)
Adds a focal region for custom transformation, coordinated by left-top point AxB and right-bottom point CxD.
Also accepts float values between 0 and 1 that represents percentage of image dimensions.
http://localhost:8000/unsafe/200x50/smart/filters:fill(white)/https://raw.githubusercontent.com/cshum/imagor/master/testdata/gopher.png
http://localhost:8000/unsafe/200x50/smart/filters:fill(white):focal(589x401:1000x814)/https://raw.githubusercontent.com/cshum/imagor/master/testdata/gopher.png
http://localhost:8000/unsafe/200x50/smart/filters:fill(white):focal(0.35x0.25:0.6x0.3)/https://raw.githubusercontent.com/cshum/imagor/master/testdata/gopher.png
What's Changed
- feat(imagor): modified time check by @cshum in #58
- feat(imagorpath): signer abstraction by @cshum in #59
- feat(imagorpath): safe chars abstraction by @cshum in #60
- feat(vips): focal filter by @cshum in #61
Full Changelog: v0.8.22...v0.8.23
v0.8.22
Filter max_bytes(amount)
Automatically degrades the quality of the image until the image is under the specified amount
of bytes
Improved Memory Control
Improved memory control using jemalloc
What's Changed
- build: jemalloc by @cshum in #54
- feat(vips): max_bytes by @cshum in #55
- fix(vips): fix max_bytes with thumbnailNotSupported by @cshum in #57
- fix: .env handling for undefined flag
Full Changelog: v0.8.20...v0.8.22
v0.8.20
Improved GIF Performance
Imagor Docker now adopts cgif library for GIF Save in libvips , resulting faster export speed and significantly reduced memory usage.
What's Changed
- build: cgif 0.3.0, govips 2.11.0
- build: remove magick
- refactor: MaxFilterOps default unlimited
- refactor(imagor): blob type handling
Full Changelog: v0.8.18...v0.8.20