GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::resource::ImageSavePNGOptions Struct Reference

Options for saving an image in PNG format. More...

#include <GREM/resource/Image.hpp>

Public Types

enum class  FilterType : uint8_t {
  NONE = 0 , SUB = 1 , UP = 2 , AVERAGE = 3 ,
  PAETH = 4
}

Public Attributes

ImageSubresource subresource
 Subresource of the image to save.
size_t compressionLevel = 8
 Deflate compression level.
Optional< FilterType > filterTypeOverride {}
 Specific PNG filter type to use instead of choosing automatically for each scanline.

Detailed Description

Options for saving an image in PNG format.

Member Enumeration Documentation

◆ FilterType

Enumerator
NONE 
SUB 
UP 
AVERAGE 
PAETH 

Member Data Documentation

◆ subresource

ImageSubresource grem::resource::ImageSavePNGOptions::subresource
Initial value:
{
.layer = 0,
.mipLevel = 0,
}

Subresource of the image to save.

◆ compressionLevel

size_t grem::resource::ImageSavePNGOptions::compressionLevel = 8

Deflate compression level.

Higher values yield smaller compressed sizes at the cost of potentially slower compression/decompression speed and higher memory usage during compression.

Note
PNG compression is lossless, so the image will retain the same visual quality regardless of compression level.

◆ filterTypeOverride

Optional<FilterType> grem::resource::ImageSavePNGOptions::filterTypeOverride {}

Specific PNG filter type to use instead of choosing automatically for each scanline.


The documentation for this struct was generated from the following file: