Enum BitonalCompressionMode
- java.lang.Object
-
- java.lang.Enum<BitonalCompressionMode>
-
- com.ironsoftware.ironpdf.compression.BitonalCompressionMode
-
- All Implemented Interfaces:
Serializable,Comparable<BitonalCompressionMode>
public enum BitonalCompressionMode extends Enum<BitonalCompressionMode>
How the advanced compression pipeline handles bitonal (1-bit black/white) image encoding for scanned documents. SeeAdvancedCompressionOptions.setBitonalMode(BitonalCompressionMode).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetValue()The wire value the engine expects onPdfiumCompressImagesRequestP.bitonal_mode.static BitonalCompressionModevalueOf(String name)Returns the enum constant of this type with the specified name.static BitonalCompressionMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OFF
public static final BitonalCompressionMode OFF
Disabled (default). Images are compressed with the normal JPEG pipeline.
-
FORCE
public static final BitonalCompressionMode FORCE
Force every eligible 8-bit image to be thresholded to 1-bit and CCITT Group 4 encoded. The result is kept only when it is smaller than the JPEG encoding, so it never enlarges an image, but thresholding is lossy: use it only for black-and-white scans or line art, not colour or photographic content.
-
-
Method Detail
-
values
public static BitonalCompressionMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BitonalCompressionMode c : BitonalCompressionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BitonalCompressionMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public int getValue()
The wire value the engine expects onPdfiumCompressImagesRequestP.bitonal_mode.- Returns:
- 0 for off, 1 for force
-
-