1. Add a watermark to an image
Dim JPEG
Set JPEG = server. Createobject ("persits. jpeg") 'creates an object.
JPEG. Open blogpath & "/upload/" & filename 'image location
JPEG. Canvas. Font. Color = & h000000' color, which is set to: Black
JPEG. Canvas. Font. Family = "正" 'set the font
Whether to set jpeg. Canvas. Font. Bold = false' to bold
JPEG. Canvas. Font. size = 26' font size
JPEG. Canvas. Font. Quality = 4' text definition
JPEG. Canvas. Print jpeg. originalwidth/2-170, JPEG. OriginalHeight-30, "www. William Long. Info" 'watermark text
JPEG. Save blogpath & "/upload/" & filename 'Save the file
Set JPEG = nothing
2. Create a thumbnail for the image
Dim JPEG
Set JPEG = server. Createobject ("persits. jpeg") 'creates an object.
JPEG. Open blogpath & "/upload/" & filename 'image location
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 him an accurate value, such as JPEG. width = 120
JPEG. Save blogpath & "/upload/" & filename 'Save the file
Set JPEG = nothing