Shoutbox

Get Image MIME Type? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Get Image MIME Type? (/showthread.php?tid=77549)

Get Image MIME Type? by davidpolitis on 09-17-2007 at 02:54 AM

hi, just wondering if anyone could point me to any functions etc. that could be used to get the MIME type of images such as png, jpg/jpeg, gif.


RE: Get Image MIME Type? by MeEtc on 09-17-2007 at 03:13 AM

Volv made some functions for this in a group of files that I'm using for YASS. it looks for the file extension, and returns the MIME for that ext

http://volv.net/?p=13


RE: Get Image MIME Type? by davidpolitis on 09-17-2007 at 06:03 AM

I need the MIME Type, not the Extension Type XD

I'm not that n00by, but thanks anyway ;)


RE: Get Image MIME Type? by Ezra on 09-17-2007 at 10:28 AM

If you have the file on a webserver you could try using a xmlhttp HEAD request. And get the Content-type header.


RE: Get Image MIME Type? by davidpolitis on 09-17-2007 at 10:31 AM

oh... awesome Ezra. Just what I wanted it for. I can do it on my own now. Although... it is a bit of a hastle having to download the file and use xmlhttp and I'm not capable of translating this to JScript :(

EDIT: I don't need the xmlhttp part anymore. Anyone have any ideas how I can check a local images headers or MIME types?