static Path convertToBMP(Path imagepath, Path destination, String newName) throws IOException, InterruptedException {
        if (!FileUtil.control(imagepath) || (destination == null)) {
            throw new IllegalArgumentException();
        }

        Path ret;
        if (!imagepath.getFileName().toString().endsWith("bmp")) {
            assert FileUtil.control(imagepath);
            Bitmap.image = imagepath;
            if ((newName != null) && !newName.equals("")) {
                ret = destination.resolve(newName + ".bmp");
            } else {
                ret = destination.resolve(imagepath.getFileName() + ".bmp");
            }
            write(ret);

        } else {
            ret = imagepath;
        }

        return ret;
    }