@@ -123,7 +123,7 @@ def resize(image, scale=None, odim0=None, odim1=None, method=INTERP.NEAREST):
123123 output = Array ()
124124 safe_call (backend .get ().af_resize (ct .pointer (output .arr ),
125125 image .arr , ct .c_longlong (odim0 ),
126- ct .c_longlong (odim1 ), method . value ))
126+ ct .c_longlong (odim1 ), Enum_value ( method ) ))
127127
128128 return output
129129
@@ -167,7 +167,7 @@ def transform(image, trans_mat, odim0 = 0, odim1 = 0, method=INTERP.NEAREST, is_
167167 safe_call (backend .get ().af_transform (ct .pointer (output .arr ),
168168 image .arr , trans_mat .arr ,
169169 ct .c_longlong (odim0 ), ct .c_longlong (odim1 ),
170- method . value , is_inverse ))
170+ Enum_value ( method ) , is_inverse ))
171171 return output
172172
173173def rotate (image , theta , is_crop = True , method = INTERP .NEAREST ):
@@ -196,7 +196,7 @@ def rotate(image, theta, is_crop = True, method = INTERP.NEAREST):
196196 """
197197 output = Array ()
198198 safe_call (backend .get ().af_rotate (ct .pointer (output .arr ), image .arr ,
199- ct .c_double (theta ), is_crop , method . value ))
199+ ct .c_double (theta ), is_crop , Enum_value ( method ) ))
200200 return output
201201
202202def translate (image , trans0 , trans1 , odim0 = 0 , odim1 = 0 , method = INTERP .NEAREST ):
@@ -238,7 +238,7 @@ def translate(image, trans0, trans1, odim0 = 0, odim1 = 0, method = INTERP.NEARE
238238 output = Array ()
239239 safe_call (backend .get ().af_translate (ct .pointer (output .arr ),
240240 image .arr , trans0 , trans1 ,
241- ct .c_longlong (odim0 ), ct .c_longlong (odim1 ), method . value ))
241+ ct .c_longlong (odim0 ), ct .c_longlong (odim1 ), Enum_value ( method ) ))
242242 return output
243243
244244def scale (image , scale0 , scale1 , odim0 = 0 , odim1 = 0 , method = INTERP .NEAREST ):
@@ -280,7 +280,7 @@ def scale(image, scale0, scale1, odim0 = 0, odim1 = 0, method = INTERP.NEAREST):
280280 output = Array ()
281281 safe_call (backend .get ().af_scale (ct .pointer (output .arr ),
282282 image .arr , ct .c_double (scale0 ), ct .c_double (scale1 ),
283- ct .c_longlong (odim0 ), ct .c_longlong (odim1 ), method . value ))
283+ ct .c_longlong (odim0 ), ct .c_longlong (odim1 ), Enum_value ( method ) ))
284284 return output
285285
286286def skew (image , skew0 , skew1 , odim0 = 0 , odim1 = 0 , method = INTERP .NEAREST , is_inverse = True ):
@@ -326,7 +326,7 @@ def skew(image, skew0, skew1, odim0 = 0, odim1 = 0, method = INTERP.NEAREST, is_
326326 safe_call (backend .get ().af_skew (ct .pointer (output .arr ),
327327 image .arr , ct .c_double (skew0 ), ct .c_double (skew1 ),
328328 ct .c_longlong (odim0 ), ct .c_longlong (odim1 ),
329- method . value , is_inverse ))
329+ Enum_value ( method ) , is_inverse ))
330330
331331 return output
332332
@@ -609,7 +609,7 @@ def medfilt(image, w0 = 3, w1 = 3, edge_pad = PAD.ZERO):
609609 output = Array ()
610610 safe_call (backend .get ().af_medfilt (ct .pointer (output .arr ),
611611 image .arr , ct .c_longlong (w0 ),
612- ct .c_longlong (w1 ), edge_pad . value ))
612+ ct .c_longlong (w1 ), Enum_value ( edge_pad ) ))
613613 return output
614614
615615def minfilt (image , w_len = 3 , w_wid = 3 , edge_pad = PAD .ZERO ):
@@ -641,7 +641,7 @@ def minfilt(image, w_len = 3, w_wid = 3, edge_pad = PAD.ZERO):
641641 output = Array ()
642642 safe_call (backend .get ().af_minfilt (ct .pointer (output .arr ),
643643 image .arr , ct .c_longlong (w_len ),
644- ct .c_longlong (w_wid ), edge_pad . value ))
644+ ct .c_longlong (w_wid ), Enum_value ( edge_pad ) ))
645645 return output
646646
647647def maxfilt (image , w_len = 3 , w_wid = 3 , edge_pad = PAD .ZERO ):
@@ -673,7 +673,7 @@ def maxfilt(image, w_len = 3, w_wid = 3, edge_pad = PAD.ZERO):
673673 output = Array ()
674674 safe_call (backend .get ().af_maxfilt (ct .pointer (output .arr ),
675675 image .arr , ct .c_longlong (w_len ),
676- ct .c_longlong (w_wid ), edge_pad . value ))
676+ ct .c_longlong (w_wid ), Enum_value ( edge_pad ) ))
677677 return output
678678
679679def regions (image , conn = CONNECTIVITY .FOUR , out_type = Dtype .f32 ):
@@ -700,7 +700,7 @@ def regions(image, conn = CONNECTIVITY.FOUR, out_type = Dtype.f32):
700700 """
701701 output = Array ()
702702 safe_call (backend .get ().af_regions (ct .pointer (output .arr ), image .arr ,
703- conn . value , out_type . value ))
703+ Enum_value ( conn ), Enum_value ( out_type ) ))
704704 return output
705705
706706def sobel_derivatives (image , w_len = 3 ):
@@ -891,5 +891,5 @@ def color_space(image, to_type, from_type):
891891 """
892892 output = Array ()
893893 safe_call (backend .get ().af_color_space (ct .pointer (output .arr ), image .arr ,
894- to_type . value , from_type . value ))
894+ Enum_value ( to_type ), Enum_value ( from_type ) ))
895895 return output
0 commit comments