* This appears to be fixed on JDK 1.4
*/
try {
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(inputStream);
BufferedImage original = decoder.decodeAsBufferedImage();
BufferedImage currentImage = original;
if (width > 0 || height > 0) {
JPEGDecodeParam decodeParam = decoder.getJPEGDecodeParam();
double ow = decodeParam.getWidth();