Comments (1)
I solved like this -
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\Encoders\AutoEncoder;
$oldlocation = public_path("assets/images/test.jpg");
$newlocation = "photos"
$manager = new ImageManager(new Driver());
$image = $manager->read($oldlocation);
$image->scale(width: 300);
$image->encode(new WebpEncoder(quality: 65));
Storage::disk('public')->put('photo.jpg', $image);
from image.
Related Issues (20)
- access the core format imagemagick without getCore(); HOT 2
- Add possibility to read Imagick or GDImage instance directly with ImageManager::read() HOT 2
- Since 3.6.0 AutoEncoder does not take quality as a constructor parameter HOT 5
- Bezier curve drawing tool HOT 16
- Integration in Laravel HOT 2
- without mask method, how to create circle/round image with V3 version? HOT 2
- The text method different output the Chinese/Japanese string which use the gd/imagic. HOT 3
- The gd drawCircle with border not smooth than the imagic. HOT 2
- Parameter $opacity is invalid in place() method HOT 1
- Is there a way to strip or clear exif data when encoding a file? HOT 2
- DrawLine with unwanted colors (Imagick)
- drawLine() ignores transparent colors with GD <= 2.1.0
- Support for setting the Least Significant Bit (LSB) HOT 1
- Error: Class "Intervention\Image\Drivers\Gd\Driver" not found HOT 2
- Centering Issue with Japanese Characters (v3) HOT 9
- Reading a very large image with Imagick results in error "Unable to decode input" HOT 2
- Add possibility to pass geometric objects directly to "draw" methods
- Cover resizing is incorrect HOT 3
- The alpha of the watermark is not preserved if you place the watermark and apply opacity when using the Imagick driver
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image.