Skip to content

Conversation

@DanielSincere
Copy link

@DanielSincere DanielSincere commented Oct 14, 2025

I was getting a crash on UIGraphicsBeginImageContextWithOptions(canvasSize, false, 0) and the output suggested using UIGraphicsImageRenderer which offers a UIGraphicsImageRendererContext to draw in. This motivated the new UIKit-only extension.

Here is the output from Xcode.

UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={-6, 22.5}, scale=2.000000, 
bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.82%. Comparing base (f97bd06) to head (7a85c68).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #107   +/-   ##
=======================================
  Coverage   88.82%   88.82%           
=======================================
  Files         148      148           
  Lines       12785    12785           
=======================================
  Hits        11356    11356           
  Misses       1429     1429           

☔ View full report in Codecov by Sentry.
📢 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.

@swhitty
Copy link
Owner

swhitty commented Oct 15, 2025

Thank you, we could also update the UIKit SVG.rasterize() to use this wrapper function now if you like

@swhitty swhitty merged commit abde962 into swhitty:main Oct 15, 2025
8 of 9 checks passed
@DanielSincere DanielSincere deleted the uikit-helpers branch October 15, 2025 14:33
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.

2 participants