Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Retrieve Image Full path with its extention

1 view
Skip to first unread message

Sham

unread,
Sep 17, 2008, 6:46:01 AM9/17/08
to
Hai,

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

rajkiranpro

unread,
Nov 22, 2008, 7:31:18 AM11/22/08
to
well the bitmap is in the memory and not in the disk.

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

0 new messages