Neos.Media/Classes/Domain/Service/ThumbnailService.php
protected function applyFormatToThumbnailConfiguration(ThumbnailConfiguration $configuration, string $targetFormat): ThumbnailConfiguration
    {
        if (strpos($targetFormat, '/') !== false) {
            $targetFormat = MediaTypes::getFilenameExtensionFromMediaType($targetFormat);
        }
        $configuration = new ThumbnailConfiguration(
            $configuration->getWidth(),
            $configuration->getMaximumWidth(),
            $configuration->getHeight(),
            $configuration->getMaximumHeight(),
            $configuration->isCroppingAllowed(),
            $configuration->isUpScalingAllowed(),
            $configuration->isAsync(),
            $configuration->getQuality(),
            $targetFormat
        );
        return $configuration;
    }
protected function applyFormatToThumbnailConfiguration(ThumbnailConfiguration $configuration, string $targetFormat): ThumbnailConfiguration
    {
        if (strpos($targetFormat, '/') !== false) {
            $targetFormat = MediaTypes::getFilenameExtensionFromMediaType($targetFormat);
        }
        $configuration = new ThumbnailConfiguration(
            $configuration->getWidth(),
            $configuration->getMaximumWidth(),
            $configuration->getHeight(),
            $configuration->getMaximumHeight(),
            $configuration->isCroppingAllowed(),
            $configuration->isUpScalingAllowed(),
            $configuration->isAsync(),
            $configuration->getQuality(),
            $targetFormat
        );
        return $configuration;
    }
protected function applyFormatToThumbnailConfiguration ( ThumbnailConfiguration $ configuration , string $ targetFormat ) : ThumbnailConfiguration { if ( strpos ( $ targetFormat , '/' ) !== false ) { $ targetFormat = MediaTypes :: getFilenameExtensionFromMediaType ( $ targetFormat ) ; } $ configuration = new ThumbnailConfiguration ( $ configuration -> getWidth ( ) , $ configuration -> getMaximumWidth ( ) , $ configuration -> getHeight ( ) , $ configuration -> getMaximumHeight ( ) , $ configuration -> isCroppingAllowed ( ) , $ configuration -> isUpScalingAllowed ( ) , $ configuration -> isAsync ( ) , $ configuration -> getQuality ( ) , $ targetFormat ) ; return $ configuration ; }
Create a new thumbnailConfiguration with the identical configuration
to the given one PLUS setting of the target-format

@param ThumbnailConfiguration $configuration
@param string $targetFormat
@return ThumbnailConfiguration
Create a new thumbnailConfiguration with the identical configuration to the given one PLUS setting of the target - format