(12-19-2023, 04:08 PM)rich2005 Wrote: Whatever the outcome, it will not be a problem for new users who will use the new working Gimp 2.10 plugin
The script code is almost unchanged between the two versions, it just adds the image ID as a parameter in the plugin call. So it is probably a matter of the pixelize plugin doing the Right Thing with gamma correction (unlike its ancestor).
If you pixellize an image made of 50/50 black and white pixels:
- In Gimp 2.8, the result is the color (127,127,127) because Gimp computes the average of the pixel values directly, and these are gamma-corrected. And if you look at an area filled with the 50/50 pattern size by side with an area filled with (127,127,127), the color area is noticeably darker.
- In Gimp 2.10, the result is the color (188,188,188) because Gimp
- converts the [0..255] values to linear values: 0.0 and 1.0 , in this case
- computes the average value: 0.5
- applies the gamma correction with a 2.2 gamma: 0.5 ** (1/2.2) = 0.723 (*)
- scales to [0..255].
- converts the [0..255] values to linear values: 0.0 and 1.0 , in this case
- And if you do the side-by-side test above on a good display you can hardly tell the difference (it is actually a good way to test your display settings....)
(*) the actual formula is a bit more complex than this