|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.atunes.kernel.utils.AudioFilePictureUtils
public class AudioFilePictureUtils
This class gets images associated to audio files Images can be internal (like in ID3v2) or external (in the same folder than audio file).
Constructor Summary | |
---|---|
AudioFilePictureUtils()
|
Method Summary | |
---|---|
static void |
exportPicture(AudioFile song)
Export picture. |
static java.lang.String |
getFileNameForCover(AudioFile file)
Returns a file name to save an external image associated to an audio file. |
static javax.swing.ImageIcon |
getImageForAudioFile(AudioFile file,
int width,
int height)
Returns an image associated to an audio file, with following order: - If a image saved by aTunes exists, then return it. - If not, find an internal image - If not, find an external image - If not, return null |
static javax.swing.ImageIcon[] |
getPicturesForFile(AudioFile file,
int width,
int height)
Returns all pictures associated to an audio file. |
static boolean |
isValidPicture(java.io.File file)
Returns true if file represents a valid picture (jpg or png). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AudioFilePictureUtils()
Method Detail |
---|
public static void exportPicture(AudioFile song) throws java.io.FileNotFoundException, java.io.IOException
song
- the song
java.io.FileNotFoundException
- the file not found exception
java.io.IOException
- Signals that an I/O exception has occurred.public static java.lang.String getFileNameForCover(AudioFile file)
file
- the file
public static javax.swing.ImageIcon getImageForAudioFile(AudioFile file, int width, int height)
file
- Audio Filewidth
- Width in pixels or -1 to keep original widthheight
- Height in pixels or -1 to keep original height
public static javax.swing.ImageIcon[] getPicturesForFile(AudioFile file, int width, int height)
file
- the filewidth
- Width in pixels or -1 to keep original widthheight
- Height in pixels or -1 to keep original height
public static boolean isValidPicture(java.io.File file)
file
- the file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |