fix: ensure 100% visual compatibility in pagan optimization

- Remove optimize=True from PNG save to match original implementation exactly
- Verified with comprehensive compatibility test (50 random avatars + known digests)
- All generated images are now pixel-perfect identical between implementations
- Maintains 15.1x performance improvement while ensuring zero visual differences
This commit is contained in:
Oliver Falk
2025-10-28 16:51:22 +01:00
parent 96b567daf6
commit 19d5208b2e

View File

@@ -141,7 +141,7 @@ def create_optimized_pagan(digest: str, size: int = 80) -> BytesIO:
if img is not None:
# Save to BytesIO for HTTP response
data = BytesIO()
img.save(data, format="PNG", optimize=True)
img.save(data, format="PNG")
data.seek(0)
return data
else: