File tree 3 files changed +14
-5
lines changed
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -698,7 +698,7 @@ Generates an SHA-256 message digest for the image pixel stream.
698
698
-----
699
699
Gets the image ticks-per-second.
700
700
701
- ` img:get_image_type () `
701
+ ` img:get_type () `
702
702
-----
703
703
Gets the potential image type:
704
704
Original file line number Diff line number Diff line change @@ -836,8 +836,8 @@ _M.get_ticks_per_second = function(self)
836
836
return lib .MagickGetImageTicksPerSecond (self .wand )
837
837
end
838
838
839
- _M .get_image_type = function (self )
840
- return image_type :to_str (lib .MagickGetImageType (self .wand ))
839
+ _M .get_type = function (self )
840
+ return image_type () :to_str (lib .MagickGetImageType (self .wand ))
841
841
end
842
842
843
843
_M .get_units = function (self )
@@ -881,7 +881,7 @@ _M.identify = function(self)
881
881
end
882
882
883
883
_M .identify_type = function (self )
884
- return image_type :to_str (lib .MagickIdentifyImageType (self .wand ))
884
+ return image_type () :to_str (lib .MagickIdentifyImageType (self .wand ))
885
885
end
886
886
887
887
_M .implode = function (self , radius , method )
@@ -1261,7 +1261,7 @@ end
1261
1261
1262
1262
_M .set_type = function (self , itype )
1263
1263
return handle_result (self , lib .MagickSetImageType (self .wand ,
1264
- image_type :to_int (itype .. " Type" )))
1264
+ image_type () :to_int (itype .. " Type" )))
1265
1265
end
1266
1266
1267
1267
_M .set_units = function (self , units )
Original file line number Diff line number Diff line change @@ -63,4 +63,13 @@ describe("ImageAttr", function()
63
63
cs = img :get_colorspace ()
64
64
assert .truthy (cs == " RGBColorspace" )
65
65
end )
66
+
67
+ it (" getSetImageType" , function ()
68
+ local it = img :get_type ()
69
+ assert .is_true (it == " TrueColorAlphaType" )
70
+
71
+ img :set_type (" Bilevel" )
72
+ it = img :get_type ()
73
+ assert .is_true (it == " BilevelType" )
74
+ end )
66
75
end )
You can’t perform that action at this time.
0 commit comments