24 Commits

Author SHA1 Message Date
Nova Kwok
c61ed7da6b
Allow convert on abnormal image (#212)
* Allow convert on abnormal image

* Bump to 0.8.2

* Remove usless line
2023-05-22 21:47:53 +08:00
Nova Kwok
156fab9b6b
Should return original image when convert failed (#209) 2023-05-20 18:00:39 +08:00
Vadim
9138e3d67a
prevent image rotation (#205) 2023-05-20 14:33:25 +08:00
Nova Kwok
e64ded7f47
Better RAM usage (#200)
* Manually close image for GC

* Remove config

* Handle error by os.Stat

* Add more test on fetchRemoteImage

* refine TestGenOptimizedAbsPath

* Bump version to 0.8.1
2023-05-19 17:07:58 +08:00
BugFest
ccc99e2e1c
Enable AVIF compression in proxy mode (#194)
* Enable AVIF compression in proxy mode

* Fix AVIF in proxy mode PR after PR#192 merge

* Bump version to 0.8.0
2023-05-17 19:11:58 +08:00
Nova Kwok
96802dc3bc
Update README (#195) 2023-05-15 21:43:29 +08:00
Nova Kwok
bcb3f1452b
Support extra parameters on request (#192)
* version 1

* some update

* Fix ST1020

* Remove ST1020

* Fix CI

* Fix params

* Fix order

* Allow reqURIwithQuery pass through when proxy mode

* Fix bugs

* Extract resizeImage

* Check for err
2023-05-15 20:13:00 +08:00
Nova Kwok
bfa8aae10c
Try using vips (#190)
* Try using vips

* No need libaom

* Update code and version

* update

* Fix CI

* Add sudo

* Fix CI

* Make CI happy

* we happy few

* Update README, fix CI

* Add --no-install-recommends

* Update code

* Add ca-certificates for proxymode

* Add pics/invalid.png for testing

* Update README

---------

Co-authored-by: Benny <benny.think@gmail.com>
2023-05-10 10:52:36 +08:00
Nova Kwok
090b11fc9c
Refine codes (#184)
* Refine code

* Remove log
2023-03-21 13:33:58 +08:00
Nova Kwok
dc4da7bae4
Add golangci/golangci-lint (#181)
* Add golangci/golangci-lint

* Fix golanglint
2023-03-18 22:24:06 +08:00
Benny
16ff497ade
deprecate ioutil (#171) 2023-02-07 13:07:14 +08:00
Nova Kwok
68cefb6740
A bunch of fixes (#161)
* Some updates

* Update Docs as well
2022-12-25 16:19:47 +08:00
Nova Kwok
64db6cc199
Try to mitigate cocurrency problem (#107)
* Try to mitigate cocurrency problem

* Remove getFileContentType in funcion

* Bump to 0.4.3 after fix
2022-03-20 16:45:07 +08:00
BennyThink
7f1c441b6f
avif encoding speed, disable AVIF by default 2021-12-10 15:18:40 +08:00
n0vad3v
5e033a8f72
Extract checkAllowedType function.
Minor Log text optimization.
2021-12-05 22:20:39 +08:00
BennyThink
67d40b4397
CI and minor fixes
* use GitHub Actions as CI
* bump versions
* Makefile and Dockerfile improvements
* upgrade logrus
2021-12-05 19:21:29 +08:00
BennyThink
7c65d5e213
stability enhancement
1. large dimension photos
2. GET /1.webp
3. dependabot
2021-12-04 17:25:26 +08:00
BennyThink
e9543522ae
avif support is almost complete 2021-12-04 17:25:26 +08:00
BennyThink
dbac67fe55
change webpEncoder signature for incoming refator,
auto update enchance: replace binary in place.
2021-12-04 17:25:12 +08:00
Benny
08c333f3cd
Fiber v2, code format, typo,test case, go 1.15 and more (#54)
* upgrade to fiber v2

* code format

* remove redundant variables
* remove useless exportable variables/functions

* go mod replace

use our own mirror now.

* add test case for converter, use deferInit to make test more simple

* remove useless file and fix typo

* Makefile change
* upgrade to go 1.15
* remove wrong go test comments

* complete test case, coverage, coverage badge

* Fix version typo

* config struct fix

* add banner, show version, add server header, remove fiber startup message

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2020-11-21 13:26:03 +08:00
Benny~
0b0da3b46c
default filemode is 644, remove x bit for a png file. Fix #26 2020-03-10 19:02:48 +08:00
n0vad3v
ff0ec84d82
optimize log 2020-03-07 13:09:32 +08:00
n0vad3v
7bdd0812f6
Added custom log level with -v.
Fix bug caused by hard code of exhaust path.
Bump version to 0.1.1.
2020-03-06 21:06:32 +08:00
Benny~
579be00b41
split functions to different files. Build and run, please use package mode, example:
`go run .`
`go build .`
`go run . --prefetch`
2020-03-04 20:14:45 +08:00