tjGetScaledSize() would never be able to accommodate scaling factors > 1, so replace it with a function that returns a list of fractional scaling factors that TurboJPEG supports.
This commit is contained in:
@@ -30,6 +30,11 @@ package org.libjpegturbo.turbojpeg;
|
||||
|
||||
final public class TJ {
|
||||
|
||||
final public class ScalingFactor {
|
||||
public int num = 1;
|
||||
public int denom = 1;
|
||||
};
|
||||
|
||||
// Chrominance subsampling options
|
||||
final public static int
|
||||
NUMSAMPOPT = 4,
|
||||
@@ -105,6 +110,9 @@ final public class TJ {
|
||||
int subsamp)
|
||||
throws Exception;
|
||||
|
||||
public native final static ScalingFactor [] getScalingFactors()
|
||||
throws Exception;
|
||||
|
||||
static {
|
||||
System.loadLibrary("turbojpeg");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user