]> granicus.if.org Git - php/commitdiff
-imagetype2mimetype renamed to image_type_to_mime_type
authorMarcus Boerger <helly@php.net>
Sun, 23 Jun 2002 00:43:11 +0000 (00:43 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 23 Jun 2002 00:43:11 +0000 (00:43 +0000)
ext/exif/exif.c
ext/standard/basic_functions.c
ext/standard/image.c
ext/standard/php_image.h

index 3a917140d475336aaf562d58d03494c3be142eb2..87a6e6df0dd31f91d5561f33f3b58d72ce631ed0 100644 (file)
@@ -3330,7 +3330,7 @@ PHP_FUNCTION(exif_read_data)
        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
@@ -3396,7 +3396,7 @@ PHP_FUNCTION(exif_read_data)
                        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);
index 89c1cacd01a381820b8dd5cbfe87272ecfcf0e9f..1008825db85ca040aef2391f215c76c2ceb119a2 100644 (file)
@@ -281,7 +281,7 @@ function_entry basic_functions[] = {
        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)
index 3e7ef909a886aedc60670d50ccf6846fbaed10d0..80eb9a162bff183d8bed30dc8f7a5fceb832f2b4 100644 (file)
@@ -65,7 +65,7 @@ PHPAPI const char php_sig_png[8] = {(char) 0x89, (char) 0x50, (char) 0x4e, (char
 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 */
 
@@ -668,9 +668,9 @@ static struct gfxinfo *php_handle_tiff (php_stream * stream, pval *info, int mot
 }
 /* }}} */
 
-/* {{{ 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:
@@ -697,9 +697,9 @@ PHPAPI const char * php_imagetype2mimetype(int image_type)
 }
 /* }}} */
 
-/* {{{ 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();
@@ -708,7 +708,7 @@ PHP_FUNCTION(imagetype2mimetype)
                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);
 }
 /* }}} */
 
@@ -868,7 +868,7 @@ PHP_FUNCTION(getimagesize)
                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;
index 47373aeb3b6b343738029b55524b393ff4020a43..69536c269ebb6a224ff1f96182066f0efca8b494 100644 (file)
@@ -24,7 +24,7 @@
 
 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
@@ -51,6 +51,6 @@ typedef enum
 
 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 */