fix issue with opacity
This commit is contained in:
parent
d82bb692b2
commit
b7920ab26c
|
@ -342,10 +342,15 @@ App::get('/v1/storage/files/:fileId/preview')
|
|||
$image = new Image($source);
|
||||
|
||||
$image->crop((int) $width, (int) $height);
|
||||
|
||||
if (!empty($opacity)) {
|
||||
$image->setOpacity($opacity);
|
||||
}
|
||||
|
||||
if (!empty($background)) {
|
||||
$image->setBackground('#'.$background);
|
||||
}
|
||||
|
||||
|
||||
if (!empty($borderWidth) ) {
|
||||
$image->setBorder($borderWidth, '#'.$borderColor);
|
||||
|
@ -355,10 +360,6 @@ App::get('/v1/storage/files/:fileId/preview')
|
|||
$image->setBorderRadius($borderRadius);
|
||||
}
|
||||
|
||||
if (!empty($opacity)) {
|
||||
$image->setOpacity($opacity);
|
||||
}
|
||||
|
||||
if (!empty($rotation)) {
|
||||
$image->setRotation($rotation);
|
||||
}
|
||||
|
@ -367,7 +368,7 @@ App::get('/v1/storage/files/:fileId/preview')
|
|||
|
||||
$data = $image->output($output, $quality);
|
||||
|
||||
// $cache->save($key, $data);
|
||||
$cache->save($key, $data);
|
||||
|
||||
$response
|
||||
->setContentType($outputs[$output])
|
||||
|
|
Loading…
Reference in a new issue