@@ -72,6 +72,9 @@ |
||
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | + /** |
|
| 76 | + * @param string $inputFile |
|
| 77 | + */ |
|
| 75 | 78 | private function createGlideServer($inputFile, string $watermarkPath = null): Server |
| 76 | 79 | { |
| 77 | 80 | $config = [ |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | namespace Spatie\Image; |
| 4 | 4 | |
| 5 | 5 | use BadMethodCallException; |
| 6 | -use Spatie\Image\Exceptions\InvalidImageDriver; |
|
| 7 | -use Spatie\ImageOptimizer\OptimizerChainFactory; |
|
| 8 | 6 | use Intervention\Image\ImageManagerStatic as InterventionImage; |
| 7 | +use Spatie\ImageOptimizer\OptimizerChainFactory; |
|
| 8 | +use Spatie\Image\Exceptions\InvalidImageDriver; |
|
| 9 | 9 | |
| 10 | 10 | /** @mixin \Spatie\Image\Manipulations */ |
| 11 | 11 | class Image |
@@ -30,6 +30,9 @@ discard block |
||
| 30 | 30 | return new static($pathToImage); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $tempDir |
|
| 35 | + */ |
|
| 33 | 36 | public function setTemporaryDirectory($tempDir) |
| 34 | 37 | { |
| 35 | 38 | $this->temporaryDirectory = $tempDir; |
@@ -139,6 +142,9 @@ discard block |
||
| 139 | 142 | return ! is_null($this->manipulations->getFirstManipulationArgument('optimize')); |
| 140 | 143 | } |
| 141 | 144 | |
| 145 | + /** |
|
| 146 | + * @param string $path |
|
| 147 | + */ |
|
| 142 | 148 | protected function performOptimization($path, array $optimizerChainConfiguration) |
| 143 | 149 | { |
| 144 | 150 | $optimizerChain = OptimizerChainFactory::create(); |
@@ -154,6 +160,9 @@ discard block |
||
| 154 | 160 | $optimizerChain->optimize($path); |
| 155 | 161 | } |
| 156 | 162 | |
| 163 | + /** |
|
| 164 | + * @param string $outputPath |
|
| 165 | + */ |
|
| 157 | 166 | protected function addFormatManipulation($outputPath) |
| 158 | 167 | { |
| 159 | 168 | if ($this->manipulations->hasManipulation('format')) { |