Vanaf website www.ningzhou.com heb ik en aantal ASP pagina's gedownload
waarmee je vrij eenvoudig fotopagina's kan samenstellen. Er wordt gebruik
gemaakt van ASPJpeg wat bij m'n provider ondersteund wordt.
Een proefje heb ik staan op http://motorhuisdevalkenier.nl/mtbsport/joop/
Op zich werkt alles naar behoren en er worden authomatisch thumbnails
aangemaakt. Via catalog Photos wordt catalog_photos.asp opgeroepen en de
thumbs gegenereerd. In de catalog_photos.asp zit een verwijzing naar
config.inc.
Hierin o.a.
'***********ASPJpeg Photos Config***************************
'Must have ASPJpeg installed on server. The application will automatically
create the thumbnails when
'you catalog
dim intThumbWidth, intThumbHeight
intThumbWidth = 125 'With of thumbnail
intThumbHeight = 125 'Height of thumbnail
'***********ASPJpeg Photos Config***************************
Dus de grootte van de thumbnail wordt vastgelegd, maar zonder rekening te
houden met de verhoudingen van de orginele plaatjes.
Nu zitten er in catalog_photos.asp een groot aantal opties om wellicht
e.e.a. naar wens aan te passen.
'***********Create Thumbnail using
ASPJpeg*************************************
If bUseASPJpeg Then
SET myFSO = Server.CreateObject("Scripting.FileSystemObject")
If NOT myFSO.FileExists(Server.MapPath(dirname) & "/" & strThumbFolder &
"/" & strThumbPrefix & resolvedFileName) Then
' Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Compute path to source image
Path = Server.MapPath(dirname) & "\"& resolvedFileName
' Open source image
Jpeg.Open Path
' Decrease image size by 50%
Jpeg.Width = Jpeg.OriginalWidth / 2
Jpeg.Height = Jpeg.OriginalHeight / 2
'Set image width
Jpeg.Width = intThumbWidth
' Set new height, preserve original width/height ratio
Jpeg.Height = jpeg.OriginalHeight * jpeg.Width / jpeg.OriginalWidth
'Make sure all Thumbnails are of the same size, Crop if too tall
If Jpeg.Height>intThumbHeight Then
Jpeg.Crop 0, 0, Jpeg.Width, intThumbHeight
End If
if Jpeg.Height < intThumbHeight then
Jpeg.Height = intThumbHeight
end if
' Apply sharpening if necessary
Jpeg.Sharpen 1, 130
' create thumbnail and save it to disk
Jpeg.Save Server.MapPath(dirname) & "/" & strThumbFolder & "/" &
strThumbPrefix & resolvedFileName
End If
End If
'***********Create Thumbnail*************************************
Op een of andere manier lijkt dit niet "gelezen" te worden terwijl ik toch
graag thumbs aanmaak in verhouding tov het orgineel. Het afstoppen van de
intThumbWidth = 125 en intThumbHigth = 125 in config.inc levert niets op.
Voor de volledigheid heb ik de bestanden in een zipje gezet.
(http://motorhuisdevalkenier.nl/mtbsp...op/aspjpeg.zip)
of de losse bestanden:
http://motorhuisdevalkenier.nl/mtbsport/joop/config.inc en
http://motorhuisdevalkenier.nl/mtbsp...photos.asp.txt
Al vast bedankt voor jullie aandacht en eventuele oplossing.
Fred

Likes:

Quote