Copyright © 2009-2012 Marc Worrell Date: 2009-03-02
Authors: Marc Worrell (marc@worrell.nl).
| extension/1 | Return the extension for a known mime type (eg. |
| guess_mime/1 | Guess the mime type of a file by the extension of its filename. |
| identify/2 | Caching version of identify/1. |
| identify/3 | |
| identify_file/2 | Fetch information about a file, returns mime, width, height, type, etc. |
| identify_file/3 | |
| identify_file_direct/2 | Fetch information about a file, returns mime, width, height, type, etc. |
| is_mime_compressed/1 | Given a mime type, return whether its file contents is already compressed or not. |
extension(Mime::string() | binary()) -> string()
Return the extension for a known mime type (eg. ".mov")
guess_mime(File::string()) -> string()
Guess the mime type of a file by the extension of its filename.
identify(Upload::#upload{} | string(), Context::#context{}) -> {ok, Props::list()} | {error, term()}
Caching version of identify/1. Fetches information about an image, returns width, height, type, etc.
identify(File::#upload{} | string(), OriginalFilename::string(), Context::#context{}) -> {ok, Props::list()} | {error, term()}
identify_file(File::string(), Context::#context{}) -> {ok, Props::list()} | {error, term()}
Fetch information about a file, returns mime, width, height, type, etc. First checks if a module has a specific identification methods.
identify_file(File::string(), OriginalFilename::string(), Context::#context{}) -> {ok, Props::list()} | {error, term()}
identify_file_direct(File::string(), OriginalFilename::string()) -> {ok, Props::list()} | {error, term()}
Fetch information about a file, returns mime, width, height, type, etc.
is_mime_compressed(X1::string()) -> boolean()
Given a mime type, return whether its file contents is already compressed or not.
Generated by EDoc, Dec 10 2012, 20:44:34.