Link

Image Options

JDeli includes a EncoderOptions class for each format it can write, these classes allow you to have greater control over of the options used during the encoding. You can use these options by setting them in the class that matches the file type you wish to encode to and pass it into either of the following methods.

List of Image Options in JDeli

  1. BMP
  2. HEIC
  3. JPEG
    1. Quality
  4. JPEG2000
    1. Output Subtype
    2. Quality
  5. PDF
  6. PNG
    1. Compression
    2. Optimize Based On Colors
  7. TIFF
    1. Compression
    2. Resolution Units
    3. Resolution X
    4. Resolution Y
    5. Xmp Metadata
  8. WEBP

BMP

No additional options are currently available for this format.


HEIC

No additional options are currently available for this format.


JPEG

Quality

Control the image quality level for JPEG output. Higher values produce better quality JPEG files but increase the output data size.
This can be set using JpegEncoderOptions.setQuality(int).

Accepted Values
1 - 100

Default Value
75


JPEG2000

Output Subtype

Controls the type of JPEG2000 this file is encoded as, JP2 or JPX.
This can be set using Jpeg2000EncoderOptions.getOutputSubtype(Jpeg2000OutputSubtype).

Accepted Values
Any value of the Jpeg2000OutputSubtype enum

Default Value
Jpeg2000OutputSubtype.JPX

Quality

Control the image quality level for JPEG output. Higher values produce better quality JPEG files but increase the output data size.
This can be set using Jpeg2000EncoderOptions.setQuality(int).

Accepted Values
1 - 100

Default Value
50


PDF

No additional options are currently available for this format.


PNG

Compression

Sets the type of compression to be used when encoding the image.
This can be set using PngEncoderOptions.setCompressionFormat(PngCompressionFormat).

Accepted Values
Any value of the PngCompressionFormat enum

Default Value
PngCompressionFormat.ZLIB_BETTER_COMPRESSION

Optimize Based On Colors

Set a flag that requires JDeli to optimize the file based one the color content
This can be set using PngEncoderOptions.setOptimizeBasedOnColors(boolean).

Accepted Values

  • true
  • false

Default Value
false


TIFF

Compression

Set the type of compression to be used when encoding the image.
This can be set using TiffEncoderOptions.setCompressionFormat(PngCompressionFormat).

Accepted Values
Any value of the TiffCompressionFormat enum

Default Value
TiffCompressionFormat.DEFLATE_BETTER_COMPRESSION

Resolution Units

Set the units used for the resolution.
This can be set using TiffEncoderOptions.setResolutionUnit(TiffResolutionUnit).

Accepted Values
Any value of the TiffResolutionUnit enum

Default Value
TiffResolutionUnit.NONE

Resolution X

Set the x resolution for this image
This can be set using TiffEncoderOptions.setXResolution(int).

Accepted Values
Any positive integer value or -1 to leave unset in file

Default Value
-1

Resolution Y

Set the y resolution for this image
This can be set using TiffEncoderOptions.setYResolution(int).

Accepted Values
Any positive integer value or -1 to leave unset in file

Default Value
-1

Xmp Metadata

Sets the metadata for this file.
This can be set using TiffEncoderOptions.setXmpMetaData(String).

Accepted Values
A String representing the metadata for this file

Default Value
None


WEBP

No additional options are currently available for this format.

Still need help? Send us your questions.