private function getFramesVars($layers, $transform): array
    {
        $startFrame = 0;
        $endFrame = \count($layers) - 1;
        $interval = 1;

        if (isset($transform['frames'])) {
            $framesIntArr = explode('@', $transform['frames']);

            if (\count($framesIntArr) > 1) {
                $interval = $framesIntArr[1];
            }

            $framesArr = explode('-', $framesIntArr[0]);

            if (\count($framesArr) > 1) {
                $startFrame = $framesArr[0];
                if ($framesArr[1] !== '*') {
                    $endFrame = $framesArr[1];
                }
            } else {
                $startFrame = $endFrame = $framesArr[0];
            }

            if ($endFrame > \count($layers) - 1) {
                $endFrame = \count($layers) - 1;
            }
        }

        return [$startFrame, $endFrame, $interval];
    }
private function getFramesVars($layers, $transform): array
    {
        $startFrame = 0;
        $endFrame = \count($layers) - 1;
        $interval = 1;

        if (isset($transform['frames'])) {
            $framesIntArr = explode('@', $transform['frames']);

            if (\count($framesIntArr) > 1) {
                $interval = $framesIntArr[1];
            }

            $framesArr = explode('-', $framesIntArr[0]);

            if (\count($framesArr) > 1) {
                $startFrame = $framesArr[0];
                if ($framesArr[1] !== '*') {
                    $endFrame = $framesArr[1];
                }
            } else {
                $startFrame = $endFrame = $framesArr[0];
            }

            if ($endFrame > \count($layers) - 1) {
                $endFrame = \count($layers) - 1;
            }
        }

        return [$startFrame, $endFrame, $interval];
    }
private function getFramesVars ( $ layers , $ transform ) : array { $ startFrame = 0 ; $ endFrame = \ count ( $ layers ) - 1 ; $ interval = 1 ; if ( isset ( $ transform [ 'frames' ] ) ) { $ framesIntArr = explode ( '@' , $ transform [ 'frames' ] ) ; if ( \ count ( $ framesIntArr ) > 1 ) { $ interval = $ framesIntArr [ 1 ] ; } $ framesArr = explode ( '-' , $ framesIntArr [ 0 ] ) ; if ( \ count ( $ framesArr ) > 1 ) { $ startFrame = $ framesArr [ 0 ] ; if ( $ framesArr [ 1 ] !== '*' ) { $ endFrame = $ framesArr [ 1 ] ; } } else { $ startFrame = $ endFrame = $ framesArr [ 0 ] ; } if ( $ endFrame > \ count ( $ layers ) - 1 ) { $ endFrame = \ count ( $ layers ) - 1 ; } } return [ $ startFrame , $ endFrame , $ interval ] ; }
Get vars for animated gif frames setup

@param LayersInterface|array $layers
@param array                 $transform

@return array
Get vars for animated gif frames setup