I am developing application which handles to create thumbnail form a video
file.
I am successfully created image and i displayed it into browser by,
bit.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif);
Now my situation is, i need to save it into my database(sqlserver).
Can anyone tell me how to get that displayed(currently displayed) image file
- full path with its extention(like .gif).
Its urgent ..
Thanks and regards..
Sham
if u want to save the image in the sql db then u have two options
1.
string filepath = <path_to_save_gif_with_filename>;
bit.Save(filepath, System.Drawing.Imaging.ImageFormat.Gif);
and insert the filepath into ur db.
Make sure u don move the images after generation or the record in the db
will become invalid.
Try saving the bitmap stream in a folder and make an entry in the sql server
db
2.
u can get the stream data and encode the stream using base64 for
compression and store it in the db.. make sure u have the column type as
varchar(MAX)
to show thee image again
u can get the stream data back again decode it and regenerate the bitmap
Regards
Rajkiran