How do i choose target filesize to be compressed to(if any)

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

Moderators: XnTriq, helmut, xnview

traoiu123123
Posts: 1
Joined: Mon Nov 04, 2019 8:54 am

How do i choose target filesize to be compressed to(if any)

Post by traoiu123123 »

I want to use Nconvert to resize some of my .JPG files , when i use the code :
nconvert -out jpeg -ratio -rflag orient -resize 50% 50% *.jpg, it works fine but if i do this, the file size might still not be at my desired filesize , is there an input parameter that allows me to choose desired file size?
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How do i choose target filesize to be compressed to(if any)

Post by cday »

traoiu123123 wrote: Mon Nov 04, 2019 9:06 am I want to use Nconvert to resize some of my .JPG files , when i use the code :

Code: Select all

nconvert -out jpeg -ratio -rflag orient -resize 50% 50% *.jpg
it works fine but if i do this, the file size might still not be at my desired filesize , is there an input parameter that allows me to choose desired file size?

You can use the -q option to set the JPEG compression used, but as far as I know without checking the help file I don't think that there is an option to set a target filesize, although that is supported I think using the GUI software XnView MP or Classic...