Saving images to temp folder or alternative solution
Posted on 2006-04-20
I am generating thumbnails of the fly using the following code:
Private Sub FormatThumbnail(ByVal a_relativePath As String, ByVal a_image As Image)
Dim l_filePath As String = Server.MapPath(ResolveUrl(a_relativePath))
Dim l_bmp As Bitmap = New Bitmap(l_filePath)
Dim l_newBmp As Bitmap = CType(l_bmp.GetThumbnailImage(100, 100, Nothing, IntPtr.Zero), Bitmap)
The trick is getting it to display withing an <asp:image tag. I need some sort of url to this file, but I dont need to send this file permanently, so i was thinking a temp folder, how could i do this?