Skip to content

Conversation

@Its-Just-Nans
Copy link
Contributor

@Its-Just-Nans Its-Just-Nans commented Dec 14, 2025

Fix #853

@LaurenzV
Copy link
Collaborator

Ah, it's probably because the maximum size isn't actually 32-bit, but 31. Then this change makes sense, but we need to remove the comments.

Its-Just-Nans and others added 4 commits December 15, 2025 18:10
Co-authored-by: Laurenz Stampfl <47084093+LaurenzV@users.noreply.github.com>
Co-authored-by: Laurenz Stampfl <47084093+LaurenzV@users.noreply.github.com>
@Its-Just-Nans
Copy link
Contributor Author

Ah, it's probably because the maximum size isn't actually 32-bit, but 31. Then this change makes sense, but we need to remove the comments.

Yes Pixmap's width is limited by i32::MAX/4, we handle the creation error.

Also I think this MR linebender/tiny-skia#151 could help to handle panic (Out Of Memory) in this case

@LaurenzV LaurenzV changed the title handle unwrap Avoid unwraps on pixmap creation Dec 16, 2025
@LaurenzV LaurenzV merged commit 17cde9e into linebender:main Dec 16, 2025
5 checks passed
@LaurenzV
Copy link
Collaborator

Thanks!

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.

Thread 'main' panicked

2 participants