[Wontdo] Gamma error in picture scaling

Having tech problems? Post them here and do not worry, there is always a solution for you.
Post Reply
es
Posts: 114
Joined: Sun Dec 04, 2022 6:24 pm

[Wontdo] Gamma error in picture scaling

Post 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
Attachments
GC
GC
gamma scaling GC.png (97.43 KiB) Viewed 1185 times
Preview
Preview
gamma scaling Preview.png (337.86 KiB) Viewed 1185 times
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Gamma error in picture scaling

Post 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.
es
Posts: 114
Joined: Sun Dec 04, 2022 6:24 pm

Re: Gamma error in picture scaling

Post 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)
Attachments
Archive.zip
(184.29 KiB) Downloaded 109 times
gamma_dalai_lama_gray.jpg
gamma_dalai_lama_gray.jpg (82.9 KiB) Viewed 1176 times
gamma_dalai_lama_gray_tft.jpg
gamma_dalai_lama_gray_tft.jpg (102.17 KiB) Viewed 1176 times
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Gamma error in picture scaling

Post 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 1166 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.
es
Posts: 114
Joined: Sun Dec 04, 2022 6:24 pm

Re: Gamma error in picture scaling

Post 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?
Attachments
scale50.png
scale50.png (465.69 KiB) Viewed 1161 times
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Gamma error in picture scaling

Post by forum_adm »

View at i.e. 50% just uses the quick Core Image scaling - not gamma aware.
es
Posts: 114
Joined: Sun Dec 04, 2022 6:24 pm

Re: Gamma error in picture scaling

Post 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
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Gamma error in picture scaling

Post by forum_adm »

That is currently not possible due the usage of the Apple graphics engine for display.
Post Reply