Reputation: 23
croppedImage = image.crop(200, 200, 200, 200)
window = Window(800, 800)
window.add(croppedImage)
window.wait()
window.close()
Error message: ParameterTypeError: Incorrect type for parameter 'graphic' : NoneType, expected GraphicalObject
Upvotes: 2
Views: 183
Reputation: 35089
This usually means that the crop
function works by changing the image object it is applied to, instead of creating a new one - ie, you want to do this:
image.crop(200, 200, 200, 200)
window.add(image)
window.wait()
window.close()
Upvotes: 8