diff --git a/reference/exif/functions/exif-read-data.xml b/reference/exif/functions/exif-read-data.xml index cedb2a22839a..b4c78382ddfe 100644 --- a/reference/exif/functions/exif-read-data.xml +++ b/reference/exif/functions/exif-read-data.xml @@ -1,7 +1,6 @@ - - + exif_read_data Reads the EXIF headers from an image file @@ -186,6 +185,16 @@ + + 8.5.0 + + The OffsetTime, OffsetTimeOriginal + and OffsetTimeDigitized tags are now recognized; + previously they were reported as UndefinedTag:0x9010, + UndefinedTag:0x9011 and + UndefinedTag:0x9012. + + 8.0.0 diff --git a/reference/image/constants.xml b/reference/image/constants.xml index 2c220c056861..b4feb81383c1 100644 --- a/reference/image/constants.xml +++ b/reference/image/constants.xml @@ -713,6 +713,19 @@ + + + IMAGETYPE_SVG + (int) + + + &gd.constants.type; + + (Available as of PHP 8.5.0, only if the + libxml extension is loaded) + + + IMAGETYPE_UNKNOWN diff --git a/reference/image/functions/getimagesize.xml b/reference/image/functions/getimagesize.xml index 3060cda309b5..02cbd6a697a2 100644 --- a/reference/image/functions/getimagesize.xml +++ b/reference/image/functions/getimagesize.xml @@ -1,6 +1,6 @@ - + getimagesize Get the size of an image @@ -45,6 +45,15 @@ codestream it encounters in the root of the file. + + + SVG images are only recognized if the libxml + extension is loaded. The root svg element must have + width and height attributes, each an + integer optionally followed by a unit, such as 5cm. + Otherwise, &false; is returned. + + The information about icons are retrieved from the icon with the highest @@ -102,10 +111,10 @@ &reftitle.returnvalues; - - Returns an array with up to 7 elements. Not all image types will include + + Returns an array with up to 9 elements. Not all image types will include the channels and bits elements. - + Index 0 and 1 contains respectively the width and the height of the image. @@ -129,11 +138,12 @@ Index 2 is one of the IMAGETYPE_* constants indicating the type of the image. - + Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used - directly in an IMG tag. - + directly in an IMG tag. It is omitted if the width or + the height is not expressed in pixels. + mime is the corresponding MIME type of the image. This information can be used to deliver images with the correct HTTP @@ -157,6 +167,12 @@ if ($size && $fp) { + + width_unit and height_unit are the + units in which index 0 and 1 are expressed. They are "px" + unless the image states otherwise, as SVG images can, and they may differ + from each other. + channels will be 3 for RGB pictures and 4 for CMYK pictures. @@ -193,42 +209,59 @@ if ($size && $fp) { &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 8.2.0 - - Now returns the actual image dimensions, bits and channels of AVIF images; - previously, the dimensions were reported as 0x0, - and bits and channels were not reported at all. - - - - 8.0.0 - - A ValueError is now thrown if - filename is empty; previously an - E_WARNING was raised and the function returned &false;. - - - - 7.1.0 - - Added WebP support. - - - - - - + + + + + &Version; + &Description; + + + + + 8.5.0 + + Added support for HEIF/HEIC images. + + + + 8.5.0 + + Added support for SVG images, if the libxml extension is loaded. + + + + 8.5.0 + + The returned array now contains the width_unit and + height_unit elements. + + + + 8.2.0 + + Now returns the actual image dimensions, bits and channels of AVIF images; + previously, the dimensions were reported as 0x0, + and bits and channels were not reported at all. + + + + 8.0.0 + + A ValueError is now thrown if + filename is empty; previously an + E_WARNING was raised and the function returned &false;. + + + + 7.1.0 + + Added WebP support. + + + + + diff --git a/reference/image/functions/image-type-to-extension.xml b/reference/image/functions/image-type-to-extension.xml index de6b73012adb..8a48c73fbd34 100644 --- a/reference/image/functions/image-type-to-extension.xml +++ b/reference/image/functions/image-type-to-extension.xml @@ -48,6 +48,30 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.5.0 + + Added support for IMAGETYPE_HEIF (.heif) + and, if the libxml extension is + loaded, IMAGETYPE_SVG (.svg). + + + + + + + &reftitle.examples; diff --git a/reference/image/functions/image-type-to-mime-type.xml b/reference/image/functions/image-type-to-mime-type.xml index bffb2c50ac7e..913f4651cf72 100644 --- a/reference/image/functions/image-type-to-mime-type.xml +++ b/reference/image/functions/image-type-to-mime-type.xml @@ -129,6 +129,13 @@ IMAGETYPE_HEIF image/heif + + + IMAGETYPE_SVG (only if the + libxml extension is loaded) + + image/svg+xml +