Ver Mensaje Individual
  #94 (permalink)  
Antiguo 02/06/2006, 15:42
Avatar de cokete
cokete
 
Fecha de Ingreso: noviembre-2004
Mensajes: 224
Antigüedad: 19 años, 5 meses
Puntos: 0
Funciones para calcular ancho y alto de una imagen.

Código:
Private Function GetImageWidth(byVal strPath)
   dim myImg, fs 
   Set fs= CreateObject("Scripting.FileSystemObject") 
   if not fs.fileExists(strPath) then Exit Function 
   set myImg = loadpicture(strPath) 
   GetImageWidth = round(myImg.width / 26.4583) 
   set myImg = nothing 
End Function


Private Function GetImageHeight(byVal strPath)
   dim myImg, fs 
   Set fs= CreateObject("Scripting.FileSystemObject") 
   if not fs.fileExists(strPath) then Exit Function
   set myImg = loadpicture(strPath) 
   GetImageHeight = round(myImg.height / 26.4583) 
   set myImg = nothing 
End Function