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:
DRC
2011-03-01 09:53:07 +00:00
parent da6a1f6c76
commit be085e08b3
12 changed files with 269 additions and 262 deletions

View File

@@ -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");
}