exif_iif_add_int(&ImageInfo, SECTION_FILE, "FileDateTime", ImageInfo.FileDateTime);
exif_iif_add_int(&ImageInfo, SECTION_FILE, "FileSize", ImageInfo.FileSize);
exif_iif_add_int(&ImageInfo, SECTION_FILE, "FileType", ImageInfo.FileType);
- exif_iif_add_str(&ImageInfo, SECTION_FILE, "MimeType", (char*)php_imagetype2mimetype(ImageInfo.FileType));
+ exif_iif_add_str(&ImageInfo, SECTION_FILE, "MimeType", (char*)php_image_type_to_mime_type(ImageInfo.FileType));
exif_iif_add_str(&ImageInfo, SECTION_FILE, "SectionsFound", sections_str ? sections_str : "NONE");
#ifdef EXIF_DEBUG
exif_scan_thumbnail(&ImageInfo);
}
exif_iif_add_int(&ImageInfo, SECTION_COMPUTED, "Thumbnail.FileType", ImageInfo.Thumbnail.filetype);
- exif_iif_add_str(&ImageInfo, SECTION_COMPUTED, "Thumbnail.MimeType", (char*)php_imagetype2mimetype(ImageInfo.Thumbnail.filetype));
+ exif_iif_add_str(&ImageInfo, SECTION_COMPUTED, "Thumbnail.MimeType", (char*)php_image_type_to_mime_type(ImageInfo.Thumbnail.filetype));
}
if (ImageInfo.Thumbnail.width && ImageInfo.Thumbnail.height) {
exif_iif_add_int(&ImageInfo, SECTION_COMPUTED, "Thumbnail.Height", ImageInfo.Thumbnail.height);
PHP_FE(iptcparse, NULL)
PHP_FE(iptcembed, NULL)
PHP_FE(getimagesize, second_args_force_ref)
- PHP_FE(imagetype2mimetype, NULL)
+ PHP_FE(image_type_to_mime_type, NULL)
PHP_FE(phpinfo, NULL)
PHP_FE(phpversion, NULL)
PHPAPI const char php_sig_tif_ii[4] = {'I','I', (char)0x2A, (char)0x00};
PHPAPI const char php_sig_tif_mm[4] = {'M','M', (char)0x00, (char)0x2A};
PHPAPI const char php_sig_jpc[3] = {(char)0xFF, (char)0x4F, (char)0xff};
-/* REMEMBER TO ADD MIME-TYPE TO FUNCTION php_imagetype2mimetype */
+/* REMEMBER TO ADD MIME-TYPE TO FUNCTION php_image_type_to_mime_type */
/* return info as a struct, to make expansion easier */
}
/* }}} */
-/* {{{ php_imagetype2mimetype
+/* {{{ php_image_type_to_mime_type
* Convert internal image_type to mime type */
-PHPAPI const char * php_imagetype2mimetype(int image_type)
+PHPAPI const char * php_image_type_to_mime_type(int image_type)
{
switch( image_type) {
case IMAGE_FILETYPE_GIF:
}
/* }}} */
-/* {{{ proto array imagetype2mimetype(int imagetype)
+/* {{{ proto array image_type_to_mime_type(int imagetype)
Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype */
-PHP_FUNCTION(imagetype2mimetype)
+PHP_FUNCTION(image_type_to_mime_type)
{
zval **p_image_type;
int arg_c = ZEND_NUM_ARGS();
WRONG_PARAM_COUNT;
}
zval_dtor(*p_image_type);
- ZVAL_STRING(return_value, (char*)php_imagetype2mimetype(Z_LVAL_PP(p_image_type)), 1);
+ ZVAL_STRING(return_value, (char*)php_image_type_to_mime_type(Z_LVAL_PP(p_image_type)), 1);
}
/* }}} */
if (result->channels != 0) {
add_assoc_long(return_value, "channels", result->channels);
}
- add_assoc_string(return_value, "mime", (char*)php_imagetype2mimetype(itype), 1);
+ add_assoc_string(return_value, "mime", (char*)php_image_type_to_mime_type(itype), 1);
efree(result);
} else {
RETURN_FALSE;
PHP_FUNCTION(getimagesize);
-PHP_FUNCTION(imagetype2mimetype);
+PHP_FUNCTION(image_type_to_mime_type);
/* {{{ enum image_filetype
This enum is used to have ext/standard/image.c and ext/exif/exif.c use
PHPAPI int php_getimagetype(php_stream *stream, char *filetype TSRMLS_DC);
-PHPAPI const char * php_imagetype2mimetype(int image_type);
+PHPAPI const char * php_image_type_to_mime_type(int image_type);
#endif /* PHP_IMAGE_H */