Module:ImageRatio: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
function ratio(image)
return file1
local file = image and mw.title.new('File:' .. mw.uri.decode(mw.ustring.gsub(image,'%|.*$',''), 'WIKI'))
file = file and file.file
w = tonumber(file.width) or 1
h = tonumber(file.height) or 1
r = w/h
return file
end