Skip to content
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

Add API to get/set image size limits #224

Closed
michaelrsweet opened this issue Oct 22, 2022 · 1 comment
Closed

Add API to get/set image size limits #224

michaelrsweet opened this issue Oct 22, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request performance Issue that adversely affects resource (CPU/memory/storage) usage priority-high security Security issue
Milestone

Comments

@michaelrsweet
Copy link
Owner

Right now the maximum JPEG/PNG image dimensions are hardcoded at 64kx64k (12GB for the largest RGB image), but embedded platforms like the Raspberry Pi top out at much less and don't typically have swap. We need API for this:

extern void papplSystemGetMaxImageSize(pappl_system_t *system, int *max_width, int *max_height, size_t *max_size) _PAPPL_PUBLIC;
extern void papplSystemSetMaxImageSize(pappl_system_t *system, int max_width, int max_height, size_t max_size) _PAPPL_PUBLIC;

A max value of 0 means "unlimited". The defaults should be 16k for width and height and 64MB for total size.

@michaelrsweet michaelrsweet self-assigned this Oct 22, 2022
@michaelrsweet michaelrsweet added this to the v1.3 milestone Oct 22, 2022
@michaelrsweet michaelrsweet added enhancement New feature or request security Security issue priority-high performance Issue that adversely affects resource (CPU/memory/storage) usage labels Oct 22, 2022
michaelrsweet added a commit that referenced this issue Oct 23, 2022
@michaelrsweet
Copy link
Owner Author

Adjusted the get/set APIs slightly:

[master 46e9e43] Add image size APIs (Issue #224)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Issue that adversely affects resource (CPU/memory/storage) usage priority-high security Security issue
Projects
None yet
Development

No branches or pull requests

1 participant