Jump to content
  • Advertisement
Sign in to follow this  

Width and Height compressor output format (win32)

This topic is 3301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, How to determine if a compressor can output a certain format with a given width x height ? Currently, I use a call to ICCompressQuery() with some input / output BITMAPINFO. I specify some width and height both for input and output but it always return Ok... meaning that the compressor would support this video generation - and obviously it is not possible because later, the call AVIStreamWrite(...) will fail when the width and height are too large for a compressor. Here is the source code on which I am playing with ICCompressQuery(...) http://pierloic.free.fr/compress/width_height.html The only way I see - so far - is to try to write a dummy AVI file with the requested width and height and see if it works. I would expect ICCompressQuery(...) or one of his friends to say it the width x height is supported by a compressor. But may be it is just not possible... Any help welcome ! Thanks

Share this post

Link to post
Share on other sites
It was years ago that I messed with compression. However, a couple questions that may help.

What is the error returned from AVIStreamWrite?

What is "808802372" for the compression in the output format?

(if you specify 24bpp, I would think specifying a compression of BI_RLE8 would fail as it requires 8bpp and a color table)

Share this post

Link to post
Share on other sites


return value of AVIStreamWrite(...)

this is when the requested size (width x height)


this code was obtained from a call to ICCompressGetFormat(hic, lpbiInput, lpbiOutput)

lpbiInput is specified as the input image. Then the output image header lpbiOutput has the "biCompression" field set to 808802372

I have tried to set this flag to BI_RLE8. But that make the call ICCompressQuery() fails for any width and height.
Yes I agree with you, BI_RLE8 is anyway dedicated to 8bits color.

So, there might be an issue with this "biCompression" field but I do not know what to set here.


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!