If your server has the Persits AspJPEG component installed, you can use ASP to generate thumbnails and watermark images (works with jpeg, gif, and a few others... only used it for those, however). Here's the code I used for one of the sites I did. I don't remember how much of it is mine and how much came from elsewhere, but consider it free for public use.
<%
Response.Expires = 0
' create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
'### Path to your image
'path = "c:\websites\mywebsite\images\" & Request("path")
' Open source file
Jpeg.Open(path)
'### Check if we're resizing and set height and width appropriately
if Request("res") <> "" then
if Request("res") = "lo" then
Jpeg.Width = 600
Jpeg.Height = Jpeg.OriginalHeight * Jpeg.Width / Jpeg.OriginalWidth
Jpeg.Canvas.Font.Color = &H000000 ' Red
Jpeg.Canvas.Font.Family = "Courier New"
Jpeg.Canvas.Font.Bold = True
Jpeg.Canvas.Font.BkMode = "Opaque" ' to make antialiasing work
Jpeg.Canvas.Print Jpeg.Width - 330, Jpeg.Height - 30, "(C)2006 YOUR COMPANY"
elseif Request("res") = "thumb" then
if jpeg.OriginalWidth > jpeg.OriginalHeight then
jpeg.Width = 80
jpeg.Height = jpeg.OriginalHeight * jpeg.Width / jpeg.OriginalWidth
else
jpeg.Height = 80
jpeg.Width = jpeg.OriginalWidth * jpeg.Height / jpeg.OriginalHeight
end if
else
Jpeg.Width = Request("res")
Jpeg.Height = Jpeg.OriginalHeight * Jpeg.Width / Jpeg.OriginalWidth
Jpeg.Canvas.Font.Color = &H000000 ' Red
Jpeg.Canvas.Font.Family = "Courier New"
Jpeg.Canvas.Font.Bold = True
Jpeg.Canvas.Font.BkMode = "Opaque" ' to make antialiasing work
Jpeg.Canvas.Print Jpeg.Width - 330, Jpeg.Height - 30, "(C)2006 YOUR COMPANY"
end if
else
Jpeg.Width = Jpeg.OriginalWidth
Jpeg.Height = Jpeg.OriginalHeight
Jpeg.Canvas.Font.Color = &H000000 ' Red
Jpeg.Canvas.Font.Family = "Courier New"
Jpeg.Canvas.Font.Bold = True
Jpeg.Canvas.Font.BkMode = "Opaque" ' to make antialiasing work
Jpeg.Canvas.Print Jpeg.Width - 330, Jpeg.Height - 30, "(C)2006 YOUR COMPANY"
end if
' Perform resizing and
' send resultant image to client browser
Jpeg.SendBinary
%>
That's the code exactly as I used it (minus the changes made to protect the innocent). Hope it helps.
<img src="thumb.asp?path=image.jpg">