/**
  * @param  PhpGdEvent $event
  * @throws InvalidArgumentException
  */
 public function verifySavedFormat(PhpGdEvent $event)
 {
     $format = $event->getOptions()['output_format'];
     if ('default' !== $format && !$this->context->isImageFormatSupported($format)) {
         throw new InvalidArgumentException('output.image.format.not.supported.%cp_unsupported%', ['%cp_unsupported%' => '"' . $format . '"']);
     }
 }