36 Commits

Author SHA1 Message Date
85a4096ffc refactor(encoder): remove logging for image conversion and processing 2024-10-29 16:43:28 +08:00
e11cd575c8 refactor(encoder): optimize extra image processing parameters handling 2024-10-23 07:23:39 +08:00
740aae4f98 refactor(encoder): improve image conversion process and error handling 2024-10-23 04:09:38 +08:00
230cc6c31c refactor(encoder): improve image preprocessing and error handling 2024-10-23 04:02:23 +08:00
97cc9b5aa3 chore: add logging for image copy process
Added log message to indicate successful copying of the original image to EXHAUST_PATH.
2024-10-23 03:43:40 +08:00
d17cfc7a3c refactor(encoder): add logging and refactor resizeImage function 2024-10-23 03:30:56 +08:00
fdea015805 refactor(encoder): add file size check and optimize raw image conversion process 2024-10-22 23:10:09 +08:00
159e78f82e feat(encoder): add NEF to JPG conversion and improve image processing workflow 2024-10-22 22:59:52 +08:00
059aba8a4d feat(encoder): add logging and support for AVIF and JXL image formats 2024-10-22 22:47:56 +08:00
c5ed3a1fea feat(encoder): add ProcessAndSaveImage function to handle image processing and saving 2024-10-22 22:36:58 +08:00
be7aed64a9 refactor(encoder): Update log messages and helper functions for better readability and maintainability 2024-10-22 21:45:47 +08:00
c8f3d0bf38 进一步优化日志 2024-10-22 19:32:22 +08:00
f8b23a88f3 chore: Refactor workflow and Makefile, remove test files 2024-10-22 19:06:06 +08:00
4aea178ab0 100KB以下不处理, 调整日志 2024-10-22 18:20:59 +08:00
c9cb32b0da 尝试优化内存占用
feat(encoder): optimize prefetch images with worker pool and progress bar
refactor(handler): improve downloadFile function with error handling
refactor(helper): use streaming JSON encoder for metadata
chore(webp-server): update server config with write buffer size
2024-10-22 17:26:43 +08:00
cad6e95686 refactor(encoder, handler, schedule): Update error messages and code style for better readability 2024-10-22 16:56:42 +08:00
Nova Kwok
89ea0affa3
Add MAX_CACHE_SIZE config (#344)
* Add MAX_CACHE_SIZE

* Bump actions version

* Optimize code

* Use Ticker to control GC loop
2024-06-29 16:42:00 +08:00
Nova Kwok
c7bebfca34
Add EXTRA_PARAMS_CROP_INTERESTING (#328) 2024-04-19 10:06:05 +08:00
Nova Kwok
43c275e3ec
Adds JPEG XL support, max_height/max_width support (#321)
* WIP JXL

* Fix test

* Tries to fix autobuild

* Tries to fix autobuild

* Add setup go in codeql

* Bump actions version

* Do not print curl output in CI

* Do not print curl output in CI

* Remove Metadata on RAW image

* Update sample config

* better loop

* Prefetch should also respect AllowedType

* Better Export params and UA handle

* Only do conversion on supported formats

* CONVERT_TYPES default to webp only

* CONVERT_TYPES default to webp only

* Add GIF to AllowedTypes

* Update README
2024-03-22 15:12:09 +08:00
Nova Kwok
ca1050d3c7
Optimized Dockerfile, bump version (#318)
* Optimized Dockerfile, bump version

* Remove unused extraParams
2024-02-29 20:06:15 +08:00
Nova Kwok
12d4cc1a0b
Upgrade to Go 1.22 (#311) 2024-02-10 10:00:40 +01:00
Nova Kwok
1ec981b1fb
Read all pages (#308)
* Read all pages

* Bump to 0.10.6
2023-12-29 21:24:56 +08:00
Nova Kwok
d35e0e0d0b
Lock on convert (#307)
* Lock on convert

* Fix typo

* Should use debug for convert lock

* Bump to 0.10.5
2023-12-29 19:38:05 +08:00
Nova Kwok
d83f6667cc
Refine convert part (#303)
* Refine convert part

* Only open image once

* More refine
2023-12-16 20:12:42 +01:00
Nova Kwok
c771160a05
Ignore GIF when converting to AVIF (#302)
* Ignore GIF when converting to AVIF

* Allow WebP as source
2023-12-01 20:26:27 +08:00
Nova Kwok
543af2415f
Better configuration (#288)
* Better config

* print to log

* Upgrade golang.org/x/net

* Tidy go mods

* export WebpConfig

* Add TestConvertRawToJPG

* Add TestConvertRawToJPG

* Update Integration Tests UA

* Add README for supporting NEF

---------

Co-authored-by: Benny <benny.think@gmail.com>
2023-11-05 18:34:04 +08:00
Nova Kwok
4a90b18a63
Fix bug that could remove original image (#287)
* Fix bug that could remove original image

* Refine notice
2023-11-04 22:22:56 +08:00
Langel
d98740cfea
ISSUE-281 Add NEF support by convert to jpg (#284)
Co-authored-by: Langel <llanc@qq.com>
2023-10-30 21:03:38 +08:00
Nova Kwok
5d265dce33
Parse flat before load config (#275)
* Parse flat before load config

* Bump version to 0.9.11
2023-09-15 14:13:30 +08:00
BugFest
4003b03022
Multiple backends support (#207)
* Fix: h2non/filetype upgraded to support avif signatures

* Fix: make clean updated to include test/output dirs

* Feature: multi-backend support via IMG_MAP config key as described in #217

* feat: implement both local and remote (proxyMode) mappings for multi-backend

* Feature: multi-backend support via IMG_MAP config key as described in #217

* fix: go-is-svg should be direct import

* fix: imgMap paths are relative to CWD

* feature: IMG_MAP is parsed on start

---------

Co-authored-by: Nova Kwok <n0vad3v@riseup.net>
2023-08-02 23:33:54 +08:00
Benny
5f6c7cce1e
better reduction effect loop and bump (#256)
* better reduction effect loop and bump

* Bump version

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-07-19 10:10:21 +08:00
Nova Kwok
b988668893
Better ReductionEffort (#255)
* Better ReductionEffort

* Bump version
2023-07-18 23:17:34 +08:00
Nova Kwok
24b96a901b
ReductionEffort to 0 (#254) 2023-07-18 16:16:14 +08:00
Benny
a7b5992662
Metadata (#251)
* recover middleware

* simplify Atoi

* metadata data prototype

* InterestingAttention

* resize itself

* Bump version to 0.9.4
Added some comments
Removed String() for Extraparams

* Add metadata test

* Fix CI

* Remove unnecessary tests

* Update file count

* use t.Run to get test case

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-07-11 19:08:32 +02:00
Benny
451f9a4145
update README.md (#237)
* update README.md

* #234
2023-06-28 14:56:33 +08:00
Benny
23bbed8ce6
Refactor review (#220)
* runnable

* convert is working

* some refactoring

* update go.mod

* fix some TODOs

* add TODO

* update go mod

* rebase onto master

* fix #234

2: 5.9s - 7.6MB
4: 26s - 6.9MB

* fix malloc tests

* fix malloc tests

* remote TODO

* add X-Real-IP #236

* Better localRawImagePath

* remove some wrong comments

* Bump version to 0.9.0

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-06-27 15:43:43 +02:00