Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/05/2007, 09:49
Beav
 
Fecha de Ingreso: abril-2007
Mensajes: 32
Antigüedad: 18 años
Puntos: 0
Re: problema sql con asp

bueno ahora el problema q tengo es con el tamaño de las fotos, no consigo ponerlas como yo quiero. Una tiene que estar a 100x80, que sale bien y la otra a 318x253. Y lo que hago es que las dos se me ponen al mismo tamaño.
Este es el código:

Cita:
'reconvertimos la imagen
IF TIPO_OBJETO="IMAGEN" THen
Set jpg = Server.CreateObject("Persits.Jpeg")
RUTA=Server.MapPath(dir_subida2) & "/" & strNombreFichero
jpg.Open(RUTA)

Width = ANCHO_FOTO 'ancho nuevo

If jpg.Height>Width Then
Height = jpg.Height * Width /jpg.Width 'ancho nuevo

jpg.Interpolation=1
jpg.Width = Width
jpg.Height = Height

' Sharpen resultant image
jpg.Sharpen 1, 130

jpg.Save RUTA
End If

'2º thumb
If ANCHO_THUMB2<>"" Then

Width = ANCHO_THUMB2 'ancho nuevo
If jpg.Height>Width Then
Height = jpg.Height * Width /jpg.Width 'ancho nuevo

jpg.Interpolation=1
jpg.Width = Width
jpg.Height = Height

' Sharpen resultant image
jpg.Sharpen 1, 130
End If
jpg.Save Server.MapPath(dir_subida2) & "\thumb\" & NOMBRE_FICHERO & "_2" & EXTENSION_FICHERO
End If


'creamos thumbnail
RUTA=Server.MapPath(dir_subida2) & "/" & strNombreFichero

Width = ANCHO_THUMB 'ancho nuevo
If jpg.Height>Width Then
Height = jpg.Height * Width /jpg.Width 'ancho nuevo

jpg.Interpolation=1
jpg.Width = Width
jpg.Height = Height

' Sharpen resultant image
jpg.Sharpen 1, 130
End If
jpg.Save Server.MapPath(dir_subida2) & "/thumb/" & strNombreFichero

End If
es que no sé donde tengo que tocar para que me salga, alguien me echa una mano?