public function populate(EventInterface $event) {
        $image = $event->getRequest()->getImage();

        // Get EXIF-properties from image
        $imagick = $this->getImagick();
        $imagick->readImageBlob($image->getBlob());
        $properties = $imagick->getImageProperties();

        // Fix trailing spaces
        foreach ($properties as $key => $value) {
            unset($properties[$key]);
            $properties[trim($key)] = $value;
        }

        // Filter and parse properties
        $properties = $this->filterProperties($properties);
        $properties = $this->parseProperties($properties);

        // Set properties to save on successful image insertion
        $this->properties = $properties;

        return $properties;
    }
public function populate(EventInterface $event) {
        $image = $event->getRequest()->getImage();

        // Get EXIF-properties from image
        $imagick = $this->getImagick();
        $imagick->readImageBlob($image->getBlob());
        $properties = $imagick->getImageProperties();

        // Fix trailing spaces
        foreach ($properties as $key => $value) {
            unset($properties[$key]);
            $properties[trim($key)] = $value;
        }

        // Filter and parse properties
        $properties = $this->filterProperties($properties);
        $properties = $this->parseProperties($properties);

        // Set properties to save on successful image insertion
        $this->properties = $properties;

        return $properties;
    }
public function populate ( EventInterface $ event ) { $ image = $ event -> getRequest ( ) -> getImage ( ) ; // Get EXIF-properties from image $ imagick = $ this -> getImagick ( ) ; $ imagick -> readImageBlob ( $ image -> getBlob ( ) ) ; $ properties = $ imagick -> getImageProperties ( ) ; // Fix trailing spaces foreach ( $ properties as $ key => $ value ) { unset ( $ properties [ $ key ] ) ; $ properties [ trim ( $ key ) ] = $ value ; } // Filter and parse properties $ properties = $ this -> filterProperties ( $ properties ) ; $ properties = $ this -> parseProperties ( $ properties ) ; // Set properties to save on successful image insertion $ this -> properties = $ properties ; return $ properties ; }
Read exif data from incoming image

@param EventInterface $event The triggered event
@return array
Read exif data from incoming image