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

bug: color profile ignored #96

Open
jg4M3H opened this issue Oct 7, 2021 · 15 comments
Open

bug: color profile ignored #96

jg4M3H opened this issue Oct 7, 2021 · 15 comments

Comments

@jg4M3H
Copy link

jg4M3H commented Oct 7, 2021

Exported TIFF doesn't contain original color profile.

@trufanov-nok
Copy link
Owner

trufanov-nok commented Oct 9, 2021

And the source image is TIFF too?

Just to make sure: We are talking about embedded ICC Profiles, right?

@jg4M3H
Copy link
Author

jg4M3H commented Oct 9, 2021

  1. And the source image is TIFF too?
  2. Just to make sure: We are talking about embedded ICC Profiles, right?

Yes.
Yes.

You can manually extract ICC profile using ExifTool and later inject them in exported TIFFs.
But it's making process more complicated than it should be.

@trufanov-nok
Copy link
Owner

Are you using a Linux machine?

@jg4M3H
Copy link
Author

jg4M3H commented Oct 9, 2021

Windows 10.

@trufanov-nok
Copy link
Owner

It seems the best option to copy such metadata from various image formats into resulting Tiff image would be using exiv2 library. If you would be a Linux user I could do that and ask you to rebuild the ST from actual sources. But for Windows users any update requires building the project for Windows, which is a quite painful and will require building exiv2 for Windows too. So, I'll try to fix this when a new ST be ready.

@jg4M3H
Copy link
Author

jg4M3H commented Oct 16, 2021

Any date for new release? I planning to write guide for community. Part of it requires using this program. Colors important for us.

@trufanov-nok
Copy link
Owner

Ok, I'll try to drop a bugfix release during next few days

@trufanov-nok
Copy link
Owner

Could you check one of these distributives? The ICC data propagation is disabled by default and you need to enable it in Settings/Output/Image Metadata. The problem is that embedded ICC profile is colorspace dependant. And ST changes bcs of the user choice (conversion to b/w at output processing step) or tries to change colorspace to optimal sometimes. For ex. I faced a problem when ST found out that all pixels in RGB image with ICC are the shades of gray and tried to convert it to grayscale colorspace in a resulting image. In this case GIMP raised ICC profile incompobility error for resulting image after ICC copiyng. So, I kept it turned off by default till all underwater stones will be found.
scantailor-universal-0.2.13-64bit-install.zip
scantailor-universal-0.2.13-32bit-install.zip
If it works I'll drop a release.

@jg4M3H
Copy link
Author

jg4M3H commented Oct 20, 2021

Work as expected for me. Thanks! ❤️

Possible enhancement: preview displaying with original ICC.

@jg4M3H
Copy link
Author

jg4M3H commented Oct 21, 2021

Sorry, tested again with ExifToolGUI.exe. I was comparing to wrong output.
Output from .tiff with Adobe RGB ICC doesn't contain ICC profile.

Option is enabled in settings.

Made test tiff file with Adobe RGB ICC. Produced output without ICC.
scan_tailor_icc_test.zip

exiv2 -pC scan_tailor_icc_test.tif

Displaying ICC information.

Can extract with exiv2 -eC scan_tailor_icc_test.tif, ICC Profile Inspector correctly reading this extracted ICC.

@trufanov-nok trufanov-nok reopened this Oct 21, 2021
@trufanov-nok
Copy link
Owner

Hm, I've tried to process the attached image with both Linux and Win64 (under Wine) releases - the result in out/scan_tailor_icc_test.tif does contain ICC profile. Probably some processing step interfere? Could you send me a .ScanTailor 1-page project file so I can repeat the transformations applied?

@jg4M3H
Copy link
Author

jg4M3H commented Oct 21, 2021

I determined what this is path related issue: Russian characters (utf-8).
Try place tiff in folder Tailor @!$%^#'. Буквы Test ICC.

@trufanov-nok
Copy link
Owner

Ok, should be fixed now, pls check these binaries
scantailor-universal-0.2.13-32bit-install.zip
scantailor-universal-0.2.13-64bit-install.zip

@jg4M3H
Copy link
Author

jg4M3H commented Oct 21, 2021

Working correctly.
But on Linux can also be utf-8 filenames?

@trufanov-nok
Copy link
Owner

Exiv2 doesn't provide utf variant of API for Linux for some reason:
https://github.com/Exiv2/exiv2/blob/old-master/include/exiv2/basicio.hpp#L245
And russian paths work on my linux machine. So I guess it's just properly converted to the system locale...

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

No branches or pull requests

2 participants