Back to index

php5  5.3.10
php_image.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Rasmus Lerdorf <rasmus@php.net>                             |
00016    |          Marcus Boerger <helly@php.net>                              |
00017    +----------------------------------------------------------------------+
00018 */
00019 
00020 /* $Id: php_image.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef PHP_IMAGE_H
00023 #define PHP_IMAGE_H
00024 
00025 PHP_FUNCTION(getimagesize);
00026 
00027 PHP_FUNCTION(image_type_to_mime_type);
00028 PHP_FUNCTION(image_type_to_extension);
00029 
00030 /* {{{ enum image_filetype
00031    This enum is used to have ext/standard/image.c and ext/exif/exif.c use
00032    the same constants for file types.
00033 */
00034 typedef enum
00035 { IMAGE_FILETYPE_UNKNOWN=0,
00036   IMAGE_FILETYPE_GIF=1,
00037   IMAGE_FILETYPE_JPEG,
00038   IMAGE_FILETYPE_PNG,
00039   IMAGE_FILETYPE_SWF,
00040   IMAGE_FILETYPE_PSD,
00041   IMAGE_FILETYPE_BMP,
00042   IMAGE_FILETYPE_TIFF_II, /* intel */
00043   IMAGE_FILETYPE_TIFF_MM, /* motorola */
00044   IMAGE_FILETYPE_JPC,
00045   IMAGE_FILETYPE_JP2,
00046   IMAGE_FILETYPE_JPX,
00047   IMAGE_FILETYPE_JB2,
00048   IMAGE_FILETYPE_SWC,
00049   IMAGE_FILETYPE_IFF,
00050   IMAGE_FILETYPE_WBMP,
00051   /* IMAGE_FILETYPE_JPEG2000 is a userland alias for IMAGE_FILETYPE_JPC */
00052   IMAGE_FILETYPE_XBM,
00053   IMAGE_FILETYPE_ICO,
00054 /* WHEN EXTENDING: PLEASE ALSO REGISTER IN image.c:PHP_MINIT_FUNCTION(imagetypes) */
00055   IMAGE_FILETYPE_COUNT
00056 } image_filetype;
00057 /* }}} */
00058 
00059 PHP_MINIT_FUNCTION(imagetypes);
00060 
00061 PHPAPI int php_getimagetype(php_stream *stream, char *filetype TSRMLS_DC);
00062 
00063 PHPAPI char * php_image_type_to_mime_type(int image_type);
00064 
00065 #endif /* PHP_IMAGE_H */