Dithering from 16 bit to 8 bit

Here everybody can post his problems with PhotoLine
Benutzeravatar
shijan
Mitglied
Beiträge: 1521
Registriert: Mo 23 Dez 2019 15:21
Wohnort: Ukraine

Re: Dithering from 16 bit to 8 bit

Beitrag von shijan »

Seems not a bug. Everything works as expected. 8 bit just not enough to represent smooth tonal data in linear gamma. You will see ugly pixel noise in any 8 bit image with linear gamma.

- When you use Web Export image always TRANSFORMS from document color space/gamma/bit depth to sRGB color space/gamma and 8 bit depth.

- But when you simply change bit depth in document or image settings, you don't change gamma or color space. You change only bit depth.

Linear gamma ONLY for 32 or 16 bit images.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
bruce1951
Mitglied
Beiträge: 413
Registriert: Sa 23 Apr 2016 17:03

Re: Dithering from 16 bit to 8 bit

Beitrag von bruce1951 »

I've been following along. Dumb question!! How relevant is PPI?
Juan
Mitglied
Beiträge: 613
Registriert: Do 06 Okt 2011 08:08

Re: Dithering from 16 bit to 8 bit

Beitrag von Juan »

Herbert123 hat geschrieben: Di 01 Sep 2020 22:25 Workaround for now: export your 16/32bit EXR as a PNG file via Web Export. This generates a usable 8bit conversion. Do not reduce the bit depth in the Layer properties to 8bit, and continue to work in either 32bit or 16 bit.
This helped a lot, thank you for the workaround. :idea:
shijan hat geschrieben: Mi 02 Sep 2020 00:04 Check part of this workflow tutorial here. It explains how to adjust phisically based Exposure in non RAW files.
That´s a must for me to read. I will follow your suggestions as well. :)


Maybe the developers can pitch in to confirm if there is a bug or not.

Thank you all for the comments, at least for now since I have to deliver this now, the quick workaround did the trick.

Cheers,
Juan
Benutzeravatar
shijan
Mitglied
Beiträge: 1521
Registriert: Mo 23 Dez 2019 15:21
Wohnort: Ukraine

Re: Dithering from 16 bit to 8 bit

Beitrag von shijan »

Pros of Linear Gamma:
- Linear gamma is perfect for EXR export from 3D apps renders, because it behaves like some sort of seni-RAW file that contains all possible wide colors and all possible high dynamic tonal range existed in 3D scene.
- Linear gamma is perfect for film negative scanning, because it behaves like some sort of semi-RAW file and contains all possible wide colors and all possible high dynamic tonal range. See some info here https://www.pl32.com/forum3/viewtopic.p ... =15#p46765
- Linear gamma is perfect for image resize. See some tests here https://www.pl32.com/forum3/viewtopic.p ... =75#p46871
- Linear gamma is perfect for color space transformations, because it never produce color casts.
- Linear gamma is perfect for White Balance adjustments. RGB gain in Linear gamma is equal to White Balance in RAW (with some limitations due bit depth). See some tests and workflow explanation here https://forum.blackmagicdesign.com/view ... 2&t=114403
- Linear gamma is perfect for Exposure adjustments. Gain adjusted in Linear gamma is equal to physically correct Exposure adjusted in RAW. See some tests and workflow explanation here https://forum.blackmagicdesign.com/view ... 25#p537852
- Linear gamma may produce very nice, physically correct look with some blending modes and fades.

Cons of Linear Gamma:
- Require 32 or 16 bit depth. Always will produce posterization artifacts in 8 bit.
- Not usable for most normal color correction tools. Curves and contrast adjustments behave rough, invert looks strange, and so on...
- Not usable for web delivery or basic preview for client.

Overall Linear gamma is sort of unique tool that works well in some specific situations. Just make sure you understand how convert to linear gamma and back for some specific tasks and how it interact with image ICC profile and the rest of color management.

PhotoLine tools options for Linear gamma are not too extended. You can do to/from linear gamma transformations in "Convert with Color Profile" tool. And you also have gamma function slider in some tools (i didn't test it, but probably it should work like real gamma correction because PhotoLine tools can operate internally in 32 bit float.
Also in last versions of PhotoLine you can use custom generated high precision 1D LUTs for quick non destructive gamma transformations from/to. Free tools like LUTCalc https://cameramanben.github.io/LUTCalc/ ... index.html allow to generate 1D LUTs with up to 16384 point precision.

Note that Adobe Protoshop gamma correction slider in Levels/Exposure tool is useless for real gamma transformation. It is a fake simplified tool that operates in reduced bit depth and have nothing to real gamma transformation math.

Seems PhotoLine really lack of some proper gamma/color space mapping Adjustment layer tool to deal in one click with linear EXR files from 3D renders. Something similar to ColorSpace Transform Node with Saturation and Luma mapping sliders in Davinci Resolve.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Zuletzt geändert von shijan am Mi 02 Sep 2020 21:23, insgesamt 4-mal geändert.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
Martin Huber
Entwickler
Entwickler
Beiträge: 4169
Registriert: Di 19 Nov 2002 15:49

Re: Dithering from 16 bit to 8 bit

Beitrag von Martin Huber »

Juan hat geschrieben: Mi 02 Sep 2020 08:16 Maybe the developers can pitch in to confirm if there is a bug or not.
It's not a bug.

As shijan wrote, the main problem is the linear color space.
If you convert gradients or gradient like structures from 16/32 bit to 8 bit in linear colorspace, you will either get visible dithering or really bad banding.

So before converting to 8 bit, convert to a color space with a gamma of 2.2 or 1.8 (for viewing purposes, sRGB is well-suited which has a gamma of about 2.2). "Web Export" does that implicitily.

"Convert Layer Type" (that's what the Layer Attributes are using) has a small bug, though. It ignores the antialiasing setting and dithers always. I will fix that.

Martin
Martin Huber
Entwickler
Entwickler
Beiträge: 4169
Registriert: Di 19 Nov 2002 15:49

Re: Dithering from 16 bit to 8 bit

Beitrag von Martin Huber »

der_fotograf hat geschrieben: Di 01 Sep 2020 19:00 The »Antialias« settings are kind of confusing. You can enable the antialias in the panel, but in the »Document« settings it still is set to »Default«.
If the document setting is "Default", the document uses the global settiing. The global setting is the button in the iconbar or "Edit > Antialias".

Martin
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2163
Registriert: Sa 12 Mai 2012 21:38

Re: Dithering from 16 bit to 8 bit

Beitrag von Herbert123 »

Thanks Martin and Shijan for the clarifications!
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
Benutzeravatar
der_fotograf
Mitglied
Beiträge: 564
Registriert: Mo 05 Dez 2016 08:33

Re: Dithering from 16 bit to 8 bit

Beitrag von der_fotograf »

If the document setting is "Default", the document uses the global settiing. The global setting is the button in the iconbar or "Edit > Antialias".
Thanks Martin, I've checked it and noticed that the global setting is »Antialias«. BTW, I can not see any difference on the screen if switching back and forth... at least with 120 MP files. Maybe it's more visible in lower res files?
Nur wenige wissen, wie viel man wissen muss, um zu wissen, wie wenig man weiss.
Only few know how much you have to know to know how little you know.
— Werner Heisenberg [German theoretical physicist]
Martin Huber
Entwickler
Entwickler
Beiträge: 4169
Registriert: Di 19 Nov 2002 15:49

Re: Dithering from 16 bit to 8 bit

Beitrag von Martin Huber »

der_fotograf hat geschrieben: Do 03 Sep 2020 07:56BTW, I can not see any difference on the screen if switching back and forth... at least with 120 MP files. Maybe it's more visible in lower res files?
With image editing, the differences are barely visible.

They are mostly visible in linear colorspace and in combination with vector graphics/text.

Martin