Flutter Engine
The Flutter Engine
Public Attributes | List of all members
SkPngEncoder::Options Struct Reference

#include <SkPngEncoder.h>

Public Attributes

FilterFlag fFilterFlags = FilterFlag::kAll
 
int fZLibLevel = 6
 
sk_sp< SkDataTablefComments
 
const skcms_ICCProfilefICCProfile = nullptr
 
const char * fICCProfileDescription = nullptr
 

Detailed Description

Definition at line 41 of file SkPngEncoder.h.

Member Data Documentation

◆ fComments

sk_sp<SkDataTable> SkPngEncoder::Options::fComments

Represents comments in the tEXt ancillary chunk of the png. The 2i-th entry is the keyword for the i-th comment, and the (2i + 1)-th entry is the text for the i-th comment.

Definition at line 72 of file SkPngEncoder.h.

◆ fFilterFlags

FilterFlag SkPngEncoder::Options::fFilterFlags = FilterFlag::kAll

Selects which filtering strategies to use.

If a single filter is chosen, libpng will use that filter for every row.

If multiple filters are chosen, libpng will use a heuristic to guess which filter will encode smallest, then apply that filter. This happens on a per row basis, different rows can use different filters.

Using a single filter (or less filters) is typically faster. Trying all of the filters may help minimize the output file size.

Our default value matches libpng's default.

Definition at line 56 of file SkPngEncoder.h.

◆ fICCProfile

const skcms_ICCProfile* SkPngEncoder::Options::fICCProfile = nullptr

An optional ICC profile to override the default behavior.

The default behavior is to generate an ICC profile using a primary matrix and analytic transfer function. If the color space of |src| cannot be represented in this way (e.g, it is HLG or PQ), then no profile will be embedded.

Definition at line 81 of file SkPngEncoder.h.

◆ fICCProfileDescription

const char* SkPngEncoder::Options::fICCProfileDescription = nullptr

Definition at line 82 of file SkPngEncoder.h.

◆ fZLibLevel

int SkPngEncoder::Options::fZLibLevel = 6

Must be in [0, 9] where 9 corresponds to maximal compression. This value is passed directly to zlib. 0 is a special case to skip zlib entirely, creating dramatically larger pngs.

Our default value matches libpng's default.

Definition at line 65 of file SkPngEncoder.h.


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