Last post Apr 21, 2008 03:50 PM by igotnushooz
Apr 20, 2008 06:40 AM|igotnushooz|LINK
Is there anyway to append some text e.g. (c) xyz 2008 in the bottom right corner of an image? Or even better an image to the bottom?
If not can anyone reccomend an 'offline' program which does this in batch?
Apr 20, 2008 08:55 AM|XIII|LINK
this is usually done with an HttpHandler:
You could write your own application to multi process images and save them on disk or find some on codeplex.com.
Apr 20, 2008 02:29 PM|igotnushooz|LINK
thanks - good link but doing it at run time is likely to put significant processing load on my site.
I think i would prefer to do this on upload- anyone have a link to a good tutorial how to do this in vb. i've had a look on google but can't find much.
Apr 20, 2008 03:00 PM|XIII|LINK
you can reuse the code for the watermarkings what you find there but instead of outputting it to the outputstream use the stream you got to write the manipulated image to the disk.
Apr 21, 2008 03:50 PM|igotnushooz|LINK
on searching around the following code i've found the following - It is customised for my use but should help anyone else who is perplexed by this.
Dim strWatermark As String
strWatermark = "TEXT HERE"
Dim bmp As Bitmap = New Bitmap(strAlbumPath)
'Obtain a Graphics object from & for that Bitmap:
Dim canvas As Graphics = Graphics.FromImage(bmp)
'Draw the watermark string onto the Bitmap:
New Font("Verdana", 50, FontStyle.Bold), _
New SolidBrush(Color.White), 0, 0)
Dim strAlbumPath2 As String = HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings("AlbumsFolder"))
strAlbumPath2 += location
Dim strOutputFilePath As String = strAlbumPath2