XII Release 0.1.0
Loading...
Searching...
No Matches
xiiImageFileFormat Class Referenceabstract
Inheritance diagram for xiiImageFileFormat:
[legend]

Public Member Functions

virtual xiiResult ReadImageDescription (xiiStreamReader &inout_stream, xiiGALTextureCreationDescription &ref_description, xiiStringView 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 xiiResult ReadImage (xiiStreamReader &inout_stream, xiiImage &ref_image, xiiStringView sFileExtension) const =0
 Reads the data from the given stream and creates the image from it. Errors are written to the given xiiLogInterface.
virtual xiiResult WriteImage (xiiStreamWriter &inout_stream, const xiiImageView &image, xiiStringView sFileExtension) const =0
 Writes the data to the given stream in this format. Errors are written to the given xiiLogInterface.
virtual bool CanReadFileType (xiiStringView sExtension) const =0
 Should return true, if files with the given extension can be read.
virtual bool CanWriteFileType (xiiStringView sExtension) const =0
 Should return true, if files with the given extension can be written.

Static Public Member Functions

static const xiiImageFileFormat * GetReaderFormat (xiiStringView sExtension)
 Returns a xiiImageFileFormat that can read the given extension. Returns nullptr if there is no appropriate xiiImageFileFormat.
static const xiiImageFileFormat * GetWriterFormat (xiiStringView sExtension)
 Returns a xiiImageFileFormat that can write the given extension. Returns nullptr if there is no appropriate xiiImageFileFormat.
static xiiResult ReadImageDescription (xiiStringView sFileName, xiiGALTextureCreationDescription &ref_description)

Member Function Documentation

◆ CanReadFileType()

virtual bool xiiImageFileFormat::CanReadFileType ( xiiStringView sExtension) const
pure virtual

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

Implemented in xiiDdsFileFormat, xiiStbImageFileFormats, and xiiTgaFileFormat.

◆ CanWriteFileType()

virtual bool xiiImageFileFormat::CanWriteFileType ( xiiStringView sExtension) const
pure virtual

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

Implemented in xiiDdsFileFormat, xiiStbImageFileFormats, and xiiTgaFileFormat.

◆ GetReaderFormat()

const xiiImageFileFormat * xiiImageFileFormat::GetReaderFormat ( xiiStringView sExtension)
static

Returns a xiiImageFileFormat that can read the given extension. Returns nullptr if there is no appropriate xiiImageFileFormat.

Copyright (c) Theophilus Eriata. All Rights Reserved.

◆ ReadImage()

virtual xiiResult xiiImageFileFormat::ReadImage ( xiiStreamReader & inout_stream,
xiiImage & ref_image,
xiiStringView sFileExtension ) const
pure virtual

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

Implemented in xiiDdsFileFormat, xiiStbImageFileFormats, and xiiTgaFileFormat.

◆ ReadImageDescription()

virtual xiiResult xiiImageFileFormat::ReadImageDescription ( xiiStreamReader & inout_stream,
xiiGALTextureCreationDescription & ref_description,
xiiStringView 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 xiiDdsFileFormat, xiiStbImageFileFormats, and xiiTgaFileFormat.

◆ WriteImage()

virtual xiiResult xiiImageFileFormat::WriteImage ( xiiStreamWriter & inout_stream,
const xiiImageView & image,
xiiStringView sFileExtension ) const
pure virtual

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

Implemented in xiiDdsFileFormat, xiiStbImageFileFormats, and xiiTgaFileFormat.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Texture/Image/Formats/ImageFileFormat.h
  • /home/runner/work/XII/XII/Source/Engine/Texture/Image/Implementation/ImageFileFormat.cpp