问题
I have problem getting mp3 file thumbnail using java, for example we have file:
File MP3File = new File(<directory>);
So, How can i retrieve its thumbnail?
Thanks for your attention, any ideas would be appreciated.
回答1:
Something like this might work:
Image icn=((ImageIcon) FileSystemView.getFileSystemView().getSystemIcon(new File(<directory>))).getImage();
icn = icn.getScaledInstance(32,32, Image.SCALE_SMOOTH);
回答2:
Try to get the metadata from the mp3 file, see mp3agic from github.
According from the tutorial, I think you could get a byte[] and convert into a bufferedImage.
来源:https://stackoverflow.com/questions/51374592/how-to-retrieve-thumbnail-picture-of-an-mp3-file-using-java