Skip to content

fix(export): fill corners of circular jpeg exports - #106

Merged
imerljak merged 1 commit into
mainfrom
fix/103-circular-jpeg-corners
Nov 4, 2026
Merged

imerljak merged 1 commit into
mainfrom
fix/103-circular-jpeg-corners

Conversation

@imerljak

@imerljak imerljak commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Circular JPEG exports had black corners: the auto white fill was skipped for shape="circle", and JPEG drops the alpha the mask leaves behind.

Changes

  • Opaque formats always get a background (fillColor or #fff), whatever the shape. The fill is painted behind the masked image, so the circle stays intact.
  • PNG/WebP circular exports keep transparent corners.
  • README note on circular crops updated.

Testing

  • Regression test: circular JPEG is filled, after the clip.
  • Test: circular PNG is not filled.

Closes #103

JPEG has no alpha channel, so the transparent corners left by the
circle mask encoded as black. The background is painted behind the
masked image, so filling it keeps the circle intact.

Closes #103
@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.75%. Comparing base (dca62ab) to head (2363c3b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #106      +/-   ##
==========================================
- Coverage   99.75%   99.75%   -0.01%     
==========================================
  Files           7        7              
  Lines         832      831       -1     
  Branches      144      144              
==========================================
- Hits          830      829       -1     
  Misses          2        2              
Flag Coverage Δ
unittests 99.75% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@imerljak
imerljak merged commit 9d070ea into main Nov 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Circular JPEG exports have black corners

1 participant