If I want to reduce an image I can do as follows:
Sub sub1()
Dim FileUrl As String = Server.MapPath("") & "\a.jpg"
Dim ima As New System.Drawing.Bitmap(FileUrl)
Dim inp As New IntPtr()
Dim ima2 As System.Drawing.Bitmap
ima2 = ima.GetThumbnailImage(100, 100, Nothing, inp)
Response.ContentType = "image/jpeg"
ima2.Save(Response.OutputStream, ima.RawFormat)
ima.Dispose()
ima2.Dispose()
End Sub
or
Sub sub2()
Dim FileUrl As String = Server.MapPath("") & "\a.jpg"
Dim ima As New System.Drawing.Bitmap(FileUrl)
Dim ima2 As New System.Drawing.Bitmap(ima, 100, 100)
Response.ContentType = "image/jpeg"
ima2.Save(Response.OutputStream, ima.RawFormat)
ima.Dispose()
ima2.Dispose()
End Sub
what are the advantages of GetThumbnailImage? I can the same thing without
using it.
--
Giuseppe