public String extract(String path) {
        String art = null;
        try {
            Mp3File mp3 = new Mp3File(path);
            ID3v2 tag = mp3.getId3v2Tag();
            if (tag != null) {
                String mimeType = tag.getAlbumImageMimeType();
                byte[] rawImage = tag.getAlbumImage();
                String filename = null;

                if(mimeType.equals("image/png")) {
                    filename = "cover.png";
                } else if(mimeType.equals("image/jpg")) {
                    filename = "cover.jpg";
                }
                if(filename != null) {
                    OutputStream out = new BufferedOutputStream(new FileOutputStream(filename));
                    out.write(rawImage);
                    out.close();
                    art = filename;
                }
            }
        } catch (IOException e) {
            //Something went wrong loading the file
        } catch (Exception e) {

        }
        return art;
    }