The Fileinfo extension allows retrieval of information regarding
vast majority of file.
This information may include dimensions, quality, length etc...
Additionally it can also be used to retrieve the mime type for a
particular file and for text files proper language encoding.
From MAINTAINER: Johan Huldtgren
Tweaks by me and one from sthen
ok sthen