I'd like to use "javascript wysiwyg html editor" to implement my diary.
TextAreaPro V1.0 Demo
Demo Supporting floating images, text, tables; also support sounds, video; save to local, server.
for creating thumbnails, I think I'll use ASP.NET to do it.
How To: Creating Thumbnail Images
Image.GetThumbnailImage on microsoft
public class MakeThumbnail : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
string file = Request.QueryString["file"];
System.Drawing.Image image = System.Drawing.Image.FromFile(Server.MapPath(file));
System.Drawing.Image thumbnailImage = image.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);
MemoryStream imageStream = new MemoryStream();
thumbnailImage.Save(imageStream, System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] imageContent = new Byte[imageStream.Length];
imageStream.Position = 0;
imageStream.Read(imageContent, 0, (int)imageStream.Length);
Response.ContentType = "image/jpeg";
Response.BinaryWrite(imageContent);
}
public bool ThumbnailCallback()
{
return true;
}
// ... non-applicable infrastructure code removed for clarity ...
}
2004年3月4日
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言