def _get_image_properties(image):
 (immin, immax) = (np.min(image), np.max(image))
 imtype = image.dtype.type
 try:
  (lo, hi) = dtypes.dtype_range[imtype]
 except KeyError:
  (lo, hi) = (immin, immax)
 signed = (immin < 0)
 out_of_range_float = (np.issubdtype(image.dtype, np.float) and ((immin < lo) or (immax > hi)))
 low_data_range = ((immin != immax) and is_low_contrast(image))
 unsupported_dtype = (image.dtype not in dtypes._supported_types)
 return ImageProperties(signed, out_of_range_float, low_data_range, unsupported_dtype)

def _get_image_properties ( image ) : ( immin , immax ) = ( np . min ( image ) , np . max ( image ) ) imtype = image . dtype . type try : ( lo , hi ) = dtypes . dtype_range [ imtype ] except KeyError : ( lo , hi ) = ( immin , immax ) signed = ( immin < 0 ) out_of_range_float = ( np . issubdtype ( image . dtype , np . float ) and ( ( immin < lo ) or ( immax > hi ) ) ) low_data_range = ( ( immin != immax ) and is_low_contrast ( image ) ) unsupported_dtype = ( image . dtype not in dtypes . _supported_types ) return ImageProperties ( signed , out_of_range_float , low_data_range , unsupported_dtype )
determine nonstandard properties of an input image .