image-type: Determine the type of an image by reading the first bytes.
A package used to determine the type of an image according to its first bytes based on the Python library imghdr.
Most simplest usage is getting the type of a file:
getFileType "/tmp/mystery_file"Just "webp"
Or to test for a specific extension:
import qualified Data.ByteString as B
testPgm <$> B.readFile "/tmp/file.pgm"Just "pgm"
Or to filter files by extension:
getDirectoryContents "." >>= filterM doesFileExist >>= filterM isJpeg["file2.jpeg","file1.jpeg"]
Supports the following extensions:
|Versions [RSS] [faq]||0.1.0.0|
|Dependencies||base (==4.*), bytestring (>=0.9 && <0.11) [details]|
|Revised||Revision 1 made by BaldurBlondal at 2014-08-05T04:20:48Z|
|Uploaded||by BaldurBlondal at 2014-08-04T17:27:07Z|
|Downloads||1073 total (5 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
Docs available [build log]
Successful builds reported [all 1 reports]
- image-type-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.