added brave image+video support
This commit is contained in:
parent
7c771c82c8
commit
4559857380
63 changed files with 786 additions and 307 deletions
|
@ -57,6 +57,7 @@ try{
|
|||
}
|
||||
|
||||
$image->readImageBlob($payload["body"]);
|
||||
|
||||
$image_width = $image->getImageWidth();
|
||||
$image_height = $image->getImageHeight();
|
||||
|
||||
|
@ -102,16 +103,16 @@ try{
|
|||
$image_width = $image_height * $ratio;
|
||||
}
|
||||
|
||||
$image->setImageBackgroundColor(new ImagickPixel("#504945"));
|
||||
$image->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
|
||||
|
||||
$image->resizeImage($image_width, $image_height, Imagick::FILTER_LANCZOS, 1);
|
||||
$image->setImageBackgroundColor("#504945");
|
||||
$image->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE);
|
||||
|
||||
$image->stripImage();
|
||||
$image->setFormat("jpeg");
|
||||
$image->setImageCompressionQuality(90);
|
||||
$image->setImageCompression(Imagick::COMPRESSION_JPEG2000);
|
||||
|
||||
$image->resizeImage($image_width, $image_height, Imagick::FILTER_LANCZOS, 1);
|
||||
|
||||
$proxy->getfilenameheader($payload["headers"], $_GET["i"]);
|
||||
|
||||
header("Content-Type: image/jpeg");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue