Problem with resizing png images

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
bunak
Posts: 4
Joined: Sun Jun 02, 2013 10:53 am

Problem with resizing png images

Post by bunak »

Hi
I want to reduce the size of png-images. But Executing a command with the following options horribly distorted images.
nconvert.exe -ratio -resize 500 0 -o "D:\Imgs_resize\%" "d:\Imgs\*.png"
Why is the image so bad?

There are examples of bad images in attached files with "_res" in the end
Attachments
01200004459_res.png
01200004459_res.png (1.37 KiB) Viewed 1682 times
01009796610_res.png
01009796610_res.png (1.35 KiB) Viewed 1682 times
00002160299_res.png
00002160299_res.png (3.89 KiB) Viewed 1682 times
01200004459.png
01200004459.png (5.69 KiB) Viewed 1682 times
01009796610.png
01009796610.png (5.88 KiB) Viewed 1682 times
00002160299.png
cday
XnThusiast
Posts: 3978
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Problem with resizing png images

Post by cday »

bunak wrote: Fri Mar 22, 2019 6:19 pm I want to reduce the size of png-images. But Executing a command with the following options horribly distorted images.

Code: Select all

nconvert.exe -ratio -resize 500 0 -o "D:\Imgs_resize\%" "d:\Imgs\*.png" 
Why is the image so bad?

There are examples of bad images in attached files with "_res" in the end

The code in the help file for the resize option is:

Code: Select all

-resize w h      : Scale width-height
            w h can be percent (ex: -resize 100% 200%)
So you are resizing to a height of 0 pixels ??
User avatar
xnview
Author of XnView
Posts: 43463
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Problem with resizing png images

Post by xnview »

if you means bad quality, you need to resize in greyscale and not in binary, so please add before -resize

Code: Select all

-grey 256
Pierre.
bunak
Posts: 4
Joined: Sun Jun 02, 2013 10:53 am

Re: Problem with resizing png images

Post by bunak »

xnview wrote: Sun Mar 24, 2019 8:07 am if you means bad quality, you need to resize in greyscale and not in binary, so please add before -resize

Code: Select all

-grey 256
Thank you. Your recommendation helped.
bunak
Posts: 4
Joined: Sun Jun 02, 2013 10:53 am

Re: Problem with resizing png images

Post by bunak »

cday wrote: Sat Mar 23, 2019 3:57 pm So you are resizing to a height of 0 pixels ??
It is resize Image correctly with option -ratio
Post Reply