Log.log(Log.ERROR, MODULE, "Couldn't use jpegtran to resize the image, it will be uploaded unrotated"); Log.logException(Log.ERROR, MODULE, e);
Log.log(Log.LEVEL_ERROR, MODULE, "Couldn't use jpegtran to resize the image, it will be uploaded unrotated"); Log.logException(Log.LEVEL_ERROR, MODULE, e);
    public File getUploadSource() {		File picture = getSource();		if ( GalleryRemote.getInstance().properties.getBooleanProperty(RESIZE_BEFORE_UPLOAD) ) {			Dimension d = GalleryRemote.getInstance().properties.getDimensionProperty(RESIZE_TO);						if ( d == null || d.equals( new Dimension( 0, 0 ) ) ) {				d = null;				int l = album.getServerAutoResize();								if ( l != 0 ) {					d = new Dimension( l, l );				} else {					// server can't tell us how to resize, try default					d = GalleryRemote.getInstance().properties.getDimensionProperty(RESIZE_TO_DEFAULT);										if ( d.equals( new Dimension( 0, 0 ) ) ) {						d = null;					}				}			}			if ( d != null ) {				try {					picture = ImageUtils.resize( picture.getPath(), d );				} catch (UnsupportedOperationException e) {					Log.log(Log.ERROR, MODULE, "Couldn't use ImageUtils to resize the image, it will be uploaded at the original size");					Log.logException(Log.ERROR, MODULE, e);				}			}		}		if (angle != 0 || flipped) {			try {				picture = ImageUtils.rotate( picture.getPath(), angle, flipped, true);			} catch (UnsupportedOperationException e) {				Log.log(Log.ERROR, MODULE, "Couldn't use jpegtran to resize the image, it will be uploaded unrotated");				Log.logException(Log.ERROR, MODULE, e);			}		}		return picture;	}