return (bestDepth != null) ? bestDepth : bestSize;
}
/* Saves the Image to the given File with the given Image-Format */
private static boolean storeImage(ImageData imgData, File file, int format) {
ImageLoader loader = new ImageLoader();
loader.data = new ImageData[] { imgData };
FileOutputStream fOs = null;
try {
fOs = new FileOutputStream(file);
loader.save(fOs, format);
} catch (FileNotFoundException e) {
Activator.getDefault().logError(e.getMessage(), e);
} finally {
if (fOs != null)
try {