|
OpenTTD Source 20260218-master-g2123fca5ea
|
Read and write support for bmps. More...
Go to the source code of this file.
Data Structures | |
| struct | BmpInfo |
| struct | BmpData |
Functions | |
| bool | BmpReadHeader (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
| Reads bitmap headers, and palette (if any). | |
| bool | BmpReadBitmap (RandomAccessFile &file, BmpInfo &info, BmpData &data) |
| Reads the bitmap 1 bpp and 4 bpp bitmaps are converted to 8 bpp bitmaps. | |
Read and write support for bmps.
Definition in file bmp.h.
| bool BmpReadBitmap | ( | RandomAccessFile & | file, |
| BmpInfo & | info, | ||
| BmpData & | data ) |
Reads the bitmap 1 bpp and 4 bpp bitmaps are converted to 8 bpp bitmaps.
| file | The file to read. |
| info | The already read medata. |
| data | The buffer to read the image into. |
true iff the file could be read without problems. Definition at line 313 of file bmp.cpp.
References BmpRead1(), BmpRead24(), BmpRead4(), BmpRead4Rle(), BmpRead8(), BmpRead8Rle(), BmpInfo::bpp, BmpInfo::compression, BmpInfo::height, BmpInfo::offset, RandomAccessFile::SeekTo(), and BmpInfo::width.
Referenced by ReadHeightmapBMP().
| bool BmpReadHeader | ( | RandomAccessFile & | file, |
| BmpInfo & | info, | ||
| BmpData & | data ) |
Reads bitmap headers, and palette (if any).
Reads the bitmap 1 bpp and 4 bpp bitmaps are converted to 8 bpp bitmaps.
| file | The file to read. |
| info | The already read medata. |
| data | The buffer to read the image into. |
true iff the file could be read without problems. Definition at line 236 of file bmp.cpp.
References BmpInfo::bpp, BmpInfo::compression, RandomAccessFile::GetPos(), BmpInfo::height, BmpInfo::offset, BmpInfo::os2_bmp, BmpInfo::palette_size, RandomAccessFile::ReadByte(), RandomAccessFile::ReadDword(), RandomAccessFile::ReadWord(), RandomAccessFile::SkipBytes(), and BmpInfo::width.
Referenced by ReadHeightmapBMP().