private function parseResizeParams(array $params = []): array
    {
        $resizeParams = [];
        foreach ($params as $param) {
            \preg_match('/^('.\implode('|', $this->allowedResizeParams).')([0-9]+)$/', $param, $matches);
            if (isset($matches[1]) && isset($matches[2])) {
                $resizeParams[$matches[1]] = (int)$matches[2];

                if ($matches[1] == 'gs') {
                    $resizeParams[$matches[1]] = ((int)$matches[2] === 1);
                }
            }
        }
        return $resizeParams;
    }