-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ImageGuide.php
55 lines (48 loc) · 1.25 KB
/
ImageGuide.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/** @noinspection PhpTooManyParametersInspection */
declare(strict_types=1);
namespace ReliqArts\GuidedImage\Contract;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Intervention\Image\Image;
interface ImageGuide
{
/**
* Empty skim cache.
*/
public function emptyCache(ImageDispenser $imageDispenser): JsonResponse;
/**
* Get a resized Guided Image.
*
* @param mixed $width
* @param mixed $height
* @param mixed $aspect Keep aspect ratio?
* @param mixed $upSize Allow up-size?
* @return Image|string intervention Image object or actual image url
*/
public function resized(
ImageDispenser $imageDispenser,
Request $request,
GuidedImage $guidedImage,
$width,
$height,
$aspect = true,
$upSize = false
);
/**
* Get a thumbnail.
*
* @param string $method crop|fit
* @param int $width
* @param int $height
* @return Image|string intervention Image object or actual image url
*/
public function thumb(
ImageDispenser $imageDispenser,
Request $request,
GuidedImage $guidedImage,
string $method,
$width,
$height
);
}