Kontent qismiga oʻtish

Modul:ImageRatio

ZiyoSfera, erkin ensiklopediya
2026-yil 20-avgust, 03:23 dagi Admin (munozara | hissa) versiyasi
(farq) ←Avvalgi koʻrinishi | Hozirgi koʻrinishi (farq) | Yangiroq koʻrinishi→ (farq)

Bu modul uchun Modul:ImageRatio/doc nomli hujjat sahifasini yaratishingiz mumkin

local p={}
function p.ratio(frame)
	local file = frame.args[1]  and mw.title.new('File:' .. mw.uri.decode(mw.ustring.gsub(frame.args[1],'%|.*$',''), 'WIKI'))
	file = file and file.file
	local w = tonumber(file.width) or 1
	local h = tonumber(file.height) or 1
    local r = w/h or 1
	return r
end
return p