<%
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::: bmp, gif, jpg e png :::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::: :::
'::: Esta função recebe um número especificado de bytes de qualquer :::
'::: arquivo, começando no deslocamento (base 1) :::
'::: :::
'::: Passado: :::
'::: flnm => FileSpec of File to Read :::
'::: offset => offset para começar a ler :::
'::: bytes => quantos bytes lê :::
'::: :::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
função getbytes (flnm, deslocamento, bytes)
Dim objfso
Dim objftemp
ObjTextStream dim
Dim lngSize
em erro de erro em seguida
Set objfso = createObject (script.filesystemoBject)
'Primeiro, obtemos o tamanho do arquivo
Defina objftemp = objfso.getFile (flnm)
lngsize = objftemp.size
defina objftemp = nada
fsoforReading = 1
Definir objTextStream = objfso.opentExtfile (flnm, fsoforReading)
Se deslocamento> 0 então
strbuff = objTextStream.read (deslocamento - 1)
final se
Se bytes = -1, então 'pegue tudo!
GetBytes = objTextStream.read (lngsize) 'readall
outro
GetBytes = objTextStream.read (bytes)
final se
objTextStream.close
defina objTextStream = nada
defina objfso = nada
Função final
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::: :::
'::: Funções para converter dois bytes em um valor numérico (longo) :::
'::: (Little-Endian e Big-Endian) :::
'::: :::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
função lngconvert (strtemp)
lngConvert = clng (ASC (esquerda (strtemp, 1)) + ((ASC (direita (strtemp, 1) * 256))))
Função final
função lngConvert2 (strtemp)
lngConvert2 = clng (ASC (direita (strtemp, 1)) + ((ASC (esquerda (strtemp, 1) * 256))))
Função final
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::: :::
'::: Esta função faz a maior parte do trabalho real. Vai tentar :::
'::: Ler qualquer arquivo, independentemente da extensão, e Will ::::
'::: Identifique se é uma imagem gráfica. :::
'::: :::
'::: Passado: :::
'::: flnm => FileSpec of File to Read :::
'::: largura => largura da imagem :::
'::: altura => altura da imagem :::
'::: profundidade => profundidade de cor (no número de cores) :::
'::: strimageType => tipo de imagem (por exemplo, gif, bmp, etc.) :::
'::: :::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
função gfxSpex (flnm, largura, altura, profundidade, estréia)
Dim strpng
Dim strgif
Dim STRBMP
Dim strtype
strtype =
StrimageType = (desconhecido)
gfxSpex = false
strpng = chr (137) & ch (80) e chr (78)
strgif = gif
STRBMP = CHR (66) & Ch (77)
strtype = getBytes (flnm, 0, 3)
Se strtype = strgif, então 'é gif