eihror / compress-image Goto Github PK
View Code? Open in Web Editor NEWCompress your image without losing quality
License: MIT License
Compress your image without losing quality
License: MIT License
Why do you add the prefix conteudo/
in the url of the images to be compressed?
$new_image = imagecreatefrompng('conteudo/'.$this->file_url);
I tried to upload image greater than 5mb, it throws an error Class 'Eihror\Compress\Exception' not found. I'm getting this because the compress class do not support file greater than 5mb.
So there are two issues actually.
Framework: Laravel
version: 5.8
PHP: 7.2
Thanks for this library, its working fine in my local machine but when I upload the code on the server it was not compressing the image (not giving any error).
Here is my code:
$compressFile = realpath(APPPATH . '../assets/images/machineImages/'.$myImgcom->mim_name);
$compressImageName = 'myImageName';
$comporessQuality = 70;
$comporessDestination = realpath(APPPATH . '../assets/images/machineImages');
$image_compress = new Eihror\Compress\Compress($compressFile, $compressImageName, $comporessQuality, 9, $comporessDestination);
$isComprs = $image_compress->compress_image();
When I compress png images with size up to 1MB, instead of minimize the size of the file, compressor increased up.
However, I did the same with jpg images and it works.
While trying to upload webp image returning error please send a image!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.