Elaztek Developer Hub
Blamite Game Engine - Guerilla (Library)  00402.09.29.23.0627.blamite
The tag editor for the Blamite Game Engine.
bitmap.cpp File Reference
#include "bitmap.h"
#include <sail/sail.h>
#include <sail-manip/sail-manip.h>
#include <map>
#include <Strings/components/utils/io/io.h>
#include <Strings/components/classes/map/map.h>
#include <Strings/components/logger/logger.h>
#include <Strings/components/utils/converters/converters.h>
#include "components/tags/fields/enum/enum.h"
#include "components/tags/fields/int/int.h"
#include "components/tags/fields/dataref/dataref.h"
#include "components/tags/fields/vector/vector.h"
#include "components/tags/fields/block/block.h"
#include "components/tags/fields/ascii/ascii.h"
#include "components/tags/tags.h"
+ Include dependency graph for bitmap.cpp:

Functions

bool validate_image_pixel_format (sail_image **image_pointer, SailPixelFormat default_pixel_format=SailPixelFormat::SAIL_PIXEL_FORMAT_BPP32_RGBA)
 Ensures that the provided image is converted to a supported pixel format. More...
 

Function Documentation

◆ validate_image_pixel_format()

bool validate_image_pixel_format ( sail_image **  image_pointer,
SailPixelFormat  default_pixel_format = SailPixelFormat::SAIL_PIXEL_FORMAT_BPP32_RGBA 
)

Ensures that the provided image is converted to a supported pixel format.

If the source image data does not use a pixel format supported by the engine, then sail will attempt to convert the image to the best possible pixel format.

Parameters
image_pointer- Pointer to the created image data.
default_pixel_format- The format to convert the image to if the original image format is not supported.
Returns
true if the image was either already in a supported format, or was successfully converted. If image conversion failed, then this will return false.
Todo:
Add support more pixel formats.
+ Here is the caller graph for this function: