Oops. Forgot to implement access method for the colorspace & extend TJBench
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user