Skip to content

Add support for passing intent when converting color profiles #468

@james-johnston-thumbtack

Description

The libvips icc_transform function supports passing an intent variable, as described here: https://www.libvips.org/API/current/libvips-colour.html#vips-icc-transform

Optional arguments:

intent : VipsIntent, transform with this intent

VipsIntent looks like this:

The rendering intent. VIPS_INTENT_ABSOLUTE is best for scientific work, VIPS_INTENT_RELATIVE is usually best for accurate communication with other imaging libraries.

VIPS_INTENT_PERCEPTUAL | perceptual rendering intent
VIPS_INTENT_RELATIVE | relative colorimetric rendering intent
VIPS_INTENT_SATURATION | saturation rendering intent
VIPS_INTENT_ABSOLUTE | absolute colorimetric rendering intent

This issue is a feature request to add support for this parameter when calling icc_transform. For example, perhaps it could be added to the Options structure at https://pkg.go.dev/github.com/h2non/bimg#Options.

This option seems to be required in order to correctly convert some CMYK images, like the example discussed here in the last comment: libvips/php-vips#106 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions