Try creating an Image object from the byte array first, something like:
MemoryStream ms = new MemoryStream(myByteArray);
Image i = Image.FromStream(ms);
i.Save("i.jpg", ImageFormat.Jpeg);
It might work if the initial byte array was created from image data.
Otherwise you will need to encode it yourself. There are many reference
implementations of jpeg encoding but you can always start here:
http://www.ijg.org/
ok,
aq
"David" <da*********@hotmail.com> wrote in message
news:e3****************@TK2MSFTNGP10.phx.gbl...
Hello.
I need to create JPG file base on data from some array of bytes without
using any graphical functions.
So I need the function which will get array of bytes as parameter and
write it byte by byte into file, of course there must be inserted all necessary
data appropriate of JPG format (headers compression and etc...).
Can anybody show me how can I implement such function?
Also does anybody know where can I find detailed information about JPG
compression algorithm?
Thank you.