Skip to content

text: simplify check for 32k pixel limit #3057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

kleisauke
Copy link
Member

Cairo also does this check internally in cairo_image_surface_create_for_data(), see:
https://github.com/freedesktop/cairo/blob/2cfd08664d080ff22e357a5feeca9bc29ec1823c/src/cairo-image-surface.c#L532-L533

Test case:

$ vips text x.png $(printf '=%.0s' {1..9999})
text: invalid value (typically too big) for the size of the input (surface, pattern, etc.)

Context: kleisauke/net-vips#178.

Note: this PR targets the 8.13 branch.

@jcupitt
Copy link
Member

jcupitt commented Sep 21, 2022

Ah, that's neater. I merged to master as well.

@kleisauke kleisauke deleted the text-simplify-cairo-limit branch September 21, 2022 18:42
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