Page 1 of 1

Resize png 8 bits

Posted: Sat May 14, 2022 6:12 am
by den1a
Hello. I want to crop the photo, but I get a poor quality photo. Please tell me how to fix the problem

Code: Select all

nconvert -overwrite -resize 1500 1200 -ratio -rflag decr image.png

Re: Resize png 8 bits

Posted: Mon May 16, 2022 5:25 pm
by JeanMich
Hello,
I don't quite get it : you are not cropping anything here.

Whatever, I'm no expert but I'd try to add

Code: Select all

-out png -clevel 9  
to specify the output file format (png) and the compression level.

Code: Select all

 -overwrite -out png -clevel 9  -ratio -resize 1500 1200 -rflag decr 
It's giving me an image with the correct colors.
If you have different images from different sources, I'd add also something to deal with transparency, alpha chanel, metadata and so on to make smaller files.

Re: Resize png 8 bits

Posted: Mon May 16, 2022 6:45 pm
by cday
The GUI software XnConvert, with it's Actions Preview, can provide an easy way to test different settings, but testing with 1.95 I haven't managed to obtain the desired result, no breakup of the image though.

Re: Resize png 8 bits

Posted: Tue May 17, 2022 5:08 am
by den1a
In my case, the problem was solved by adding a parameter -rtype quick

Code: Select all

nconvert -overwrite -resize 1500 1200 -ratio -rflag decr -rtype quick image.png

Re: Resize png 8 bits

Posted: Tue May 17, 2022 5:45 am
by cday
den1a wrote: Tue May 17, 2022 5:08 am In my case, the problem was solved by adding a parameter -rtype quick

Code: Select all

nconvert -overwrite -resize 1500 1200 -ratio -rflag decr -rtype quick image.png
Interesting...

Code: Select all

-rtype        : Type of resampling
          quick    : Quick resize
          linear   : Bi-linear (linear)
          hermite  : Hermite
          gaussian : Gaussian
          bell     : Bell
          bspline  : Bspline
          mitchell : Mitchell
          lanczos  : Lanczos

Re: Resize png 8 bits

Posted: Tue May 17, 2022 5:54 am
by den1a
Unusual, but it works :)
Thank you for responding!