cyberdoggos / generator

CyberDoggos NFT Generator
MIT License
116 stars 56 forks source link

Lossy conversion from float64 to uint8. Range [0.0, 255.0]. Convert image to uint8 prior to saving to suppress this warning. #4

Closed alessandro-greco closed 2 years ago

alessandro-greco commented 2 years ago

Hello how can i solve this warn? Lossy conversion from float64 to uint8. Range [0.0, 255.0]. Convert image to uint8 prior to saving to suppress this warning.

Weberowsky commented 2 years ago

Same error

Im2rnado commented 2 years ago

You can fix it by updating the following code:

image = image.astype(np.uint8) right before imageio.imwrite(image_path, image)