ezEngine Release 25.08
Loading...
Searching...
No Matches
ezImageFileFormat Class Referenceabstract
Inheritance diagram for ezImageFileFormat:

Public Member Functions

virtual ezResult ReadImageHeader (ezStreamReader &inout_stream, ezImageHeader &ref_header, ezStringView sFileExtension) const =0
 Reads only the header information for an image and ignores the data. Much faster than reading the entire image, if the pixel data is not needed.
 
virtual ezResult ReadImage (ezStreamReader &inout_stream, ezImage &ref_image, ezStringView sFileExtension) const =0
 Reads the data from the given stream and creates the image from it. Errors are written to the given ezLogInterface.
 
virtual ezResult WriteImage (ezStreamWriter &inout_stream, const ezImageView &image, ezStringView sFileExtension) const =0
 Writes the data to the given stream in this format. Errors are written to the given ezLogInterface.
 
virtual bool CanReadFileType (ezStringView sExtension) const =0
 Should return true, if files with the given extension can be read.
 
virtual bool CanWriteFileType (ezStringView sExtension) const =0
 Should return true, if files with the given extension can be written.
 

Static Public Member Functions

static const ezImageFileFormatGetReaderFormat (ezStringView sExtension)
 Returns an ezImageFileFormat that can read the given extension. Returns nullptr if there is no appropriate ezImageFileFormat.
 
static const ezImageFileFormatGetWriterFormat (ezStringView sExtension)
 Returns an ezImageFileFormat that can write the given extension. Returns nullptr if there is no appropriate ezImageFileFormat.
 
static ezResult ReadImageHeader (ezStringView sFileName, ezImageHeader &ref_header)
 

Member Function Documentation

◆ CanReadFileType()

virtual bool ezImageFileFormat::CanReadFileType ( ezStringView  sExtension) const
pure virtual

Should return true, if files with the given extension can be read.

Implemented in ezBmpFileFormat, ezDdsFileFormat, ezStbImageFileFormats, and ezTgaFileFormat.

◆ CanWriteFileType()

virtual bool ezImageFileFormat::CanWriteFileType ( ezStringView  sExtension) const
pure virtual

Should return true, if files with the given extension can be written.

Implemented in ezBmpFileFormat, ezDdsFileFormat, ezStbImageFileFormats, and ezTgaFileFormat.

◆ ReadImage()

virtual ezResult ezImageFileFormat::ReadImage ( ezStreamReader inout_stream,
ezImage ref_image,
ezStringView  sFileExtension 
) const
pure virtual

Reads the data from the given stream and creates the image from it. Errors are written to the given ezLogInterface.

Implemented in ezBmpFileFormat, ezDdsFileFormat, ezStbImageFileFormats, and ezTgaFileFormat.

◆ ReadImageHeader()

virtual ezResult ezImageFileFormat::ReadImageHeader ( ezStreamReader inout_stream,
ezImageHeader ref_header,
ezStringView  sFileExtension 
) const
pure virtual

Reads only the header information for an image and ignores the data. Much faster than reading the entire image, if the pixel data is not needed.

Implemented in ezBmpFileFormat, ezDdsFileFormat, ezStbImageFileFormats, and ezTgaFileFormat.

◆ WriteImage()

virtual ezResult ezImageFileFormat::WriteImage ( ezStreamWriter inout_stream,
const ezImageView image,
ezStringView  sFileExtension 
) const
pure virtual

Writes the data to the given stream in this format. Errors are written to the given ezLogInterface.

Implemented in ezBmpFileFormat, ezDdsFileFormat, ezStbImageFileFormats, and ezTgaFileFormat.


The documentation for this class was generated from the following files: