Sets image output format.

@param string $format
@return $this
513268
public function format($format)
    {
        if (!$this->image) {
            $this->image();
        }

        $this->format = $format;

        return $this;
    }
647701
public function setFormat($format, $mimeTypes)
    {
        if (null === static::$formats) {
            static::initializeFormats();
        }

        static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : [$mimeTypes];
    }
146526
public function setFormat($format, $placeholder = NULL)
	{
		$this->format = $format;

		if ($placeholder === NULL) {
			$placeholder = self::makeFormatPlaceholder($format);
		}
		if (!empty($placeholder)) {
			$this->setPlaceholder($placeholder);
		}

		return $this;
	}
1322307
public function setFormat($format)
    {
        if (!is_null($format)) {
            $this->format = $format;
            $this->useFormat(false);
        }

        return $this;
    }
242438
public function setTimeFormat($format) {
        if (is_string($format)) {
            $this->timeFormatter = function ($t) use ($format) {
                return strftime($format, $t);
            };
        } else {
            $this->timeFormatter = $format;
        }

        return $this;
    }
1115802
public function format($format)
    {
        switch ($format) {
            case 'png':
                $this->writer->setRenderer(new Png());
                break;
            case 'eps':
                $this->writer->setRenderer(new Eps());
                break;
            case 'svg':
                $this->writer->setRenderer(new Svg());
                break;
            default:
                throw new \InvalidArgumentException('Invalid format provided.');
        }

        return $this;
    }
1198378
public function setFormat(string $format = \null)
    {
        $validValues = ['png', 'jpg', 'webp'];

        if (\null !== $format && !\in_array($format, $validValues, \true)) {
            throw new \InvalidArgumentException(\sprintf(
                'Unknown format "%s" given. Expected "%s" or null.',
                $format,
                \implode(', ', $validValues)
            ));
        }

        $this->format = $format;

        return $this;
    }
505609
public function setFormats($formats)
    {
        if (is_array($formats)) {
            $formats = json_encode($formats);
        }

        $this->formats = $formats;

        return $this;
    }
152656
public function setFormat($type, $format)
    {
        if ($this->typeIsAvailable($type)) {
            $this->formats[$type] = $format;
        }

        return $this;
    }
317523
public function format(string $format)
    {
        if (! $this->validateManipulation($format, 'format')) {
            throw InvalidManipulation::invalidParameter(
                'format',
                $format,
                $this->getValidManipulationOptions('format')
            );
        }

        return $this->addManipulation('format', $format);
    }
436339
public function format(): Format\Format
    {
        if (null === $this->format) {
            $this->format = Format\Format::fromJson($this);
        }

        return $this->format;
    }
1313200
public function setFormat($format)
    {
        if ($format) {
            $format = strtolower($format);

            if (!in_array($format, static::$validFormats)) {
                throw new Exception("Format {$format} is not supported");
            }

            $this->format = $format;

            if (!$this->suffix) {
                $this->setSuffix(".{$format}");
            }
        }

        return $this;
    }
419855
public function setFormat(string $format): VisualizerTask
    {
        switch ($format) {
            case VisualizerTask::FORMAT_PUML:
            case VisualizerTask::FORMAT_PNG:
            case VisualizerTask::FORMAT_EPS:
            case VisualizerTask::FORMAT_SVG:
                $this->format = $format;
                break;
            default:
                $message = "'$format' is not a valid format";
                $this->log($message, Project::MSG_ERR);
                throw new BuildException($message);
                break;
        }

        return $this;
    }
950625
public function parseCustomFormat($format)
    {
        if (isset($this->parsedFormats[$format])) {
            return $this->parsedFormats[$format];
        }

        return $this->parsedFormats[$format] = $this->parseFormat($format);
    }
698085
public function encode($format, $quality = null)
    {
        $this->toggleModified();

        $this->getInterventionImage()->encode($format, $quality);

        return $this;
    }
44950
public function setFormat($format, $mimeTypes) {

		if (NULL === static::$formats) {
			static::initializeFormats();
		}

		static::$formats[$format] = is_array($mimeTypes) ? $mimeTypes : array($mimeTypes);

	}
64607
public function setFormat($format)
    {
        if ($format !== self::FORMAT_BINARY && $format !== self::FORMAT_TEXT) {
            throw new InvalidArgumentException("Invalid message format");
        }

        $this->format = $format;
    }