Function __global->get_exif_data
Definitions
sources/exif.php
- Get metadata from an image, using EXIF primarily, but also XMP and IPTC to get image descriptions.Also gets GPS data and canonicalises in decimal as Latitude and Longitude.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | PATH | No | No | required parameter | N/A | N/A | This is the path of the photo which may contain metadata |
| $filename | ?string | No | No | Null | N/A | N/A | This is the original filename of the photo which may contain metadata (null: derive from path) |
Returns
- Map of metadata, using standard EXIF naming
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get metadata from an image, using EXIF primarily, but also XMP and IPTC to get image descriptions.Also gets GPS data and canonicalises in decimal as Latitude and Longitude.
*
* @param PATH $path This is the path of the photo which may contain metadata
* @param ?string $filename This is the original filename of the photo which may contain metadata (null: derive from path)
* @return array Map of metadata, using standard EXIF naming
*/
function get_exif_data(string $path, ?string $filename = null) : array
* Get metadata from an image, using EXIF primarily, but also XMP and IPTC to get image descriptions.Also gets GPS data and canonicalises in decimal as Latitude and Longitude.
*
* @param PATH $path This is the path of the photo which may contain metadata
* @param ?string $filename This is the original filename of the photo which may contain metadata (null: derive from path)
* @return array Map of metadata, using standard EXIF naming
*/
function get_exif_data(string $path, ?string $filename = null) : array

