Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qbmphandler.cpp File Reference

(7f51608013ba4352d6c5acf77172a7929d7cfdb6)

#include "private/qbmphandler_p.h"
#include <qimage.h>
#include <qlist.h>
#include <qvariant.h>
Include dependency graph for qbmphandler.cpp:

Go to the source code of this file.

Functions

static QT_BEGIN_NAMESPACE void swapPixel01 (QImage *image)
static QDataStreamoperator>> (QDataStream &s, BMP_FILEHDR &bf)
static QDataStreamoperator<< (QDataStream &s, const BMP_FILEHDR &bf)
static QDataStreamoperator>> (QDataStream &s, BMP_INFOHDR &bi)
static QDataStreamoperator<< (QDataStream &s, const BMP_INFOHDR &bi)
static uint calc_shift (uint mask)
static uint calc_scale (uint low_mask)
static uint apply_scale (uint value, uint scale)
static bool read_dib_fileheader (QDataStream &s, BMP_FILEHDR &bf)
static bool read_dib_infoheader (QDataStream &s, BMP_INFOHDR &bi)
static bool read_dib_body (QDataStream &s, const BMP_INFOHDR &bi, qint64 datapos, qint64 startpos, QImage &image)
bool qt_write_dib (QDataStream &s, const QImage &image, int bpl, int bpl_bmp, int nbits)

Variables

const int BMP_FILEHDR_SIZE = 14
const int BMP_OLD = 12
const int BMP_WIN = 40
const int BMP_OS2 = 64
const int BMP_WIN4 = 108
const int BMP_WIN5 = 124
const int BMP_RGB = 0
const int BMP_RLE8 = 1
const int BMP_RLE4 = 2
const int BMP_BITFIELDS = 3
const int BMP_ALPHABITFIELDS = 4

Function Documentation

◆ apply_scale()

uint apply_scale ( uint value,
uint scale )
inlinestatic

Definition at line 159 of file qbmphandler.cpp.

◆ calc_scale()

uint calc_scale ( uint low_mask)
static

Definition at line 149 of file qbmphandler.cpp.

◆ calc_shift()

uint calc_shift ( uint mask)
static

Definition at line 139 of file qbmphandler.cpp.

◆ operator<<() [1/2]

QDataStream & operator<< ( QDataStream & s,
const BMP_FILEHDR & bf )
static

Definition at line 54 of file qbmphandler.cpp.

◆ operator<<() [2/2]

QDataStream & operator<< ( QDataStream & s,
const BMP_INFOHDR & bi )
static

Definition at line 106 of file qbmphandler.cpp.

References BMP_WIN4, and BMP_WIN5.

◆ operator>>() [1/2]

QDataStream & operator>> ( QDataStream & s,
BMP_FILEHDR & bf )
static

Definition at line 47 of file qbmphandler.cpp.

◆ operator>>() [2/2]

QDataStream & operator>> ( QDataStream & s,
BMP_INFOHDR & bi )
static

Definition at line 75 of file qbmphandler.cpp.

References BMP_OS2, BMP_RGB, BMP_WIN, BMP_WIN4, and BMP_WIN5.

◆ qt_write_dib()

bool qt_write_dib ( QDataStream & s,
const QImage & image,
int bpl,
int bpl_bmp,
int nbits )

Definition at line 584 of file qbmphandler.cpp.

References BMP_RGB, and BMP_WIN.

◆ read_dib_body()

bool read_dib_body ( QDataStream & s,
const BMP_INFOHDR & bi,
qint64 datapos,
qint64 startpos,
QImage & image )
static

Definition at line 209 of file qbmphandler.cpp.

References BMP_ALPHABITFIELDS, BMP_BITFIELDS, BMP_OLD, BMP_RGB, BMP_RLE4, BMP_RLE8, BMP_WIN4, and swapPixel01().

Here is the call graph for this function:

◆ read_dib_fileheader()

bool read_dib_fileheader ( QDataStream & s,
BMP_FILEHDR & bf )
static

Definition at line 175 of file qbmphandler.cpp.

◆ read_dib_infoheader()

bool read_dib_infoheader ( QDataStream & s,
BMP_INFOHDR & bi )
static

Definition at line 188 of file qbmphandler.cpp.

References BMP_BITFIELDS, BMP_RGB, BMP_RLE4, and BMP_RLE8.

◆ swapPixel01()

QT_BEGIN_NAMESPACE void swapPixel01 ( QImage * image)
static

Definition at line 15 of file qbmphandler.cpp.

Referenced by read_dib_body().

Here is the caller graph for this function:

Variable Documentation

◆ BMP_ALPHABITFIELDS

const int BMP_ALPHABITFIELDS = 4

Definition at line 72 of file qbmphandler.cpp.

Referenced by read_dib_body().

◆ BMP_BITFIELDS

const int BMP_BITFIELDS = 3

Definition at line 71 of file qbmphandler.cpp.

Referenced by read_dib_body(), and read_dib_infoheader().

◆ BMP_FILEHDR_SIZE

const int BMP_FILEHDR_SIZE = 14

Definition at line 45 of file qbmphandler.cpp.

◆ BMP_OLD

const int BMP_OLD = 12

Definition at line 62 of file qbmphandler.cpp.

Referenced by read_dib_body().

◆ BMP_OS2

const int BMP_OS2 = 64

Definition at line 64 of file qbmphandler.cpp.

Referenced by operator>>().

◆ BMP_RGB

const int BMP_RGB = 0

Definition at line 68 of file qbmphandler.cpp.

Referenced by operator>>(), qt_write_dib(), read_dib_body(), and read_dib_infoheader().

◆ BMP_RLE4

const int BMP_RLE4 = 2

Definition at line 70 of file qbmphandler.cpp.

Referenced by read_dib_body(), and read_dib_infoheader().

◆ BMP_RLE8

const int BMP_RLE8 = 1

Definition at line 69 of file qbmphandler.cpp.

Referenced by read_dib_body(), and read_dib_infoheader().

◆ BMP_WIN

const int BMP_WIN = 40

Definition at line 63 of file qbmphandler.cpp.

Referenced by operator>>(), and qt_write_dib().

◆ BMP_WIN4

const int BMP_WIN4 = 108

Definition at line 65 of file qbmphandler.cpp.

Referenced by operator<<(), operator>>(), and read_dib_body().

◆ BMP_WIN5

const int BMP_WIN5 = 124

Definition at line 66 of file qbmphandler.cpp.

Referenced by operator<<(), and operator>>().