can anyone help me out here?
I'm new to Jython/Python (coding in general) and I'm currently using the library that is included into this program called JES which allows me to alter images easily etc.
So I'm try to alter this images brightness by using 2 inputs, the picture and the amount.
def change(picture, amount):
for px in getPixels(picture):
color = getColor(px)
alter = makeColor(color * amount)
setColor(px, alter)
An I've tried many other methods but they don't seem to work. The picture input has already been assigned an image btw.
I run the program in terminal by typing change(picture, 0.5) which should make the image 50% brighter but I keep getting this error:
>>> change(picture, 0.5)
The error was: 'instance' and 'float'
Inappropriate argument type.
An attempt was made to call a function with a parameter of an invalid type. This means that you did something such as trying to pass a string to a method that is expecting an integer.
Can you guys help me out? Thanks