|
libmx2 2.2.1
C++20 multimedia and game-engine library (SDL2 / OpenGL / Vulkan)
|
Utilities for loading and saving JPEG images. More...
Classes | |
| struct | my_error_mgr |
Typedefs | |
| typedef struct my_error_mgr * | my_error_ptr |
Functions | |
| void | my_error_exit (j_common_ptr cinfo) |
| SDL_Surface * | LoadJPEG (const char *src) |
| Load a JPEG file into an SDL_Surface. | |
| bool | SaveJPEG (SDL_Renderer *renderer, SDL_Texture *texture, const char *filename, int quality=90) |
| Save an SDL_Texture to a JPEG file. | |
Utilities for loading and saving JPEG images.
| typedef struct my_error_mgr* jpeg::my_error_ptr |
| SDL_Surface * jpeg::LoadJPEG | ( | const char * | src | ) |
Load a JPEG file into an SDL_Surface.
| src | Path to the JPEG file. |
Definition at line 32 of file jpeg.cpp.
References my_error_exit(), jpeg::my_error_mgr::pub, and jpeg::my_error_mgr::setjmp_buffer.
Referenced by mx::Texture::loadTexture().
| void jpeg::my_error_exit | ( | j_common_ptr | cinfo | ) |
Definition at line 26 of file jpeg.cpp.
References jpeg::my_error_mgr::setjmp_buffer.
Referenced by LoadJPEG().
| bool jpeg::SaveJPEG | ( | SDL_Renderer * | renderer, |
| SDL_Texture * | texture, | ||
| const char * | filename, | ||
| int | quality = 90 ) |
Save an SDL_Texture to a JPEG file.
| renderer | SDL renderer used to read back pixel data. |
| texture | Source texture. |
| filename | Destination file path. |
| quality | JPEG quality (0–100, default 90). |
true on success, false on failure. Definition at line 79 of file jpeg.cpp.
Referenced by mx::Texture::saveTexture().