C4 Engine
C4 Engine API Documentation

ImageImportPlugin::GetImageFileInfo

Defined in:  C4Plugins.h
Returns information about an image file.
Prototype

virtual EngineResult GetImageFileInfo(const char *name, Integer2D *size, uint32 *flags = nullptrint32 *count = nullptr) = 0;

Parameters
name The file name of the image, relative to the engine executable.
size A pointer to a location that receives the dimensions of the image. This cannot be nullptr.
flags A pointer to a location that receives flags pertaining to the image. This can be nullptr if this information is not needed.
count A pointer to a location that receives the number of images stored in the file. This can be nullptr if this information is not needed.
Description
The GetImageFileInfo function returns information about the image file specified by the name paramater. If the function succeeds, then the return value is kEngineOkay. If an error occurred, then the result code corresponding to the error is returned. The horizontal and vertical dimensions of the image are stored in the location specified by the size parameter. If the flags parameter is not nullptr, then flags pertaining to the image are stored in the location it points to. The flags can be a combination (through logical OR) of the following constants.
kImageImportAlpha The imported image includes an alpha channel.
If the count parameter is not nullptr, then the number of images in the file is stored in the location it points to. (For most formats, this count is expected to be one.) The GetImageFileInfo function must be overridden by subclasses of the ImageImportPlugin class.
See Also

ImageImportPlugin::GetImageFormat

ImageImportPlugin::ImportImageFile