We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 012747b commit f57dddcCopy full SHA for f57dddc
1 file changed
src/_png.cpp
@@ -429,7 +429,7 @@ _png_module::read_png(const Py::Tuple& args)
429
int num_dims = (png_get_color_type(png_ptr, info_ptr)
430
& PNG_COLOR_MASK_COLOR) ? 3 : 2;
431
432
- double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1;
+ double max_value = (1 << bit_depth) - 1;
433
PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(
434
num_dims, dimensions, PyArray_FLOAT);
435
0 commit comments