-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Color management support #22951
Comments
Does imagick supports it? |
Here are three small files which show the problem if someone wants to reproduce this. They should all look the same if handled correctly. Sadly this affects all images generated by my Canon DSLR, so all images I have look wrong when looked at via nextcloud. |
I don't think that we will be able to fix this. |
There are other PHP apps which don't have this bug, so I think it should be fixable :) For example https://lycheeorg.github.io: |
This comment was marked as outdated.
This comment was marked as outdated.
Thanks for the pointer, @lazka, I think this is the ImageMagick things going on in Lychee that make image profiles work: https://github.com/LycheeOrg/Lychee/blob/376f8c7c9c463816252319dcbdab2975d221ed8a/app/Image/ImagickHandler.php#L93-L110 So, @skjnldsv, this means ImageMagick does support this. Probably, this should be easy to integrate here too, but I've got no clue of the Nextcloud code base. Anybody who wants to give it a try? |
This comment was marked as resolved.
This comment was marked as resolved.
Is there any information missing here? |
This results in noticeably ugly colors if image uses ProPhoto RGB color profile. As monitor and camera technology is improving, more people will be using color profiles such as this (non sRGB). Color distortion is unpleasant enough to make nextcloud unusable as photo gallery for such photos. |
I would really love to have the colour profile issue addressed. As a photographer I am forced to deliver images in the sRGB colour space as those viewing non-sRGB images would think I have poorly edited the colours. Other services like Dropbox can manage colourspaces just fine, it would be good if this could be looked at. |
Lychee uses ImageMagick to resize images. Afaik it's not possible to tell GD to keep the ICC profile: libgd/libgd#136 / https://stackoverflow.com/questions/5773032/how-to-stop-gd2-from-washing-away-the-colors-upon-resizing-images Option 1) Use ImageMagick to generate the thumbnails. This should be opt-in as ImageMagick is not available by default and is often disabled for security reasons. The current implementation is: https://github.com/nextcloud/server/blob/051518cd63cdbb9ff0a47deaacea65f6a0df0b06/lib/private/legacy/OC_Image.php You need to copy the class and rewrite every function to do the same but use the ImageMagick functions. As GD is usually available it's probably fine to rewrite only some functions to use the ImageMagick code. In this case I would recommend to extend the original OC_Image implementation. https://github.com/nextcloud/server/blob/051518cd63cdbb9ff0a47deaacea65f6a0df0b06/lib/private/Preview/Image.php is the provider to trigger the preview generation. I guess we need some switch here to use default (GD) or ImageMagick. Option 2) Since Nextcloud 24 it's possible to use https://github.com/h2non/imaginary to generate image previews: https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#previews If you are lucky imaginary does not drop the ICC profile (and it's super fast). Try it ;) |
hm, imaginary looks kinda abandoned, the docker image hasn't been updated in two years. I'll give it a try though, thanks for the tip. |
I've tried it now, but nextcloud passes I've filed a bug: h2non/imaginary#397 (though it looks abandoned, so I don't expect it to get fixed really, but we'll see) |
This sounds like a feature request to me. |
Hi! |
Same here with my Pixel. Takes photos & videos in DCI-P3, Nextcloud doesn't show them correctly in the previews. |
Agree with this request! I edit my pictures on the computer and then put them in albums. The pictures are all in AdobeRGB and they look very pale in the thumbnails. Zooming in makes the color pop - although the clients usually keep only 2-3 pictures in memory and if I come back to a picture previously zoomed into, it may be pale again. Proper conversion of AdobeRGB pictures would be nice. |
ICC profiles of photos are ignored. If photos have an Adobe RGB profile, they are displayed too pale. All thumbnails are displayed incorrectly: in Files, Photos and Viewer. The thumbnails should have the same ICC profile as the original photos. Until now, the preview images lose their ICC profile.
Here is an example in Viewer. The first photo has an sRGB profile. For the second photo, the profile of the photo was converted to an Adobe RGB profile.
Background: More and more cameras are recording with the Adobe RGB profile, which is significantly larger in terms of color gamut. If photos with an Adobe RGB profile are used in Nextcloud, they are displayed incorrectly.
The text was updated successfully, but these errors were encountered: