Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function compress($source, $destination, $quality) {
- $info = getimagesize($source);
- if ($info['mime'] == 'image/jpeg')
- $image = imagecreatefromjpeg($source);
- elseif ($info['mime'] == 'image/gif')
- $image = imagecreatefromgif($source);
- elseif ($info['mime'] == 'image/png')
- $image = imagecreatefrompng($source);
- imagejpeg($image, $destination, $quality);
- return $destination;
- }
- $image_file = Storage::disk('s3_upload')->get("s3bucketpath");
- $new_image_file = $this->replace_extension($image->filename, '.jpg');
- $this->compress($image_file,$new_image_file, 50);
- failed to open stream: No such file or directory in file
- $info = getimagesize($source);
- �����JFIF���������C�$<'$!!$J58,<XM[VMUSam�vag�hSUy�z������^t������������C$ $G''G�dUd�����������������������������������������������������@0"�����������������A�����!1A"Q2aq#B���3R�$4b�rC���%S���5D������������������#�����!1A2"Q#�����?���HS-�� ��� ��B�@�)��( @������ @����!@��������������(�����(����� � @����UF�LHU@�d �� @ �����)������@R��B����(�R���E]��( (� @B'...
Add Comment
Please, Sign In to add comment