Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.94k stars 1.49k forks source link

GD driver is breaking pixels when resizing image #1405

Open ubedthaheem opened 1 day ago

ubedthaheem commented 1 day ago

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.

Screenshot 2024-11-19 at 8 58 23 PM Screenshot 2024-11-19 at 8 54 24 PM

Environment (please complete the following information):

olivervogel commented 22 hours ago

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.