mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Add support for [png
to texmod:calc_dims
This commit is contained in:
parent
b169077a40
commit
d4ca847b0e
@ -74,4 +74,9 @@ function cd:sheet(get_dims)
|
||||
return math.floor(base_w / self.w), math.floor(base_h / self.h)
|
||||
end
|
||||
|
||||
function cd:png()
|
||||
local png = modlib.minetest.decode_png(modlib.text.inputstream(self.data))
|
||||
return png.width, png.height
|
||||
end
|
||||
|
||||
return calc_dims
|
Loading…
Reference in New Issue
Block a user