I've run into a problem with the C API function ShadeImage(), and I'm wondering if it's a bug or I'm misunderstanding something. The API documentation describes the parameter gray as
A value other than zero shades the intensity of each pixel.
But this seems to be the opposite of the true function. Indeed, in the code (effect.c line 3896), the logic is something like
if(gray)
color = computed shade
else
color = color * computed shade
i.e. shades the intensity of each pixel in the else, which is the case of gray==0! Am I misunderstanding how this is supposed to work?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've run into a problem with the C API function ShadeImage(), and I'm wondering if it's a bug or I'm misunderstanding something. The API documentation describes the parameter
gray
asBut this seems to be the opposite of the true function. Indeed, in the code (
effect.c
line 3896), the logic is something likei.e. shades the intensity of each pixel in the
else
, which is the case ofgray==0
! Am I misunderstanding how this is supposed to work?