How do I view a jpg without using Image.FromStream
-
Hey Does anyone know how to view a jpg stored in a stream on a control such as a picturebox without having to first convert it to a BITMAP using Image.FromStream? Thanx
-
Hey Does anyone know how to view a jpg stored in a stream on a control such as a picturebox without having to first convert it to a BITMAP using Image.FromStream? Thanx
why would one want that? two ways: 1. save the stream to a file, then use
Image.FromFile
orPictureBox.Location
2. create your own JPEG decoder (the inverse of this[^], i.e. implementImage.FromStream
yourself. It doesn't make much sense to me. :)Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Nil Volentibus Arduum
-
why would one want that? two ways: 1. save the stream to a file, then use
Image.FromFile
orPictureBox.Location
2. create your own JPEG decoder (the inverse of this[^], i.e. implementImage.FromStream
yourself. It doesn't make much sense to me. :)Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Nil Volentibus Arduum
Maybe I was a bit vague. I am recieving a stream of jpegs from a number of cameras. I want to show these on screen and I was wondering if there was a way of doing this without having to first uncompress the jpg using Image.FromStream as this is a slow process.
-
Maybe I was a bit vague. I am recieving a stream of jpegs from a number of cameras. I want to show these on screen and I was wondering if there was a way of doing this without having to first uncompress the jpg using Image.FromStream as this is a slow process.
TimSWatson wrote:
Maybe I was a bit vague.
indeed.
TimSWatson wrote:
without having to first uncompress
when an image is visible on the display, you see individual pixels, hence it has been decompressed somehow somewhere. There is no way around that assuming a standard PC system is used. The only thing you could consider is creating your own JPEG decoder trading quality for speed; however you are likely to discover loosing quality is easier than gaining speed. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Nil Volentibus Arduum