I'm saving an Image using this code:
var error = convert_image.save_png(img_name)
According to the docs, error is now an Error, an enum defined in the Image class.
But how would I now check if error is Error.OK?
This does not work:
if error != Image.Error.OK:
print("Error: " + str(error))
And it does not give me auto completion either in the editor.
This does work:
if error != OK:
But how does it now that it's Error.OK and not some other OK? Is there a way to use Error.OK?