PK

ADDRLIN : /HMFS2/WEB/DTC038/v0071350.ferozo.com/public_html/administrador/includes/
FLL :
Current File : //HMFS2/WEB/DTC038/v0071350.ferozo.com/public_html/administrador/includes/ratio.asp

<%ratio = size_1y / size_1x

Jpeg.Open Path_im
Jpeg.Interpolation = 2
Jpeg.Quality = 80

xorig = Jpeg.OriginalWidth 
yorig = Jpeg.OriginalHeight
xratio = yorig / xorig

' Ratio = altura

if metodo = "crop" then
	
	if xratio > ratio then 
		if xorig > size_1x then
		
			Jpeg.Width = size_1x
			Jpeg.Height = int(size_1x * xratio)
			
		end if
	else
		if yorig > size_1y then
	
			Jpeg.Height = size_1y
			Jpeg.Width = int(size_1y / xratio)

		end if
	end if

	Jpeg.Crop ((Jpeg.Width - size_1x) / 2), ((Jpeg.Height - size_1y) / 2), Jpeg.Width - ((Jpeg.Width - size_1x) / 2), Jpeg.Height - ((Jpeg.Height - size_1y) / 2)

else	

	if xratio > ratio then
		if yorig > size_1y then
	
			Jpeg.Height = size_1y
			Jpeg.Width = int(size_1y / xratio)
	
		end if
	else
		if xorig > size_1x then
		
			Jpeg.Width = size_1x
			Jpeg.Height = int(size_1x * xratio)
	
		end if
	end if

end if%>


PK 99