mirror of
https://github.com/openzim/warc2zim.git
synced 2025-10-19 14:33:17 +00:00
Using cover resize method
This commit is contained in:
parent
f6afecbe92
commit
ae1c2cb04c
2 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Using wabac.js 2.16.11
|
- Using wabac.js 2.16.11
|
||||||
|
- Using `cover` resize method for favicon to prevent issues with too-small ones
|
||||||
|
|
||||||
## [1.5.3] - 2023-08-23
|
## [1.5.3] - 2023-08-23
|
||||||
|
|
||||||
|
|
|
@ -593,7 +593,7 @@ class WARC2Zim:
|
||||||
dst = io.BytesIO()
|
dst = io.BytesIO()
|
||||||
try:
|
try:
|
||||||
convert_image(src, dst, fmt="PNG")
|
convert_image(src, dst, fmt="PNG")
|
||||||
resize_image(dst, width=48, height=48, method="thumbnail")
|
resize_image(dst, width=48, height=48, method="cover")
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.warning(f"Failed to convert or resize favicon: {exc}")
|
logger.warning(f"Failed to convert or resize favicon: {exc}")
|
||||||
self.illustration = DEFAULT_DEV_ZIM_METADATA["Illustration_48x48_at_1"]
|
self.illustration = DEFAULT_DEV_ZIM_METADATA["Illustration_48x48_at_1"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue