Displaying Binary Image

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RobbieL
Forum Commoner
Posts: 31
Joined: Fri Mar 23, 2007 5:57 pm

Displaying Binary Image

Post by RobbieL »

I'm using getID3 to grab all the ID3 data from a bunch of MP3's. The only problem I'm come across is with the album/cover art for the MP3. I'm assuming it is stored as binary, because a long string is return with some crazy text in it. I've never worked with something like this, and struggling with a way to store the image and the display the image on a page.

Anyone got any suggestions?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Displaying Binary Image

Post by onion2k »

If you have GD installed try using ImageCreateFromString(). No idea if it'll work but it'd be amusing to try.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Displaying Binary Image

Post by Ambush Commander »

I'd assume it's a JPG/PNG/GIF file or something of the sort. Dump the binary representation in a file and then sniff it using finfo or mime and see what comes up.
Post Reply