G
Guest
I am having a real problme returning an image from a directory that isn't
under my webserver..
I.E.
the image is on my F: drive but my website exists in the D: and I have no
intention of adding the F: drive or any of it's subdirectorys to my website.
The problem relates to the image / response.type..
I am reading a jpg and my web app is returning a bmp
The code is reativly simple (but I have tried making it harder - using
graphics objects and encoderparams... Result = the same.. bitmap.. 600 k
image = 1.5 megs...
CODE
Dim i As System.Drawing.Image = Image.FromFile(s)
Response.Clear()
Response.ContentType = "image/pjpeg"
i.Save(Response.OutputStream, Imaging.ImageFormat.Jpeg)
i.Dispose()
Response.End()
Any help appreciated..
Rob
under my webserver..
I.E.
the image is on my F: drive but my website exists in the D: and I have no
intention of adding the F: drive or any of it's subdirectorys to my website.
The problem relates to the image / response.type..
I am reading a jpg and my web app is returning a bmp
The code is reativly simple (but I have tried making it harder - using
graphics objects and encoderparams... Result = the same.. bitmap.. 600 k
image = 1.5 megs...
CODE
Dim i As System.Drawing.Image = Image.FromFile(s)
Response.Clear()
Response.ContentType = "image/pjpeg"
i.Save(Response.OutputStream, Imaging.ImageFormat.Jpeg)
i.Dispose()
Response.End()
Any help appreciated..
Rob