Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting photo into raster
#16
(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].
  • 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....)
So it looks like I have to review the script to be more faithful in 2.10...

(*) the actual formula is a bit more complex than this
Reply


Messages In This Thread
Converting photo into raster - by cyclist - 12-18-2023, 03:12 PM
RE: Converting photo into raster - by rich2005 - 12-18-2023, 04:09 PM
RE: Converting photo into raster - by cyclist - 12-18-2023, 04:24 PM
RE: Converting photo into raster - by Ofnuts - 12-18-2023, 06:16 PM
RE: Converting photo into raster - by cyclist - 12-18-2023, 06:48 PM
RE: Converting photo into raster - by Ofnuts - 12-18-2023, 09:14 PM
RE: Converting photo into raster - by cyclist - 12-18-2023, 09:46 PM
RE: Converting photo into raster - by Ofnuts - 12-18-2023, 11:36 PM
RE: Converting photo into raster - by rich2005 - 12-18-2023, 07:50 PM
RE: Converting photo into raster - by rich2005 - 12-19-2023, 09:43 AM
RE: Converting photo into raster - by Krikor - 12-19-2023, 02:11 PM
RE: Converting photo into raster - by rich2005 - 12-19-2023, 02:37 PM
RE: Converting photo into raster - by Krikor - 12-19-2023, 03:38 PM
RE: Converting photo into raster - by rich2005 - 12-19-2023, 04:08 PM
RE: Converting photo into raster - by Ofnuts - 12-19-2023, 09:54 PM
RE: Converting photo into raster - by rich2005 - 12-20-2023, 08:56 AM
RE: Converting photo into raster - by Ofnuts - 12-20-2023, 09:31 AM
RE: Converting photo into raster - by rich2005 - 12-20-2023, 09:38 AM

Forum Jump: