Add watermark function to pictures and create thumbnails for pictures 1. Add watermark function to pictures
DimJpeg
Set Jpeg = Server.CreateObject(Persits.Jpeg) ' Create object
Jpeg.Open BlogPath & /upload/ & FileName ' The location of the picture
Jpeg.Canvas.Font.Color = &H000000 ' Color, here it is set to: black
Jpeg.Canvas.Font.Family = Founder becomes Simplified' Set font
Jpeg.Canvas.Font.Bold = False 'Whether to set it to bold
Jpeg.Canvas.Font.Size = 26 'Font size
Jpeg.Canvas.Font.Quality = 4 ' Text clarity
Jpeg.Canvas.Print Jpeg.OriginalWidth/2-170,Jpeg.OriginalHeight-30, WWW.WILLIAMLONG.INFO 'Watermark text
Jpeg.Save BlogPath & /upload/ & FileName ' Save file
Set Jpeg = Nothing
2. Create thumbnails for images
Dim Jpeg
Set Jpeg = Server.CreateObject(Persits.Jpeg) ' Create object
Jpeg.Open BlogPath & /upload/ & FileName ' The location of the picture
Jpeg.Width = Jpeg.OriginalWidth / 2
Jpeg.Height = Jpeg.OriginalHeight / 2
'Set the thumbnail size (here the ratio is set to 50%), you can also give it an accurate value, such as Jpeg.Width=120
Jpeg.Save BlogPath & /upload/ & FileName ' Save file
Set Jpeg = Nothing