Function __global->get_exif_image_caption

Definitions

sources/exif.php

  • Attempt to retrieve a caption from photos seeking XMP, then EXIF, then IPTC binary last.Check this file is a valid image file before passing to this function as an empty string often annoys.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

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 required parameter N/A N/A This is the original filename of the photo which may contain metadata

Returns

  • Whichever caption is found
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Attempt to retrieve a caption from photos seeking XMP, then EXIF, then IPTC binary last.Check this file is a valid image file before passing to this function as an empty string often annoys.
 *
 * @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
 * @return string Whichever caption is found
 */

function get_exif_image_caption(string $path, string $filename) : string