Part Image from DB

R

Remis

I have pictures on DB. (use 1.1 framework)

When use

Response.ContentType = "Image/Gif'

Response.OutputStream.Write(DR("Pic_Data"), 0, DR("Pic_Size"))



I see that image.

I want get width this picture or part of this picture.



I found example :

Dim stmFile As New MemoryStream

Dim pic As System.Drawing.Image

....

stmFile.Write(DR("Pic_Data"), 0, DR("Pic_Size"))

pic = System.Drawing.Image.FromStream(stmFile)

Response.ContentType = "Image/Gif"

pic.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif)



I got error on line : pic = System.Drawing.Image.FromStream(stmFile)

"invalid parameter used".



Where is my error?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top