leftypol/inc/Service/Media/ThumbGenerator.php

30 lines
678 B
PHP
Raw Normal View History

<?php
namespace Vichan\Service\Media;
use Vichan\Data\ThumbGenerationResult;
interface ThumbGenerator {
public function supportsMime(string $mime): bool;
/**
* Generates a thumbnail from the given file.
*
* @param string $source_file_path
2025-03-18 00:40:51 +01:00
* @param string $source_file_mime
* @param string $preferred_out_file_path
2025-03-18 00:40:51 +01:00
* @param string $preferred_out_mime
* @param int $max_width
* @param int $max_height
* @return ThumbGenerationResult
*/
2025-03-18 00:40:51 +01:00
public function generateThumb(
string $source_file_path,
string $source_file_mime,
string $preferred_out_file_path,
string $preferred_out_mime,
int $max_width,
int $max_height
): ThumbGenerationResult;
}