Page 1 of 1
JPEG compression
Posted: Thu Nov 25, 2021 2:56 pm
by marten
Hello
I want very simply compress JPG images.
I use this command :
nconvert -overwrite -c 5 -greater_than filesize 1000000 C:\Users\Marten\Desktop\TESTFOTO\%\*.jPG
But .. no compression also no compression with
nconvert -overwrite -c 8 -greater_than filesize 1000000 C:\Users\Marten\Desktop\TESTFOTO\%\*.jPG
what am i doing wrong ?
thx for help
Re: COMPRESS
Posted: Thu Nov 25, 2021 3:16 pm
by cday
For JPEG output the compression level is set by the following term:
Code: Select all
-q value : JPEG/FPX/WIC/PDF/JPEG2K/WebP quality (default : 85)
For example:
You may also need the following term:
So to be sure:
Re: JPEG compression
Posted: Thu Nov 25, 2021 3:24 pm
by cday
I'm sorry, I missed the fact that you are using the -greater_than filesize option which is fairly new.
I think the problem may be that the reference filesize is possibly to be expressed in KiB rather than bytes, you can at least try that.
Re: JPEG compression
Posted: Thu Nov 25, 2021 4:45 pm
by marten
thanks anyway.
i give this a try
Re: JPEG compression
Posted: Thu Nov 25, 2021 5:11 pm
by marten
cday thank you man.
it works perfect
i use now
nconvert -overwrite -q 10 -greater_than filesize 800000 C:\Users\Marten\Desktop\TESTFOTO\%\*.jPG
and automate this every hour
perfect.
Re: JPEG compression
Posted: Thu Nov 25, 2021 7:59 pm
by cday
I assume that when the -greater_than filesize option is used the filesize parameter is expressed in bytes, I recall when the issue came up before asking that the units be included in the help file, but couldn't recall the units actually used.
Re: JPEG compression
Posted: Wed Oct 23, 2024 11:40 am
by JiyaHana
I changed my command to:
Code: Select all
nconvert -overwrite -q 10 -greater_than filesize 800000 C:\Users\Marten\Desktop\TESTFOTO\%\*.jPG
and it worked perfectly.
Now, I’m automating this every hour to keep my images compressed. Before I was using an online
jpeg compressor tool. It worked well.