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

Added icc profile routines #208

Merged
merged 15 commits into from May 16, 2024
Merged

Added icc profile routines #208

merged 15 commits into from May 16, 2024

Conversation

SalOne22
Copy link
Owner

@SalOne22 SalOne22 commented May 3, 2024

@Mikachu2333 this PR adds support for images with icc profile. Could you check that everything work as expected now?
closes #138

@SalOne22 SalOne22 requested a review from Mikachu2333 May 3, 2024 15:59
@Mikachu2333
Copy link
Collaborator

Mikachu2333 commented May 4, 2024

The first img (0047.jpg) would still change color when using default values, for example .\rimage moz *.jpg -s _u. I think it may caused by the option --dithering and I use --dithering 100 to avoid it but nothing happened, this pic's color still be changed from red to green.

(To be honest, it's really hard to distinguish whether the color has changed, and I even believe that the color change in the image is caused by the encoding of the mozjpeg itself.)

(build with gnu target on windows10)

图片
图片

Copy link
Collaborator

@Mikachu2333 Mikachu2333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When input a bmp pic which has a icc tag and output with other codec, rimge output it with wrong color.

e

bmp.zip

@SalOne22
Copy link
Owner Author

SalOne22 commented May 5, 2024

pic's color still be changed from red to green.

I suppose that it because I apply ICC profile to srbg profile, so some colors can be loss. I will create another issue to add --preserve flag that will preserve ICC profile on codecs that support metadata.

When input a bmp pic which has a icc tag and output with other codec, rimge output it with wrong color.

This is issue in zune-bmp, decoded image doesn't have ICC profile

@Mikachu2333
Copy link
Collaborator

This is issue in zune-bmp, decoded image doesn't have ICC profile

Will this be fixed or just mark as a note in readme, or maybe we'd better make an issue in Here ?

add --preserve flag that will preserve ICC profile on codecs that support metadata

This option is for all supported codecs (include input only codec) or just the formats that allow both input and output? And, some codecs doesn't support icc feature such as qoi etc.

@SalOne22
Copy link
Owner Author

SalOne22 commented May 5, 2024

Will this be fixed or just mark as a note in readme, or maybe we'd better make an issue in Here ?

Create an Issue in zune-image

This option is for all supported codecs (include input only codec) or just the formats that allow both input and output? And, some codecs doesn't support icc feature such as qoi etc.

If input image has ICC profile and output codec supports writing ICC profile this option will preserve this as a tag in metadata. Otherwise will transform image to srgb profile or does nothing if image doesn't have ICC profile.

@Mikachu2333
Copy link
Collaborator

@SalOne22 icc feature in zune-bmp has been fixed.
etemesi254/zune-image#195

@SalOne22
Copy link
Owner Author

Okay, while we waiting for new release of zune-image, we can merge this now, and create a new pre-release with partial icc support. This will allow usage of new features, and after new zune-image version add support for bmp files (I don't think that most of the users will face this issue, most of the images on the web are in jpg/png format)

@Mikachu2333
Copy link
Collaborator

ok, and I'll approve this and start to work on the better-docs branch.

Mikachu2333
Mikachu2333 previously approved these changes May 16, 2024
@Mikachu2333 Mikachu2333 merged commit f093954 into main May 16, 2024
2 checks passed
@Mikachu2333 Mikachu2333 deleted the feature/icc-profile branch May 16, 2024 09:22
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

Successfully merging this pull request may close these issues.

[Bug]: Pics' color will be changed if contains an ICC tag.
2 participants