Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PNG vs JPG color off by 1
#2
There could be a bug(*). But in practice, Gimp 2.10 doesn't work with integer values for color channels, all the processing is done in floating point,  and your [0..255] colors are converted to floating point after applying a gamma correction, which for some values can put them close to a tipping point for a round-off. The integer values are accepted in scripts for compatibility.

IMHO unless you are using a rare built-in Gimp filter there are more efficient ways to do you image processing. There are image processing libraries around (pillow, the Python binding for ImageMagick....). Also, the image processing core of Gimp is called GEGL and can be used independently of Gimp.


(*) feel free to report it here.

PS: gimpcolor.RGB(int(rgb[0]), int(rgb[1]), int(rgb[2])) ? gimpcolor.RGB(*map(int,rgb))!
Reply


Messages In This Thread
PNG vs JPG color off by 1 - by af_luther - 06-16-2021, 11:08 PM
RE: PNG vs JPG color off by 1 - by Ofnuts - 06-17-2021, 07:28 AM
RE: PNG vs JPG color off by 1 - by af_luther - 06-17-2021, 04:17 PM
RE: PNG vs JPG color off by 1 - by Ofnuts - 06-17-2021, 07:32 PM
RE: PNG vs JPG color off by 1 - by af_luther - 06-17-2021, 07:52 PM
RE: PNG vs JPG color off by 1 - by Ofnuts - 06-17-2021, 07:59 PM
RE: PNG vs JPG color off by 1 - by af_luther - 06-17-2021, 08:59 PM
RE: PNG vs JPG color off by 1 - by Ofnuts - 06-18-2021, 12:19 AM

Forum Jump: