返回一个 string 数组,可作为用户界面的一部分与 getcompressionqualityvalues 一起使用,以设置或显示压缩质量级别。索引为 i 的 string 提供对质量级别范围的描述,该范围在 getcompressionqualityvalues[i] 与 getcompressionqualityvalues[i + 1] 之间。注意,从 getcompressionqualityvalues 返回的数组长度将总是大于从 getcompressionqualitydescriptions 返回的数组长度。
例如,字符串 "good"、"better" 和 "best" 可以与范围 [0, .33)、[.33, .66) 和 [.66, 1.0] 关联。在这种情况下,getcompressionqualitydescriptions 将返回 { "good", "better", "best" },getcompressionqualityvalues 将返回 { 0.0f, .33f, .66f, 1.0f }。
如果没有描述可用,则返回 null。如果从 getcompressionqualityvalues 返回 null,则此方法也必须返回 null。
应该为由 getlocale 返回的 locale 将描述本地化,如果 locale 为非 null 的话。
如果有多个压缩类型,但没有设置任何一种压缩类型,则抛出 illegalstateexception。
默认实现检查是否支持压缩,以及压缩模式是否为 mode_explicit。如果是这样,而 getcompressiontypes() 为 null 或 getcompressiontype() 为非 null,则返回 null。
- 覆盖:
- 类
imagewriteparam 中的 getcompressionqualitydescriptions
- 返回:
- 包含压缩质量级别的本地化描述的
string 数组。 - 另请参见:
imagewriteparam.getcompressionqualityvalues()