Omskrivning fra ASP Image til W3 image
Set Image = Server.CreateObject("AspImage.Image")Image.LoadImage (Server.Mappath("tempfolder/" & PICTURENAME))
sql ="insert into billede(navn, beskrivelse, billede, billedebredde, billedehojde, kat, dato) VALUES('" & mySmartUpload.form.item("navn" & i) & "', '" & mySmartUpload.form.item("beskrivelse" & i) & "', '" & PICTURENAME & "', '" & Int(Image.MaxX) & "', '" & Int(Image.MaxY) & "', '" & mySmartUpload.form.item("kat" & i) & "', '" & now & "')"
conn.execute(sql)
If Int(Image.MaxX) => 100 Then
RESIZEPERCENT = (100 / Int(Image.MaxX))
NEWHEIGHT = Int(Image.MaxY) * RESIZEPERCENT
Image.ResizeR 100, Cint(NEWHEIGHT)
Response.Write "billed skabt"
Else
Response.Write "Billed er ok"
End If
Image.FileName = (Server.Mappath("/" & PICTURENAME))
Image.SaveImage
Set Image = Nothing