1
任何人都可以幫我解決這個問題嗎?Jython JES:改變圖像亮度不起作用
我是新來的Jython/Python的(一般的編碼),目前我使用的是納入這一計劃稱爲JES這讓我改變圖像容易等
所以我的圖書館嘗試通過使用2個輸入來改變圖像亮度,圖片和數量。
def change(picture, amount):
for px in getPixels(picture):
color = getColor(px)
alter = makeColor(color * amount)
setColor(px, alter)
我試過很多其他的方法,但他們似乎沒有工作。圖片輸入已經被分配了一個圖像btw。
我在終端鍵入改變運行程序(圖0.5),這應該使明亮的圖像50%,但我不斷收到此錯誤:
>>> 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.
你們能幫助我嗎?謝謝