Inaccurate pixelize colors? - 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: Inaccurate pixelize colors? (/Thread-Inaccurate-pixelize-colors) |
Inaccurate pixelize colors? - Spoofer - 07-22-2019 I'm relatively new to both GIMP and image editing, so I don't know if this is due to my own inexperience or if I'm noticing something weird in GIMP (2.10.12, Windows 10). Is the Pixelize filter supposed to apply the average color within and to each block subsection? And if I expand the block size to cover the entire selection, that should act as a way to average the entire selection? And should the average found via the histogram's mean RGB values match the average after the pixelization filter is used? Either that doesn't always seem to be the case, or I'm misunderstanding something. I noticed the issue while using GIMP for a retexturing project for the old game Team Fortress Classic where I'm basically pixelizing the textures and adding a grid to reduce detail and streamline the look (https://www.youtube.com/watch?v=OekLawHEfi8, early attempt before I streamlined it further). Take this one example image: https://drive.google.com/file/d/1vOT8MuEPBjbJUy0S62UKbsmVV1H7xSjL/view?usp=sharing I convert its mode to RGB, then select the bottom 16 pixel row to pixelize, and whether I pixelize the entire row or just one 16x16 square, I get a different end result via pixelize than I get via the histogram's average, or via a plugin like ofn-average-fill found here: https://sourceforge.net/projects/gimp-tools/files/scripts/ Before pixelizing, histogram tells me the mean RGB of the selection is 21.2/19.9/19.9, and after pixelizing the entire row as one block, the RGB is 27.5/27.8/28.2. Please let me know if it's me misunderstanding how pixelize (or any other step in the process) is supposed to work, or if it's a bug in the program. Thanks. =x RE: Inaccurate pixelize colors? - Ofnuts - 07-22-2019 Experiment: same image, make a gamma-corrected and a linear version. Filter>Blur>Pixelize the whole image. The two images produce the same color (make a screenshot with the two images side by side, import into Gimp, explore with Pointer dialog), yet the average of the gamma-corrected value is unlikely to be the same as the one of the linear values. It appears that Gimp does the average of the gamma-corrected values whether the image is linear or gamma-corrected, because this is how our eyes see it. If you use the pointer dialog, you'll notice that the RGB(%) display and the "pixel" display aren't the same in a linear image but are identical in a gamma corrected image. RE: Inaccurate pixelize colors? - tmanni - 07-23-2019 Pixelize operates in RGB linear (pre-multiplied alpha) https://gitlab.gnome.org/GNOME/gegl/blob/master/operations/common/pixelize.c#L116 |