Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
|
Reader for Netpbm image files.
This class allows to read a Netpbm image file (type 2 or 3) into an SDL_Surface object.
#include "ui_base.H"
Public Member Functions | |
Feeding the reader ... | |
void | Clear () |
Reset reader (not necessary at the first time). | |
void | Put (const char *line) |
Put a text line. | |
Obtaining the status and result ... | |
int | State () |
bool | Running () |
bool | Error () |
bool | Success () |
SDL_Surface * | Surface () |
Return surface on success or NULL in all other cases. More... | |
High-level readers ... | |
bool | ReadFile (const char *fileName) |
bool | ReadStream (int fd) |
bool | ReadShell (CShell *shell) |
|
inline |
Return surface on success or NULL in all other cases.
For grey images (type 'P2'), the grey value is mapped to the alpha channel, whereas the RGB channels contain the color 'WHITE'. The color can be changed using 'SurfaceRecolor', eventually followed by 'SurfaceGetOpaqueCopy'.