'Is there a convenient way to write 8-bit values to a BMP, then modify the colour palette in C++?
I am trying to write 8-bit uints to a BMP file and add my own custom colour palette into the BMP header. I want to apply the colour palette through the optional colour table in the header and not change the greyscale values to RGB triples.
I found this answer that uses C# to edit BMPs in this way but is there a C++ way? Or even something else that would be easy to add to the project?

Solution 1:[1]
The file is fine and there is no promise or convention that audio samples have constant duration. More to that, you are checking data after decoder so that question is not even related directly to WMV/ASF format itself.
I believe that standard built-in system decoder for this audio stream (Windows Media audio decoder DMO) could package the decoded audio even differently. It is the responsibility of receiving DirectShow filter to take this irregularity into consideration. As you noticed there are no playback issues - this is because audio rednerer and other filters are prepared to accept variable length media samples.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Roman R. |
