Skip to content
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

lose quality on resize #977

Open
carlituxman opened this issue Oct 14, 2019 · 7 comments
Open

lose quality on resize #977

carlituxman opened this issue Oct 14, 2019 · 7 comments

Comments

@carlituxman
Copy link

Some images with too weight and resolution lose quality and appear darker the colors.

@Sublan
Copy link

Sublan commented Oct 28, 2020

Yes Exact Same Issue Facing

@whatnowangga
Copy link

still dont have solution? i've facing the same issue

@Sublan
Copy link

Sublan commented Dec 31, 2020

Resize with constraint may help ,Check documentation.http://image.intervention.io/api/resize

@marianoarga
Copy link

Same problem, loosing quality on resize, keepin aspect-ratio on constraint does not fix the problem.

@beshoo
Copy link

beshoo commented Sep 4, 2022

still dont have solution? i've facing the same issue

@Sublan
Copy link

Sublan commented Sep 5, 2022

Can't find solution until....

@DriverCat
Copy link

Faced the same issue. I resize in steps and get good results, like so:

STRIP_WIDTH = 300;
$img = ImageFacade::make($tmpPath);
        $steps = 3;
        $stepWidth = intdiv($img->width(), $steps);
        for($i=1; $i<($steps + 1); $i++) {
            $nextWidth = $img->width() - ($stepWidth * $i);

            if($nextWidth < self::STRIP_WIDTH)
                $nextWidth = self::STRIP_WIDTH;

            $img = self::resize($img, $nextWidth);
        }
        $img->save($tmpPath, 100, 'png');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants