* @throws IOException On write errors
* @throws TranscoderException On input/parsing errors.
*/
public void saveAsJPEG(File file, int width, int height, double quality) throws IOException, TranscoderException {
JPEGTranscoder t = new JPEGTranscoder();
t.addTranscodingHint(JPEGTranscoder.KEY_WIDTH, new Float(width));
t.addTranscodingHint(JPEGTranscoder.KEY_HEIGHT, new Float(height));
t.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, new Float(quality));
transcode(file, t);
}