maxvalue binding

This commit is contained in:
2021-05-14 09:44:28 +02:00
parent fbea9488f0
commit 4b57a41705
2 changed files with 20 additions and 0 deletions

View File

@@ -176,6 +176,9 @@ c_fimg_load_from_png = LIB.fimg_load_from_png
c_fimg_load_from_png.argtypes = (ct.c_char_p, ct.POINTER(C_FloatImg))
c_fimg_load_from_png.restype = ct.c_int
c_fimg_get_maxvalue = LIB.fimg_get_maxvalue
c_fimg_get_maxvalue.argtypes = (ct.POINTER(C_FloatImg),)
c_fimg_get_maxvalue.restype = ct.c_float
############################################################################################################
class FloatImg:
@@ -337,6 +340,11 @@ class FloatImg:
== 0
)
#######################################################################################################
def maxvalue(self):
"""return the maximum value for any channel in the image"""
return c_fimg_get_maxvalue(self.c_img_p)
###########################################################################################################
def fileinfos(fname):