H
H
hard_o2020-04-17 13:04:19
PHP
hard_o, 2020-04-17 13:04:19

How to scale an image without anti-aliasing?

When I scale an image using

$result->scaleImage($result->getImageWidth()*1.1, $result->getImageHeight() * 1.1);

I get stuff like this
KUmnyXD.png

And I need it to work without them
k8Qv6tD.png

How can I do this in PHP or just in the console using imagemagick?
UPD: Found an undocumented function Imagick::setAntiAlias(bool); but it doesn't seem to work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
U235U235, 2020-04-18
@hard_o

Could be something like this:

convert input.png -interpolate Integer -filter point -resize "10000%" output.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question