Plasma Engine  2.0
Loading...
Searching...
No Matches
ExrFileFormat.h
1#pragma once
2
3#include <Texture/Image/Formats/ImageFileFormat.h>
4
5#if PL_DISABLED(PL_PLATFORM_WINDOWS_UWP)
6
8class PL_TEXTURE_DLL plExrFileFormat : public plImageFileFormat
9{
10public:
11 plResult ReadImageHeader(plStreamReader& ref_stream, plImageHeader& ref_header, plStringView sFileExtension) const override;
12 plResult ReadImage(plStreamReader& ref_stream, plImage& ref_image, plStringView sFileExtension) const override;
13 plResult WriteImage(plStreamWriter& ref_stream, const plImageView& image, plStringView sFileExtension) const override;
14
15 bool CanReadFileType(plStringView sExtension) const override;
16 bool CanWriteFileType(plStringView sExtension) const override;
17};
18
19#endif
Definition ImageFileFormat.h:17
virtual bool CanWriteFileType(plStringView sExtension) const =0
Should return true, if files with the given extension can be written.
virtual bool CanReadFileType(plStringView sExtension) const =0
Should return true, if files with the given extension can be read.
virtual plResult WriteImage(plStreamWriter &inout_stream, const plImageView &image, plStringView sFileExtension) const =0
Writes the data to the given stream in this format. Errors are written to the given plLogInterface.
virtual plResult ReadImageHeader(plStreamReader &inout_stream, plImageHeader &ref_header, plStringView sFileExtension) const =0
Reads only the header information for an image and ignores the data. Much faster than reading the ent...
virtual plResult ReadImage(plStreamReader &inout_stream, plImage &ref_image, plStringView sFileExtension) const =0
Reads the data from the given stream and creates the image from it. Errors are written to the given p...
A class containing image meta data, such as format and dimensions.
Definition ImageHeader.h:15
A class containing image data and associated meta data.
Definition Image.h:103
A class referencing image data and holding metadata about the image.
Definition Image.h:13
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54