Module z_media_identify

Identify files, fetch metadata about an image.

Copyright © 2009 Marc Worrell Date: 2009-03-02

Authors: Marc Worrell (marc@worrell.nl).

Description

Identify files, fetch metadata about an image

Function Index

extension/1Return the extension for a known mime type.
guess_mime/1 Guess the mime type of a file by the extension of its filename.
identify/2Caching version of identify/1.
identify/3
identify_file/2Fetch information about a file, returns mime, width, height, type, etc.
identify_file/3
identify_file_direct/2Fetch information about a file, returns mime, width, height, type, etc.

Function Details

extension/1

extension(B) -> any()

Return the extension for a known mime type.

guess_mime/1

guess_mime(File::string()) -> string()

Guess the mime type of a file by the extension of its filename.

identify/2

identify(Upload::File, Context) -> {ok, Meta} | {error, Error}

Caching version of identify/1. Fetches information about an image, returns width, height, type, etc.

identify/3

identify(File, OriginalFilename, Context) -> any()

identify_file/2

identify_file(File::filename(), Context) -> {ok, PropList} | {error, Reason}

Fetch information about a file, returns mime, width, height, type, etc. First checks if a module has a specific identification methods.

identify_file/3

identify_file(File, OriginalFilename, Context) -> any()

identify_file_direct/2

identify_file_direct(File, OriginalFilename) -> {ok, PropList} | {error, Reason}

Fetch information about a file, returns mime, width, height, type, etc.


Generated by EDoc, Feb 25 2011, 21:14:41.