public function getIptcData($file)
    {
        getimagesize($file, $info);
        $arrData = array();
        if (isset($info['APP13'])) {
            $iptc = iptcparse($info['APP13']);

            foreach ($this->iptcMapping as $name => $field) {
                if (!isset($iptc[$field])) {
                    continue;
                }

                if (count($iptc[$field]) === 1) {
                    $arrData[$name] = reset($iptc[$field]);
                } else {
                    $arrData[$name] = $iptc[$field];
                }
            }
        }

        return $arrData;
    }
public function getIptcData($file)
    {
        getimagesize($file, $info);
        $arrData = array();
        if (isset($info['APP13'])) {
            $iptc = iptcparse($info['APP13']);

            foreach ($this->iptcMapping as $name => $field) {
                if (!isset($iptc[$field])) {
                    continue;
                }

                if (count($iptc[$field]) === 1) {
                    $arrData[$name] = reset($iptc[$field]);
                } else {
                    $arrData[$name] = $iptc[$field];
                }
            }
        }

        return $arrData;
    }
public function getIptcData ( $ file ) { getimagesize ( $ file , $ info ) ; $ arrData = array ( ) ; if ( isset ( $ info [ 'APP13' ] ) ) { $ iptc = iptcparse ( $ info [ 'APP13' ] ) ; foreach ( $ this -> iptcMapping as $ name => $ field ) { if ( ! isset ( $ iptc [ $ field ] ) ) { continue ; } if ( count ( $ iptc [ $ field ] ) === 1 ) { $ arrData [ $ name ] = reset ( $ iptc [ $ field ] ) ; } else { $ arrData [ $ name ] = $ iptc [ $ field ] ; } } } return $ arrData ; }
Returns an array of IPTC data

@param string $file The file to read the IPTC data from
@return array
Returns an array of IPTC data