0

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.

2 Answers 2

2

Something like this might work:

Image icn=((ImageIcon) FileSystemView.getFileSystemView().getSystemIcon(new File(<directory>))).getImage(); icn = icn.getScaledInstance(32,32, Image.SCALE_SMOOTH); 
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks , that works but how can i covert java.awt.image to java.scene.image.image in order to show it in an image view?
I'm not 100% sure since I can't test this on my system but you can look at this: stackoverflow.com/questions/30970005/…
1

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.