<%
’::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ¡
’::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ¡
'::: bmp, gif, jpg y png :::
':::: Original: Junyd ::::::::::::
`` ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ¡ :::::::::::::::::::::::::::::::::::::::::::::::.
':::: :::
'::: Esta cosa puede obtener bytes de BMP, GIF, JPG y PNG Pictures :::
’::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ¡
Función GetBytes (FLNM, Offset, Bytes)
Dim objfso
Dim objftemp
Dim objTextStream
Dim Lngsize
En el currículum de error siguiente
Establecer objfso = createObject (scripting.filesystemObject)
'Primero, obtenemos archivos
Establecer objftemp = objfso.getfile (flnm)
lngsize = objftemp.size
establecer objftemp = nada
fSoforreading = 1
Establecer objTextStream = objfso.opentextfile (flnm, fSoforreading)
Si compensan> 0 entonces
strbuff = objTextStream.read (Offset - 1)
final si
Si bytes = -1, entonces '¡Obtenga todo!
GetBytes = objTextStream.read (lngsize) 'Readall
demás
GetBytes = objTextStream.read (bytes)
final si
objTextStream.close
establecer objTextStream = nada
establecer objfso = nada
función final
’::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ¡
':::: :::
'::: La siguiente es la función de convertir dos bytes en un valor unificado :::
'::: (pequeño endian y gran endian) :::
':::: :::
’::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ¡
función lngconvert (strtemp)
lngconvert = clng (ASC (izquierda (strtemp, 1)) + ((asc (derecha (strtemp, 1)) * 256)))
función final
función lngconvert2 (strtemp)
lngconvert2 = clng (asc (derecha (strtemp, 1)) + ((asc (izquierda (strtemp, 1)) * 256)))
función final
’::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ¡
':::: :::
'::: Esta característica realiza la mayor parte del trabajo real. Está dispuesto a probar :::
'::: Lea cualquier archivo :::
'::: Si es una imagen de un gráfico, identifique. :::
':::: :::
'::: Aprobado: :::
'::: flnm => filespec de archivo para leer :::
'::: ancho => ancho de imagen :::
'::: altura => Altura de la imagen :::
'::: profundidad => profundidad de color (en número de colores) :::
'::: strimageType => Tipo de imagen (por ejemplo, GIF, BMP, etc.) :::
':::: :::
’::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ¡
función GFXSPEX (flnm, ancho, altura, profundidad, strimageType)
Dim strpng
Dim strgif
Dim strbmp
Dim strtype
strtype =
strimageType = (desconocido)
gfxspex = falso
strpng = chr (137) y chr (80) y chr (78)
strgif = gif
strbmp = chr (66) y chr (77)
strtype = getBytes (flnm, 0, 3)
Si strtype = strgif entonces 'es gif
strimageType = gif
Ancho = lngconvert (GetBytes (FLNM, 7, 2))
Altura = lngConvert (GetBytes (FLNM, 9, 2))
Profundidad = 2 ^ ((ASC (GetBytes (Flnm, 11, 1)) y 7) + 1)
gfxspex = true
elseif izquierdo (strtype, 2) = strbmp entonces 'es BMP
sTrimageType = BMP