|
Dectect images filetype
|
|
02-07-2010, 01:57 PM
(This post was last modified: 02-07-2010 02:15 PM by codecaine.)
Post: #1
|
|||
|
|||
|
Dectect images filetype
This is a example of detecting images filetypes without need extensions. Here is a list of file types it can detect.
PHP Code: Value Image formatCode: import imghdr; |
|||
|
02-07-2010, 07:40 PM
Post: #2
|
|||
|
|||
|
RE: Dectect images filetype
This is so fast. I can see it is in "imghdr" library. Very good.
"I dont know with what weapons World War 3 will be fought with, but i know World War 4 will be fought with stones and sticks" - Albert Einstein |
|||
|
02-07-2010, 08:39 PM
Post: #3
|
|||
|
|||
|
RE: Dectect images filetype
Thanks for sharing.
Is imghdr included in standard Python libs? |
|||
|
02-07-2010, 09:01 PM
Post: #4
|
|||
|
|||
|
RE: Dectect images filetype
It is standard in Python 2.2 definitely because this code works for me !
"I dont know with what weapons World War 3 will be fought with, but i know World War 4 will be fought with stones and sticks" - Albert Einstein |
|||
|
02-07-2010, 09:02 PM
Post: #5
|
|||
|
|||
| RE: Dectect images filetype | |||
|
02-08-2010, 12:51 AM
(This post was last modified: 02-08-2010 01:04 AM by codecaine.)
Post: #6
|
|||
|
|||
RE: Dectect images filetype
(02-07-2010 08:39 PM)Alphablend Wrote: Thanks for sharing. It is a standard library in python. yes is is a standard module when you install python it comes with a great help file on windows its in the start menu -> python it goes over all the modules etc in python |
|||
|
« Next Oldest | Next Newest »
|









