Bitmap Orientation and biHeight

Until now there has been some confusion over the role of the sign when describing bitmap heights (in the biHeight field of BITMAPINFOHEADER), especially when using both DirectDraw surfaces and video capture drivers simultaneously (DirectDraw surfaces heights are described in DDSURFACEDESC using the unsigned field weight). To clarify usage, the following statement comes from Microsoft’s PC99 specification:

“RGB pixel formats may be described with a BITMAPINFOHEADER that has a negative biHeight value to indicate that the vertical orientation of the image is top-down, but using the sign of biHeight to indicate orientation is only valid for RGB (uncompressed) formats. For other compression types, described with a FOURCC code in the biCompression field, the FOURCC code uniquely identifies the compression and orientation. It is not valid to describe the orientation with the sign of biHeight.

Common YUV formats such as UYVY, YV12, and YUY2 are top-down oriented. It is invalid to store an image with these compression types in bottom-up orientation. The sign of biHeight for such formats must always be set positive by drivers producing such formats, and the sign must be ignored by any driver receiving such formats. For proprietary compression formats with an associated FOURCC, any orientation is acceptable, but must always be the same for all bitmaps of that FOURCC.”

Categories Uncategorized

30 thoughts on “Bitmap Orientation and biHeight”

  1. Blog sites are a terrific method to share your ideas and ideas with the globe. They are additionally a fantastic method to develop your individual brand name.A blog is a website which contains write-ups or blog posts on a certain subject. Blog sites can be made use of for individual usage, company use, or both.

Leave a Comment

Exit mobile version