-
-
Notifications
You must be signed in to change notification settings - Fork 736
rename get_gainmap as prepare_gainmap #4782
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
Conversation
_get_gainmap() implied a safe getter, like _get_width(), but this function can modify the image and needs to be treated with care. Rename as vips_image_prepare_gainmap().
|
I added a tiny thing (disabled in release mode) to warn if an image you call |
|
... we'll need to update the release notes too, of course. |
Great idea! I've generalized it in PR #4783 so that any metadata changes on a shared image trigger a warning. |
it's better to test all metadata changes
|
On further thought, what if we remove |
`_get_gainmap()` now fully transfers ownership of the returned gainmap image to the caller, who is responsible for managing its lifecycle and setting the `"gainmap"` metadata. Supersedes: libvips#4782.
|
... I just opened PR #4784 as an alternative. |
|
Ah sorry, I didn't realize it was either/or, I should have waited. |
`_get_gainmap()` now fully transfers ownership of the returned gainmap image to the caller, who is responsible for managing its lifecycle and setting the `"gainmap"` metadata. Supersedes: #4782.
_get_gainmap() implied a safe getter, like _get_width(), but this function can modify the image and needs to be treated with care.
Rename as vips_image_prepare_gainmap().