
27/11/2007, 10:02
|
 | | | Fecha de Ingreso: enero-2003 Ubicación: Ciudad Autónoma de Buenos Aires
Mensajes: 48
Antigüedad: 22 años, 3 meses Puntos: 0 | |
Re: redimensionar imagenes con aspupload, aspjpeg CREO_thumbnail name, 200, path, new_name
Function CREO_thumbnail(archivo,TMR,path,nuevo)
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Compute path to source image
Path_thumbnail = path & "\" & archivo
' Open source image
Jpeg.Open Path_thumbnail
W = Jpeg.OriginalWidth
H = Jpeg.OriginalHeight
if TMR < W then
if W >= H then
MAYOR = W
else
MAYOR = H
end if
PORC_REDUC = (TMR * 100 / MAYOR)
' Decrease image size
Jpeg.Width = ( PORC_REDUC * Jpeg.OriginalWidth / 100 )
Jpeg.Height = ( PORC_REDUC * Jpeg.OriginalHeight / 100 )
'AspJpeg supports three popular image resizing algorithms: Nearest-Neighbor, Bilinear and Bicubic.
Jpeg.Interpolation=1
end if
' create thumbnail and save it to disk
GuardarComo = path & "\" & nuevo
Jpeg.Save GuardarComo
End Function
Saludos y suerte |