Page 1 of 1

[Wontdo] Gamma error in picture scaling

Posted: Tue Dec 06, 2022 9:14 pm
by es
I've run this test with GC [url]http://www.ericbrasseur.org/gamma.html[/url] and found that at 50% in the Editor the picture disappears (shows as grey), while Preview handles it just fine
(also interestingly enough, the 50% zoom looks different in GC, not sure why, I've checked that the zoom is 50% in Preview by comparing it with the Xee3 viewer that has numbers and at 50% also shows the same size as in the Preview with two zoom out steps)

It seems to be similar to this old issue viewtopic.php?p=24875&hilit=Gamma+error ... ing#p24875, but then selecting "Best Interpolation" for the scaling interpolation and unchecking "gamma aware scaling" (all were set by default in the app)
Neither did "General→Display content→Image→Interpolation" or "Optimized display" help

Re: Gamma error in picture scaling

Posted: Wed Dec 07, 2022 8:04 am
by forum_adm
The scaling is done by the Apple Core Image routines. So, I can't change anything for the standard scaling.

Please email the image to support@lemkesoft.de
Because your written website is down.

Re: Gamma error in picture scaling

Posted: Wed Dec 07, 2022 11:35 am
by es
The zip file referenced on the website had two jpg files, I've attached them here and also attached in an archive just in case the forum messes up with jpgs or something.
The scaling is done by the Apple Core Image routines. So, I can't change anything for the standard scaling.
Another interesting point, but then how does Preview manages to get it right (though per this site it also had scaling issues some time ago)? Does it use some other Apple image routines or something?
(as a side note: as far as I understand, Xee3 app also relies on the system imaging pipeline, but it behaves correctly just like Preview at least at 50% scaling, but then at 25% scaling it looks worse (more gray) while Preview continues to display it correctly)

Re: Gamma error in picture scaling

Posted: Wed Dec 07, 2022 11:53 am
by forum_adm
I selected best interpolation, gamma-aware and 50%:
gamma_dalai_lama_gray2.jpg
gamma_dalai_lama_gray2.jpg (5.25 KiB) Viewed 2100 times
The image is rendered by the macOS for display in a window.

I render with Apple Core Image a cached version for display i.e. at 50%. Maybe Apple uses different routines in Preview.

Re: Gamma error in picture scaling

Posted: Wed Dec 07, 2022 12:09 pm
by es
Interesting, attached is a screenshot of all my options, and at 50% zoom with gamma and best interpolation it's bugged
In the bottom left corner is a window of Preview, and it's correct there (and looks nicer than in the browser, there are no horizontal lines there)

Upd: I see what's going on: this scaling window is for a special scaling editing operation, but what I meant was a regular "View at 50% zoom" NON-editing operation. So when you do the permanent edit with the Resize→Scale command and use the best algo etc, it's fine, the smaller picture also looks fine, but the Viewing is still broken.

Is it possible to make the regular viewing zoom also do "scaling" correctly?

Re: Gamma error in picture scaling

Posted: Wed Dec 07, 2022 12:14 pm
by forum_adm
View at i.e. 50% just uses the quick Core Image scaling - not gamma aware.

Re: Gamma error in picture scaling

Posted: Wed Dec 07, 2022 12:56 pm
by es
forum_adm wrote: Wed Dec 07, 2022 12:14 pm View at i.e. 50% just uses the quick Core Image scaling - not gamma aware.
Is it possible to add an option to change that? The View scaling is used all the time unlike the Editing scaling, so it'd be great to have it look properly

Re: Gamma error in picture scaling

Posted: Wed Dec 07, 2022 3:33 pm
by forum_adm
That is currently not possible due the usage of the Apple graphics engine for display.