A seguir é muito bom
A cópia do código é a seguinte:
FunctionFormatImg2 (conteúdo)
dimre
Setre = newRegexp
re.IGNORECASE = true
re.global = true
re.pattern = "(script)"
Content = re.Replace (Conteúdo, "Script")
re.pattern = "<img. [^>]*src (= |) (. [^>]*)>"
Content = re.Replace (conteúdo, "<imgsrc = $ 2style =" "cursor: ponteiro" "alt =" "Clique aqui para procurar imagens em uma nova janela" "OnClick =" "javascript: window.open (this.src);" onLload = "" "Javascript: remanespic (this)" Border = "" "" "" "" "" "
setre = nada
Formatimg = conteúdo
Função final
O acima é um pouco ruim, mas a largura e a altura na imagem não estão mais lá
A cópia do código é a seguinte:
FunctionGetphoto (strhtml)
DIMOBJREGEXP, MACH, MACHES
SetObjregexp = newRegexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "<img.+?>"
tp = ""
SetMatches = objregexp.execute (strhtml)
ForeachMatchinMatches
tp = tp & match.value
exitfor
Próximo
getphoto = tp
SetObjregexp = nada
Função final
O código a seguir é usado para escalar a imagem
A cópia do código é a seguinte:
FunctionResizeImage (ImageId, Limitwidth, Limithight)
{
variável = newImage ();
image.src = imageid.src;
if (image.width <= 0 && image.Height <= 0) return;
if (image.width/image.Height> = LimitWidth/Limithight)
{
if (image.width> Limitwidth)
{
imageId.Width = LimitWidth;
imageId.Height = (Image.Height*LimitWidth) /Image.Width;