Skip to content

Add new nullable functions that support null values in jimp #17

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

serd223
Copy link

@serd223 serd223 commented Jun 28, 2025

In order to communicate the difference between an error and encountering null, I introduced a Jimp_Result enumeration. Since JIMP_ERR is 0, users can still use the if (!jimp_xxx(&jimp, &xx) return false; paradigm. If they want to handle null cases explicitly, they can introduce that complexity when they desire. Since handling null cases, in my opinion, is very application specific I think the library user should be expected to handle that and jimp should only alert the user when a null value is found.

@serd223 serd223 changed the title Add new nullable functions that support null values Add new nullable functions that support null values in jimp Jun 28, 2025
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.

1 participant