Skip to content

libvips 8.18 #94

Description

@jcupitt

Hello, we've just done a feature-freeze ready for the release of libvips 8.18. There's a tracking issue here:

libvips/libvips#4770

The new bit of API is get_gainmap():

https://github.com/libvips/libvips/blob/master/libvips/iofuncs/header.c#L1069-L1107

You need this if you want to implement your own uhdr support, there's a new chapter in the docs for this feature:

https://github.com/libvips/libvips/blob/master/doc/uhdr.md

lua-vips might want to wrap this function.

Note that get_gainmap() does not make a new reference, the caller "borrows" the pointer from the image. You'd probably want to add a g_object_ref() when adding a method to lua-vips. I can make a PR if that'd be helpful.

Activity

  1. rolandlo commented on Dec 4, 2025

    @rolandlo
    Collaborator

    Thanks for the info. That's an interesting feature. The implementation looks relatively straightforward, so I don't necessarily need help with it.

  2. rolandlo commented on Dec 9, 2025

    @rolandlo
    Collaborator

    Note that get_gainmap() does not make a new reference, the caller "borrows" the pointer from the image. You'd probably want to add a g_object_ref() when adding a method to lua-vips.

    This info is outdated after libvips/libvips@e56eb32? has been merged, right?
    Could you please take a look at #95 to check if I got it right?

  3. jcupitt commented on Dec 9, 2025

    @jcupitt
    MemberAuthor

    Yes, we did a little swerve on the API right at the end :( sorry.

    Nice, I'll have a look at the PR!

  4. jcupitt commented on Dec 9, 2025

    @jcupitt
    MemberAuthor

    I used this test for pyvips fwiw:

    https://github.com/libvips/pyvips/blob/master/tests/test_image.py#L397-L418

    might be relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions