. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Contracts; use Fisharebest\Webtrees\MediaFile; use Intervention\Image\Interfaces\ImageInterface; use League\Flysystem\FilesystemOperator; use Psr\Http\Message\ResponseInterface; interface ImageFactoryInterface { public function fileResponse(FilesystemOperator $filesystem, string $path, bool $download): ResponseInterface; public function thumbnailResponse( FilesystemOperator $filesystem, string $path, int $width, int $height, string $fit ): ResponseInterface; public function mediaFileResponse(MediaFile $media_file, bool $add_watermark, bool $download): ResponseInterface; public function mediaFileThumbnail( MediaFile $media_file, int $width, int $height, string $fit, bool $add_watermark ): string; public function mediaFileThumbnailResponse( MediaFile $media_file, int $width, int $height, string $fit, bool $add_watermark ): ResponseInterface; public function fileNeedsWatermark(MediaFile $media_file, UserInterface $user): bool; public function thumbnailNeedsWatermark(MediaFile $media_file, UserInterface $user): bool; public function createWatermark(int $width, int $height, MediaFile $media_file): ImageInterface; public function addWatermark(ImageInterface $image, ImageInterface $watermark): ImageInterface; public function replacementImageResponse(string $text): ResponseInterface; }