[SciPy-User] overflow
Mr Nilsson
super.inframan at gmail.com
Sat Jul 10 16:21:52 EDT 2010
Hey
Im working on a photo processing tool using numpy arrays to store the
pixel data. I am currently in the process of adding 8 and 16bit
support to my system in addition to float32.
The problem is that when working with uint8 and uint16 numpy overflows
the values of my pixels when I for example multiply (brighten) an
image, making bright pixels dark again.
Is there a way to have numpy clip the values to the maximum value of
whatever dtype is used instead of overflowing?
cheers
Gusty
More information about the SciPy-User
mailing list