assertTrue("Unable to find test data", input.exists() && input.isFile() && input.canRead());
// create output file
final File output = TestData.temp(this, "output.jpeg");
try {
new TurboJpegImageWorker(ImageIO.read(input)).writeTurboJPEG(new FileOutputStream(
output), 1.5f);
assertFalse("We should not be allowed to specify compression ratios > 1", true);
} catch (Exception e) {
// TODO: handle exception
}
try {
new TurboJpegImageWorker(ImageIO.read(input)).writeTurboJPEG(new FileOutputStream(
output), -.5f);
assertFalse("We should not be allowed to specify compression ratios > 1", true);
} catch (Exception e) {
// TODO: handle exception
}