OpenTTD Source 20241224-master-gee860a5c8e
|
Read and write support for bmps. More...
#include "stdafx.h"
#include "random_access_file_type.h"
#include "bmp.h"
#include "core/bitmath_func.hpp"
#include "safeguards.h"
Go to the source code of this file.
Functions | |
static bool | BmpRead1 (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
Reads a 1 bpp uncompressed bitmap The bitmap is converted to a 8 bpp bitmap. | |
static bool | BmpRead4 (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
Reads a 4 bpp uncompressed bitmap The bitmap is converted to a 8 bpp bitmap. | |
static bool | BmpRead4Rle (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
Reads a 4-bit RLE compressed bitmap The bitmap is converted to a 8 bpp bitmap. | |
static bool | BmpRead8 (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
Reads a 8 bpp bitmap. | |
static bool | BmpRead8Rle (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
Reads a 8-bit RLE compressed bpp bitmap. | |
static bool | BmpRead24 (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
Reads a 24 bpp uncompressed bitmap. | |
bool | BmpReadHeader (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
bool | BmpReadBitmap (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
Read and write support for bmps.
Definition in file bmp.cpp.
|
inlinestatic |
Reads a 1 bpp uncompressed bitmap The bitmap is converted to a 8 bpp bitmap.
Definition at line 21 of file bmp.cpp.
References RandomAccessFile::AtEndOfFile(), GB(), BmpInfo::height, RandomAccessFile::ReadByte(), RandomAccessFile::SkipBytes(), and BmpInfo::width.
|
inlinestatic |
Reads a 24 bpp uncompressed bitmap.
Definition at line 223 of file bmp.cpp.
References RandomAccessFile::AtEndOfFile(), GB(), BmpInfo::height, RandomAccessFile::ReadByte(), RandomAccessFile::SkipBytes(), and BmpInfo::width.
|
inlinestatic |
Reads a 4 bpp uncompressed bitmap The bitmap is converted to a 8 bpp bitmap.
Definition at line 45 of file bmp.cpp.
References RandomAccessFile::AtEndOfFile(), GB(), BmpInfo::height, RandomAccessFile::ReadByte(), RandomAccessFile::SkipBytes(), and BmpInfo::width.
|
inlinestatic |
Reads a 4-bit RLE compressed bitmap The bitmap is converted to a 8 bpp bitmap.
Definition at line 71 of file bmp.cpp.
References RandomAccessFile::AtEndOfFile(), GB(), BmpInfo::height, RandomAccessFile::ReadByte(), RandomAccessFile::SkipBytes(), and BmpInfo::width.
|
inlinestatic |
Reads a 8 bpp bitmap.
Definition at line 145 of file bmp.cpp.
References RandomAccessFile::AtEndOfFile(), GB(), BmpInfo::height, RandomAccessFile::ReadByte(), RandomAccessFile::SkipBytes(), and BmpInfo::width.
|
inlinestatic |
Reads a 8-bit RLE compressed bpp bitmap.
Definition at line 161 of file bmp.cpp.
References RandomAccessFile::AtEndOfFile(), BmpInfo::height, RandomAccessFile::ReadByte(), RandomAccessFile::SkipBytes(), and BmpInfo::width.
bool BmpReadBitmap | ( | RandomAccessFile & | file, |
BmpInfo & | info, | ||
BmpData & | data | ||
) |
bool BmpReadHeader | ( | RandomAccessFile & | file, |
BmpInfo & | info, | ||
BmpData & | data | ||
) |