G
Guest
Hello friends, how ru all, i have some problem about saving created
thumbnail, following is the code i use for creating thumbnail but thumbnail
was not saved it is on memory which method is used to store created thumbnail
in to hard disk
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1"
%>
<%@ Import Namespace="System.Drawing.Imaging"%>
<%@ Import Namespace="System.Drawing.image"%>
<script language="VB" runat="server">
Function ThumbnailCallback() as Boolean
return False
end function
Sub Page_Load()
Dim imageurl as string=Request.QueryString("img")
imageurl="/images/" & imageurl
Dim fullsizeimg as system.Drawing.Image
fullsizeimg=System.Drawing.Image.FromFile(Server.M apPath("mug.gif"))
Response.ContentType="image/gif"
'fullsizeimg.save(Response.outputstream,imageforma t.gif)
Dim dummyCallBack as System.Drawing.Image.GetThumbnailImageAbort
dummyCallBack=New system.drawing.image.GetThumbnailimageabort(Addres sOf
ThumbnailCallback)
Dim thumbnailimg as System.Drawing.Image
thumbnailimg=fullsizeimg.GetthumbnailImage(100,100 ,dummyCallBack,IntPtr.Zero)
thumbnailimg.Save(Application.StartupPath&cstrThumbFileName)
End Sub
</script>
pls review it and tell me about he function thanks
thumbnail, following is the code i use for creating thumbnail but thumbnail
was not saved it is on memory which method is used to store created thumbnail
in to hard disk
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1"
%>
<%@ Import Namespace="System.Drawing.Imaging"%>
<%@ Import Namespace="System.Drawing.image"%>
<script language="VB" runat="server">
Function ThumbnailCallback() as Boolean
return False
end function
Sub Page_Load()
Dim imageurl as string=Request.QueryString("img")
imageurl="/images/" & imageurl
Dim fullsizeimg as system.Drawing.Image
fullsizeimg=System.Drawing.Image.FromFile(Server.M apPath("mug.gif"))
Response.ContentType="image/gif"
'fullsizeimg.save(Response.outputstream,imageforma t.gif)
Dim dummyCallBack as System.Drawing.Image.GetThumbnailImageAbort
dummyCallBack=New system.drawing.image.GetThumbnailimageabort(Addres sOf
ThumbnailCallback)
Dim thumbnailimg as System.Drawing.Image
thumbnailimg=fullsizeimg.GetthumbnailImage(100,100 ,dummyCallBack,IntPtr.Zero)
thumbnailimg.Save(Application.StartupPath&cstrThumbFileName)
End Sub
</script>
pls review it and tell me about he function thanks