Jump to content

kenkawakenkenke

Newbies
  • Posts

    1
  • Joined

  • Last visited

Everything posted by kenkawakenkenke

  1. Dear fellow users, I often use the "Adjustments" > "Hue/Saturation" > "Saturation" to make adjustments to single files, but have recently had the need to do the same adjustments on a large batch of images. To do this, I resorted to writing a Java program to scale the saturation of an image by a set amount, at which point I realized that the result of simply scaling the saturation of every pixel does not match the output of paint.net. My question is, does anyone know exactly what the saturation adjustment operation on paint.net does? These are the things I have found out so far, when adjusting the "Saturation" of an image to, say, "150" on paint.net: - the saturation of pixels are multiplied by 1.5, up to 1 (i.e newSat=min(1, oldSat*1.5) ) -> Each point represents a pixel in an image that was adjusted on paint.net. The horizontal axis is the saturation before, and the vertical is the saturation after the adjustment. You can see that pixels that had saturation below 1/1.5 before are scaled by (roughly) 1.5, but those above are set to 1. - the value, for some reason, also changes in a similar way to the saturation. (i.e newVal=min(1, oldVal*1.5) ) - the hue remains constant for pixels that don't reach saturation=1, but they change in an unpredictable way for pixels with sat=1 -> the plot of the "error" in hue of each pixel, against its original saturation. From the above, I can vaguely recreate the adjustments done by paint.net by scaling both value and saturation, but not exactly because 1) the scaling of sat/value don't exactly match the scaling factor 2) the hue changes in some unpredictable way I would be thankful if anyone can tell me how, exactly, paint.net adjusts an image when altering the saturation. I hope no-one sees this as an attempt to "reverse engineer" paint.net (which it is, sort of, but not in any malicous way.) Thanks in advance. ken
×
×
  • Create New...