Controlling JPEG compression?

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: helmut, XnTriq, xnview

gabpbar
Posts: 2
Joined: Thu May 30, 2013 2:33 pm

Controlling JPEG compression?

Post by gabpbar »

Hello, I'm using NConvert to convert wdp images to jpg images.
Here is an example of the conversion commands that I'm executing.

"C:\Program Files (x86)\XnView\nconvert.exe" -out jpeg -truecolors -o C:\FTP_Transfers\28763549.jpg C:\FTP_Transfers\28763549.wdp

My reason for converting to jpg is not to save on space, it's just to make the file viewable in a standard browser. I would like to have the image quality be reduced by as little as possible during the conversion.

Myt question is... Is there a way to control how much compression is performed when converting from wdp to jpg?

Thanks,
Gabe
cday
XnThusiast
Posts: 3294
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Controlling JPEG compression?

Post by cday »

In the command line options for nconvert :

-q value : JPEG/PNG/FPX/WIC/PDF quality (default : 100)

A full listing of the command line options for nconvert can be obtained from :

Code: Select all

"C:\Program Files (x86)\XnView\nconvert.exe" -help | more
Or more usefully can be redirected to a txt file.

This would be better posted in the NConvert section of the forum...
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Controlling JPEG compression?

Post by oops66 »

... You can check the quality with imagemagick too.

http://www.imagemagick.org/script/identify.php

Code: Select all

identify -verbose a.jpg | grep Quality
  Quality: 85
XnViewMP Linux X64 - Debian - X64
gabpbar
Posts: 2
Joined: Thu May 30, 2013 2:33 pm

Re: Controlling JPEG compression?

Post by gabpbar »

Thanks. I did look at the help, but I missed that option. Worked like a charm.
One strange thing that I did notice is that the default when you run the conversion without specifying the -q option is not actually 100. It seems to be 85 and if you specify the -q option and don't specify a value then the default seems to be 1.

Regards,
Gabe