getCroppedThumbnail($file, $maxWidth, $maxHeight, $crop) ?? false; } return $provider->getThumbnail($file, $maxWidth, $maxHeight) ?? false; } public function getImage(ISimpleFile $maxPreview): IImage { $image = new OCPImage(); $image->loadFromData($maxPreview->getContent()); return $image; } /** * @param \Closure|string $providerClosure (string is only authorized in unit tests) */ public function getProvider(\Closure|string $providerClosure): IProviderV2|false { return $providerClosure(); } }