Skip to content
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

CMYK image colour changes post image resize #275

Open
vaidhyanathan-ananthakrishnan-13 opened this issue Mar 29, 2022 · 6 comments
Open

Comments

@vaidhyanathan-ananthakrishnan-13

The version used: v2.7.0

For a set of images, If I resize the image using the govips , the CMYK file's color is changing drastically, but for the same image when I tried using the libvips command line, it is working fine.

Original image: https://raw.githubusercontent.com/vaidhyanathan93/Todo/master/5000.jpg
Resized image : https://raw.githubusercontent.com/vaidhyanathan93/Todo/master/Resized.webp

Lib vips command line

vipsthumbnail 5000-1.jpeg -s 540x439

@vaidhyanathan-ananthakrishnan-13 vaidhyanathan-ananthakrishnan-13 changed the title CMYK images colour changes post image resize CMYK image colour changes post image resize Mar 29, 2022
@sbraty
Copy link

sbraty commented Apr 1, 2022

Before transform image call function OptimizeICCProfile()

img, err := vips.NewImageFromReader(reader)
if err != nil {...}
if err := img.OptimizeICCProfile(); err != nil {...}

@vaidhyanathan-ananthakrishnan-13
Copy link
Author

Tried with OptimizeICCProfile but got the error below

Screenshot 2022-04-01 at 2 55 11 PM

@sbraty
Copy link

sbraty commented Apr 8, 2022

Error, i cant reproduce, but got same problem with colors after transform.

After reading code i found out, this part of code works strange.

Why we should ignore embeded profile if image has it. It's true only for images with CMYK color space

cc @alon-ne

@sbraty
Copy link

sbraty commented Apr 8, 2022

@Elad-Laufer can you look at comment above. Why did you prevent using embeded color profile at image with CMYK color space ?

@vaidhyanathan-ananthakrishnan-13
Copy link
Author

@sbraty

Is there any workaround for this ?

@sbraty
Copy link

sbraty commented Apr 27, 2022

@sbraty

Is there any workaround for this ?

im using my own fork

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

No branches or pull requests

2 participants