// According to EXIF standard, GPS data can be in the form of
// dd/1 mm/1 ss/1 or as a decimal reprentation.
if (!is_array($data)) {
- // Assume a scalar is a decimeal representation - but strip it of
+ // Assume a scalar is a decimal representation - but strip it of
// any stray characters that may be there.
- return (double)trim(str_replace(array('N', 'S', 'E', 'W', '"'), array('', '', '', '', ''), $data));
+ return (double)trim(str_replace(array('N', 'S', 'E', 'W'),
+ array('', '', '', ''),
+ $data));
}
if ($data[0] == 0) {
return 0;
public function getData($image)
{
// Request the full stream of meta data in JSON format.
- $command = '-j -c "%.6f ' . $image;
+ // -j option outputs in JSON, -n = prevent screen formatting
+ $command = '-j -n ' . $image;
$test = $this->_execute($command);
$results = json_decode($this->_execute($command));
if (is_array($results)) {