tagparser/avi/bitmapinfoheader.cpp

52 lines
1.2 KiB
C++
Raw Permalink Normal View History

2015-09-06 19:57:33 +02:00
#include "./bitmapinfoheader.h"
2015-06-11 00:27:34 +02:00
#include <c++utilities/io/binaryreader.h>
2019-06-10 22:49:11 +02:00
using namespace CppUtilities;
2015-06-11 00:27:34 +02:00
namespace TagParser {
2015-06-11 00:27:34 +02:00
/*!
* \class TagParser::BitmapInfoHeader
2015-06-11 00:27:34 +02:00
* \brief The BitmapInfoHeader class parses the BITMAPINFOHEADER structure defined by MS.
*/
/*!
* \brief Constructs a new BitmapInfoHeader.
*/
2018-03-07 01:17:50 +01:00
BitmapInfoHeader::BitmapInfoHeader()
: size(0)
, width(0)
, height(0)
, planes(0)
, bitCount(0)
, compression(0)
, imageSize(0)
, horizontalResolution(0)
, verticalResolution(0)
, clrUsed(0)
, clrImportant(0)
{
}
2015-06-11 00:27:34 +02:00
/*!
* \brief Parses the BITMAPINFOHEADER structure using the specified \a reader.
* \remarks 0x28 byte will be read from the associated stream.
*/
void BitmapInfoHeader::parse(BinaryReader &reader)
{
size = reader.readUInt32LE();
width = reader.readUInt32LE();
height = reader.readUInt32LE();
planes = reader.readUInt16LE();
bitCount = reader.readUInt16LE();
compression = reader.readUInt32BE();
imageSize = reader.readUInt32LE();
horizontalResolution = reader.readUInt32LE();
verticalResolution = reader.readUInt32LE();
clrUsed = reader.readUInt32LE();
clrImportant = reader.readUInt32LE();
}
2018-03-07 01:17:50 +01:00
} // namespace TagParser