Pimcore\Model\Asset\Image::isAnimatedPng PHP Method

isAnimatedPng() private method

Checks if this object represents an animated png file
private isAnimatedPng ( ) : boolean
return boolean
    private function isAnimatedPng()
    {
        $isAnimated = false;
        if ($this->getMimetype() == 'image/png') {
            $fileContent = $this->getData();
            /**
             * Valid APNGs have an "acTL" chunk somewhere before their first "IDAT" chunk.
             *
             * @see http://foone.org/apng/
             */
            $isAnimated = strpos(substr($fileContent, 0, strpos($fileContent, 'IDAT')), 'acTL') !== false;
        }
        return $isAnimated;
    }