-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GD driver is breaking pixels when resizing image #1405
Comments
Please edit your code example with the exact values passed by replacing the variables names with their corresponding values. With just the variables names you provided, I can't see what is going on and what you are trying to do. |
I created a trait here is my code:
|
Here again, I cannot see which values arrive in the resize method. Please provide a code example with the exact values passed by replacing the variables names passed to the This part of the code is relevant. $image->resize($value['width'], $value['height'], function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->sharpen(0)->save(public_path("$thmb_destination/$resizedName"), 100); I must also note that the |
Describe the bug
I tried to implement this library into my Laravel project, apart from its awesome features & easiness in use, this library is breaking pixels in while resizing image with cover() function.
Code Example
Code example to reproduce the behavior.
Expected behavior
foreach ($cropSize as $key => $value) { $resizedName = pathinfo($imageName, PATHINFO_FILENAME) . "_{$key}." . $file->getClientOriginalExtension(); //$image->setResolution($x_resolution, $y_resolution); $image->scale($value['width'], $value['height'])->save(public_path("assets/images/$folderPath/$resizedName")); $resizedImages[] = "assets/images/$folderPath/$resizedName"; }
Images
If applicable, add problematic images or screenshots to help explain your problem.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: