Das Folgende ist ziemlich gut
Die Codekopie lautet wie folgt:
Funktionsformatimg2 (Inhalt)
Dimre
Setre = newRegexp
re.Innorecase = true
re.global = true
Re.Pattern = "(Skript)"
Content = re.Replace (Inhalt, "Skript")
re.pattern = "<img. [^>]*src (= |) (. [^>]*)>"
Content = re.Replace (Inhalt "<imgsrc = $ 2style =" "Cursor: Pointer" "Alt =" "Klicken Sie hier, um Bilder in einem neuen Fenster zu durchsuchen" "Onclick =" "Javascript: Fenster.open (this.src);
setre = nichts
Formatimg = Inhalt
Endfunktion
Das obige ist etwas schlecht, aber die Breite und Höhe im Bild sind nicht mehr da
Die Codekopie lautet wie folgt:
FORMITIONSGETHOTO (STRHTML)
Dimobjregexp, Match, Matches
SetObjregexp = newregexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "<img.+?>"
tp = ""
SetMatches = objregexp.execute (strhtml)
ForeachMatchInmatches
tp = tp & match.value
ausgehen
Nächste
GetPhoto = tp
SetObjregexp = nichts
Endfunktion
Der folgende Code wird verwendet, um das Bild zu skalieren
Die Codekopie lautet wie folgt:
FunktionResizeImage (ImageId, Limitwidth, Limitheight)
{
variable = newImage ();
Image.src = imageId.src;
if (image.width <= 0 && image.height <= 0) return;
if (image.width/image.height> = limitwidth/limitheight)
{
if (image.width> limitwidth)
{
ImageId.width = limitwidth;
ImageId.Height = (Image.Height*limitwidth) /image.width;