How do I find the BITMAPINFOHEADER of a image
-
Hi Im using AVIStreamWrite to create a video using a string of JPG's from a ethernet camera. I believe that I have to use aviSetFormat before I can use the above function. One of the arguments for the aviSetFormat function is a BITMAPINFOHEADER. I have tried settings it up manually but the video is just black. So is there a way of finding the BITMAPINFOHEADER of a image using a function call? Thanks
-
Hi Im using AVIStreamWrite to create a video using a string of JPG's from a ethernet camera. I believe that I have to use aviSetFormat before I can use the above function. One of the arguments for the aviSetFormat function is a BITMAPINFOHEADER. I have tried settings it up manually but the video is just black. So is there a way of finding the BITMAPINFOHEADER of a image using a function call? Thanks
There is some code here[^] that does what you are trying to do. Have a look to see if it helps.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? Because 31 Oct = 25 Dec.
-
There is some code here[^] that does what you are trying to do. Have a look to see if it helps.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? Because 31 Oct = 25 Dec.
Thank you for the reply. I have managed to get it to create avi's with uncompressed images but my problem is that I dont know how to add compressed images. I need to know the BITMAPINFOHEADER.Compressed parameter. Do you know how I can get this parameter from the image? Thanks
-
Thank you for the reply. I have managed to get it to create avi's with uncompressed images but my problem is that I dont know how to add compressed images. I need to know the BITMAPINFOHEADER.Compressed parameter. Do you know how I can get this parameter from the image? Thanks
According to A Simple C# Wrapper for the AviFile Library[^] you cannot add compressed images directly. It seems that you have to create a new
Stream
add them to that, then add the new stream. Anyway the article explains it better than I can. Although, from a very quick read, it does not seem to useBITMAPINFOHEADER.Compressed
it seems to manage the whole thing. Once again, I hope that if it is not sufficient by itself, that it gives you some ideas.Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'