Oops. Forgot to implement access method for the colorspace & extend TJBench

This commit is contained in:
DRC
2013-08-23 07:13:59 +00:00
parent ff3d754f29
commit ae0631474a
5 changed files with 77 additions and 11 deletions

View File

@@ -117,7 +117,7 @@ public class TJDecompressor {
/**
* Returns the level of chrominance subsampling used in the JPEG image
* associated with this decompressor instance.
* associated with this decompressor instance. See {@link TJ TJ.SAMP_*}.
*
* @return the level of chrominance subsampling used in the JPEG image
* associated with this decompressor instance
@@ -130,6 +130,21 @@ public class TJDecompressor {
return jpegSubsamp;
}
/**
* Returns the colorspace used in the JPEG image associated with this
* decompressor instance. See {@link TJ TJ.CS_*}.
*
* @return the colorspace used in the JPEG image associated with this
* decompressor instance
*/
public int getColorspace() throws Exception {
if (jpegColorspace < 0)
throw new Exception(NO_ASSOC_ERROR);
if (jpegColorspace >= TJ.NUMCS)
throw new Exception("JPEG header information is invalid");
return jpegColorspace;
}
/**
* Returns the JPEG image buffer associated with this decompressor instance.
*