BitmapEncoder 选项参考BitmapEncoder options reference

本文列出了可用于 BitmapEncoder的编码选项。This article lists the encoding options that can be used with BitmapEncoder. 编码选项由其名称(其名称是一个字符串)和一个采用特定数据类型 (Windows.Foundation.PropertyType) 的值定义。An encoding option is defined by its name, which is a string, and a value in a particular data type (Windows.Foundation.PropertyType). 有关使用图像的信息,请参阅创建、编辑和保存位图图像For information about working with images, see Create, edit, and save bitmap images.

名称Name PropertyTypePropertyType 使用注意事项Usage notes 有效格式Valid formats
ImageQualityImageQuality singlesingle 有效值从 0 到 1.0。Valid values from 0 to 1.0. 较高的值表示较高的质量Higher values indicate higher quality JPEG、JPEG-XRJPEG, JPEG-XR
CompressionQualityCompressionQuality singlesingle 有效值从 0 到 1.0。Valid values from 0 to 1.0. 较高的值表示较高的效率和较低的压缩模式Higher values indicate a more efficient and slower compression scheme TIFFTIFF
无损Lossless booleanboolean 如果它设置为 true,将忽略 ImageQuality 选项If this is set to true, the ImageQuality option is ignored JPEG-XRJPEG-XR
InterlaceOptionInterlaceOption booleanboolean 是否隔行扫描图像Whether to interlace the image PNGPNG
FilterOptionFilterOption uint8uint8 使用 PngFilterMode 枚举Use the PngFilterMode enumeration PNGPNG
TiffCompressionMethodTiffCompressionMethod uint8uint8 使用 TiffCompressionMode 枚举Use the TiffCompressionMode enumeration TIFFTIFF
亮度Luminance uint32Arrayuint32Array 包含亮度量化常数的 64 个元素的数组An array of 64 elements containing luminance quantization constants JPEGJPEG
色度Chrominance uint32Arrayuint32Array 包含色度量化常数的 64 个元素的数组An array of 64 elements containing chrominance quantization constants JPEGJPEG
JpegYCrCbSubsamplingJpegYCrCbSubsampling uint8uint8 使用 JpegSubsamplingMode 枚举Use the JpegSubsamplingMode enumeration JPEGJPEG
SuppressApp0SuppressApp0 booleanboolean 是否取消 App0 元数据块的创建Whether to suppress the creation of an App0 metadata block JPEGJPEG
EnableV5Header32bppBGRAEnableV5Header32bppBGRA booleanboolean 是否编码到支持 alpha 的版本 5 BMPWhether to encode to a version 5 BMP which supports alpha BMPBMP