Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How do I find the BITMAPINFOHEADER of a image

How do I find the BITMAPINFOHEADER of a image

Scheduled Pinned Locked Moved C#
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TimSWatson
    wrote on last edited by
    #1

    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

    H 1 Reply Last reply
    0
    • T TimSWatson

      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

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      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.

      T 1 Reply Last reply
      0
      • H Henry Minute

        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.

        T Offline
        T Offline
        TimSWatson
        wrote on last edited by
        #3

        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

        H 1 Reply Last reply
        0
        • T TimSWatson

          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

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          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 use BITMAPINFOHEADER.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.'

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups