Package io.scanbot.sdk.pdfgeneration
Enum Class ResamplingMethod
- All Implemented Interfaces:
Serializable,Comparable<ResamplingMethod>,Constable
Resampling method.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAccurate, produces moire-free results, but tends to produce blurrier images.Bi-cubic interpolation.Lanczos (Sinc) interpolation over 8x8 neighborhood.Bi-linear interpolation.Nearest-neighbor interpolation.Always geometrically rescale the image to fit the page if necessary. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResamplingMethodReturns the enum constant of this class with the specified name.static ResamplingMethod[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Always geometrically rescale the image to fit the page if necessary. Fast. Otherwise, downscale the bitmap to match the `dpi` setting via the selected method before adding it to the PDF if the calculated image DPI after stretching is greater than `dpi`. Slower. -
NEAREST
Nearest-neighbor interpolation. Lowest quality. Produces blocky images, especially when upsampling. -
LINEAR
Bi-linear interpolation. Better quality than nearest-neighbor, slower. Okay when the target size is not too different from the source size. -
CUBIC
Bi-cubic interpolation. Better quality than bi-linear, slower. Produces high-quality results in a larger range than that of bi-linear. -
LANCZOS4
Lanczos (Sinc) interpolation over 8x8 neighborhood. Produces very high quality results, but slower than bi-cubic. Retains sharp edges like those of text when downsampling. -
AREA
Accurate, produces moire-free results, but tends to produce blurrier images. When upsampling, it is similar to nearest-neighbor.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-