Ce qui suit est assez bon
La copie de code est la suivante:
FunctionFormatimg2 (contenu)
tabac
SetRe = newRegexp
re.ignorecase = true
re.global = true
re.Pattern = "(script)"
Contenu = re.replace (contenu, "script")
re.Pattern = "<img. [^>] * src (= |) (. [^>] *)>"
Content = re.replace (contenu, "<imgsrc = $ 2Style =" "cursor: pointer" "alt =" "cliquez ici pour parcourir les images dans une nouvelle fenêtre" "onClick =" "javascrip
Setdre = rien
Formatimg = contenu
finition de fin
Ce qui précède est un peu mauvais, mais la largeur et la hauteur de l'image ne sont plus là
La copie de code est la suivante:
FonctionGetHoto (strhtml)
Dimobjregexp, match, matchs
SetObjregexp = newRegexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.Pattern = "<img. +?>"
tp = ""
Setmatches = objregexp.execcute (strhtml)
Foreachmatchinmatches
tp = tp & match.value
sortie
Suivant
getphoto = tp
SetObjregexp = rien
Finition de fin
Le code suivant est utilisé pour mettre à l'échelle l'image
La copie de code est la suivante:
FunctionResizeImage (ImageId, LimitWidth, Limitheight)
{
variable = newImage ();
image.src = imageId.src;
if (image.width <= 0 && image.Height <= 0) return;
if (image.width / image.height> = limitewidth / limitheight)
{
if (image.width> limitewidth)
{
ImageId.Width = limitewidth;
ImageId.Height = (image.Height * limitWidth) /image.width;