jeg mener at dette er aspimage - fundet for lang tid siden på nettet og kun brugt een gang:
Function Createthumbnail(strPath, strFilename, maxX, maxY)
Set image = server.createobject("aspimage.image") if image.loadimage(strPath & "\" & strFilename) then intWidth = image.MaxX intHeight = image.MaxY
if (intWidth<MaxX) and (intHeight<MaxY) then if intWidth>intHeight then intRatio=(maxX/intWidth) image.resizeR intWidth*intRatio, intHeight*intRatio else intRatio=(maxY/intHeight) image.resizeR intWidth*intRatio, intHeight*intRatio end if end if
'Optimised for JPEG thumbnails - generally better than GIFs Image.ImageFormat = 1 Image.PixelFormat = 6
if Image.SaveImage then response.write "<img src=""test/" & picture & ".jpg"">" Set Image = nothing else 'You may want to put some kind of error handler in here Set Image = nothing end if else 'Error while loading, abort Set Image = nothing exit function end if end function
If Image_Width > 200 then Ny_bredde = 200 Ny_Hojde = (Image_Height/(Image_Width/200)) if Ny_Hojde > 300 then Ny_Hojde_1 = 300 Ny_bredde_1 = (Ny_bredde/(Ny_Hojde/300)) Image.resize Ny_bredde_1, Ny_Hojde_1 'Response.write "Ny højde = " & Ny_Hojde_1 & " - Ny bredde = " & Ny_bredde_1 & "<br>" Else Image.resize Ny_bredde, Ny_Hojde 'Response.write "Ny højde = " & Ny_Hojde & " - Ny bredde = " & Ny_bredde & "<br>" end if Var_temp = 1 End if
If not Var_temp = 1 then
If Image_Height > 300 then Ny_Hojde_1 = 300 Ny_bredde = (Image_Width/(Image_Height/300)) 'Response.write "For højt - Ny højde = " & Ny_Hojde & " - Ny bredde = " & Ny_bredde & "<br>" Image.resize Ny_bredde, Ny_Hojde_1 End if End if
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.