public class JpegIO extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_PROGRESSIVE
Progressive encoding is disabled by default to increase compatibility.
|
static int |
DEFAULT_QUALITY
Default quality is 85%, which is reasonably good.
|
| Constructor and Description |
|---|
JpegIO() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
compressToJpeg(Pix pixs)
Returns a compressed JPEG byte representation of this Pix using default
parameters.
|
static byte[] |
compressToJpeg(Pix pixs,
int quality,
boolean progressive)
Returns a compressed JPEG byte representation of this Pix.
|
public static final int DEFAULT_QUALITY
public static final boolean DEFAULT_PROGRESSIVE
public static byte[] compressToJpeg(Pix pixs)
pixs - A source Pix image.public static byte[] compressToJpeg(Pix pixs, int quality, boolean progressive)
pixs - A source pix image.quality - The quality of the compressed image. Valid range is 0-100.progressive - Whether to use progressive compression.