File Header Structure#
-
struct FileHeader : public FileSection#
Public Functions
-
FileHeader() = default#
-
inline FileHeader(Enum::Version version, uint16_t numChannels, uint32_t width, uint32_t height, Enum::BitDepth depth, Enum::ColorMode colorMode)#
Each FileSection must implement a way to calculate its own section size in bytes based on the data it holds. This is important for writing to disk as we sometimes hold a section size marker. The size must include this marker (if applicable) and when writing the marker we subtract the size of it.
Note
Any sections that include image data (LayerAndMaskInformation and ImageData) will not be able to calculate the section size due to offloading the compression to the write step. For these sections the size calculation gets done on write.
- Parameters:
header – An optional ptr to the document FileHeader, only some functions require this to be present
-
void read(File &document)#
Read and Initialize the FileHeader from disk.
-
FileHeader() = default#