Skip to content

thumbnail_image converts CMYK image to RGB #138

@AdamGaskins

Description

@AdamGaskins

Hey, thanks so much for this project! It has been a pleasure to use so far.

I'm finding that these lines of code are outputting an RGB image, when my source is a CMYK with an embedded profile:

$image = VipsImage::newFromFile('input.jpeg');
$image = $image->thumbnail_image(1000);
$image->writeToFile('output.jpeg', [ 'Q' => 95 ]);

If I remove the thumbnail_image call, the output is CMYK. It looks like thumbnail_image may have import-profile and export-profile options? But I'm not sure what they do, or how to get the profile from the image. Is there some way to tell it to just keep the image in whatever color format it is in? RGB should stay RGB, and CMYK should stay CMYK.

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