static File jpegify(File imageFile, bool makeBackup default true) { if (isJPEGFile(imageFile)) ret imageFile; loading "JPEGify" { BufferedImage img = loadImage2(imageFile); File destFile = replaceExtension(imageFile, ".jpg"); File atticFile = makeBackup ? newFile(javaxDataDir("JPEGified original pictures"), imageFile.getName()) : null; if (makeBackup) atticFile = makeFileNameUnique(atticFile); saveJPGVerbose(destFile, img); if (makeBackup) moveFileVerbose(imageFile, atticFile); else deleteFile(imageFile); print("Conversion done."); ret destFile; } }