Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Attributes | List of all members
SkJpegEncoder::Options Struct Reference

#include <SkJpegEncoder.h>

Public Attributes

int fQuality = 100
 
Downsample fDownsample = Downsample::k420
 
AlphaOption fAlphaOption = AlphaOption::kIgnore
 
const SkDataxmpMetadata = nullptr
 
const skcms_ICCProfilefICCProfile = nullptr
 
const char * fICCProfileDescription = nullptr
 

Detailed Description

Definition at line 50 of file SkJpegEncoder.h.

Member Data Documentation

◆ fAlphaOption

AlphaOption SkJpegEncoder::Options::fAlphaOption = AlphaOption::kIgnore

Jpegs must be opaque. This instructs the encoder on how to handle input images with alpha.

The default is to ignore the alpha channel and treat the image as opaque. Another option is to blend the pixels onto a black background before encoding. In the second case, the encoder supports linear or legacy blending.

Definition at line 73 of file SkJpegEncoder.h.

◆ fDownsample

Downsample SkJpegEncoder::Options::fDownsample = Downsample::k420

Choose the downsampling factor for the U and V components. This is only meaningful if the |src| is not kGray, since kGray will not be encoded as YUV. This is ignored in favor of |src|'s subsampling when |src| is an SkYUVAPixmaps.

Our default value matches the libjpeg-turbo default.

Definition at line 63 of file SkJpegEncoder.h.

◆ fICCProfile

const skcms_ICCProfile* SkJpegEncoder::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 87 of file SkJpegEncoder.h.

◆ fICCProfileDescription

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

Definition at line 88 of file SkJpegEncoder.h.

◆ fQuality

int SkJpegEncoder::Options::fQuality = 100

|fQuality| must be in [0, 100] where 0 corresponds to the lowest quality.

Definition at line 54 of file SkJpegEncoder.h.

◆ xmpMetadata

const SkData* SkJpegEncoder::Options::xmpMetadata = nullptr

Optional XMP metadata.

Definition at line 78 of file SkJpegEncoder.h.


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