Gimp-Forum.net
Question regarding Precision Setting - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Question regarding Precision Setting (/Thread-Question-regarding-Precision-Setting)



Question regarding Precision Setting - ajax - 07-02-2022

I recently read a tutorial where the procedure involved first converting an image to 32 bit floating point (FP) precision.  It now occurs to me that this might be wise/appropriate as a general rule.  In that, convert all images to 32 bit FP for the purpose of editing.  Do the conversion before anything else.  Then at the end of the editing pipeline the image can be converted to whatever precision is desired for the final product.

I have started experimenting with this idea but can NOT yet say I have much knowledge about the pros and cons.  However, I'm sort of guessing that one consequence of storing GIMP files (i.e., .xcf format) in 32 bit precision is that they will be larger (maybe a lot larger).  However, even if GIMP files are stored after performing editing operations in a lower precision format it might still make sense to perform edits in 32 bit FP precision.  Absent any real knowledge or experience I'd be thinking the benefit would be greater precision (? computational dynamic range) is the results.

Would love to here what real experts might have to say about such an approach.


RE: Question regarding Precision Setting - Ofnuts - 07-02-2022

Yes, using 32-bit floating-point takes 4 times more RAM than 8-bit. On the other hand, there is much less color loss during color operations, and you avoid round off errors than show as artefacts. The latter is fairly frequent when you use layer blend modes. Try this yourself:
  • Create a 800x800 image in 32-bit FP precision
  • On the  base layer, make a black to white horizontal gradient
  • Add a layer, make a black to white  vertical gradient
  • Put the top layer in Grain extract mode: the gray diagonal area should remain smooth
  • Use Image ➤ Precision to switch to 8-bit integer: banding/moiré appears in that diagonal area
This "precision" only applies on how the data is stored in layers. All computations are done in 32-bit FP, which means conversions happen before and after... unless you use 32-bit FP, which, not requiring conversions, can be a bit faster, too.


RE: Question regarding Precision Setting - ajax - 07-04-2022

(07-02-2022, 09:13 PM)Ofnuts Wrote: ...

This "precision" only applies on how the data is stored in layers. All computations are done in 32-bit FP, which means conversions happen before and after... unless you use 32-bit FP, which, not requiring conversions, can be a bit faster, too.
Very helpful.  Thank you.

However, this does raise another question.  When I elect to convert to 32 bit FP there is an option that allows for selecting either "Perceptual gamma" or "Linear light".  If GIMP is making such conversions on all operations which of these might it be choosing?  Or is there some reason for this option NOT applying?  I'm afraid I do NOT understand the difference.


RE: Question regarding Precision Setting - Ofnuts - 07-04-2022

(07-04-2022, 05:54 PM)ajax Wrote:
(07-02-2022, 09:13 PM)Ofnuts Wrote: ...

This "precision" only applies on how the data is stored in layers. All computations are done in 32-bit FP, which means conversions happen before and after... unless you use 32-bit FP, which, not requiring conversions, can be a bit faster, too.
Very helpful.  Thank you.

However, this does raise another question.  When I elect to convert to 32 bit FP there is an option that allows for selecting either "Perceptual gamma" or "Linear light".  If GIMP is making such conversions on all operations which of these might it be choosing?  Or is there some reason for this option NOT applying?  I'm afraid I do NOT understand the difference.

Gamma is only useful in 8-bit precision (or very moderately in 16-bit integer). Internally Gimp works in "linear light".


RE: Question regarding Precision Setting - rich2005 - 07-05-2022

A little old now, but shows the difference between Gamma and Linear https://ninedegreesbelow.com/photography/test-for-linear-processing.html

Worth browsing through the articles.