Using cover resize method

This commit is contained in:
renaud gaudin 2023-09-11 09:52:18 +00:00
parent f6afecbe92
commit ae1c2cb04c
No known key found for this signature in database
GPG key ID: 447475A4CFBA2E24
2 changed files with 2 additions and 1 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- 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

View file

@ -593,7 +593,7 @@ class WARC2Zim:
dst = io.BytesIO()
try:
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:
logger.warning(f"Failed to convert or resize favicon: {exc}")
self.illustration = DEFAULT_DEV_ZIM_METADATA["Illustration_48x48_at_1"]