mapbox / nodata

Because the pixels you can't see are harder than the ones you can.
MIT License
1 stars 3 forks source link

normalize to 255 for valid data #25

Closed perrygeo closed 9 years ago

dnomadb commented 9 years ago

@sgillies @perrygeo question: if for some reason we are dealing with / we want to deal with uint16 imagery, does the valid data value then become np.iiinfo(np.uint16).max? ie, instead of hardcoding 255, should we do:

np.iinfo(<input>.dtype).max

like: https://github.com/mapbox/nodata/blob/master/nodata/alphamask.py#L55 ish?

perrygeo commented 9 years ago

:+1: sounds good