Does anybody know of a way to create an image file, when all i have is the data that needs to be in the image file?
I'm currently working on a script to sort my mp3 files, and i want to store the image, which is written in one of the id3 tags, on my pc. So all i have is the data itself.
I tried using the FileWriter class, but then i get a messed up picture.
Here's waht i have so far (nothing much as you can see):
Java Code:
public static void main(String[] args) {
try {
"E:\\Muziek - AlbumArts\\Anti-Flag - Live Fat, Die Young.jpg"),
"r");
byte[] data = new byte[(int) raf.length()];
raf.read(data);
raf.close();
fw.close();
e.printStackTrace();
}
}
Is there a better way (i'm sure of it), and is there a way to store the image without errors?
Thanx in advance,
UnrealEd