JPEG quality with scripts exported from XnView

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

Moderators: helmut, XnTriq, xnview

JPEG quality with scripts exported from XnView

Postby eli75 » Sat Jun 04, 2016 7:30 pm

Hello Dear Pierre
Thanks a lot for such a simple and efficient tool
Unfortunately i noticed some unpleasent detail. NConvert scripts exported from XnView Batch Processor give me result very differs from using Xnview Batch Proceesor itself with the same settings. Picture loses it's size and quality. Here is examples

I have a Source .jpg

i resize it 200% using XnView Batch Processor with this settings
XnViewBatchProcessorSettings.jpg


After it i export this settings to NConvert .bat file and resize Source file 200% using this .bat. that's what i get
XnView vs NconvertDefaultSet.jpg


After it i manually modify this .bat file, convert Source.jpg using modified .bat and thats what i get
XnView vs NconvertDefaultSetModefied.jpg


Does it mean that XnView v.2.36 that i use still makes wrong scripts where absence of -q means -q 100 by default when it's -q 85 in current Nconvert?

Best Wishes
Illya
eli75
 
Posts: 4
Joined: Sat Jun 04, 2016 1:15 pm

Re: NConvert 6.88

Postby cday » Sat Jun 04, 2016 9:18 pm

eli75 wrote:Unfortunately I noticed some unpleasent detail. NConvert scripts exported from XnView Batch Processor give me result very different from using Xnview Batch Proceesor itself with the same settings. Picture loses it's size and quality.

...

Does it mean that XnView v.2.36 that I use still makes wrong scripts where absence of -q means -q 100 by default when it's -q 85 in current NConvert?


The NConvert help file gives q = 85 as the default setting:

Code: Select all
-q value          : JPEG/FPX/WIC/PDF quality (default : 85)

The q value used in XnView Classic will I think be the last value set, possibly defaulting to q = 100 when first installed, I'm not sure...

Does that answer your question?

If you need to post further code it would help if you could post it between code tags, as above, rather than as text on a screenshot... :D
cday
XnThusiast
 
Posts: 1334
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: NConvert 6.88

Postby eli75 » Sat Jun 11, 2016 6:04 pm

Thank You very much for reply. Shure. I can agree that it could be help to write a code under tags IN ADDITION, cause i write it on image for better visuality of comparsion. Yes You are right the solution is in "-q value" parameter. But main issue is some different:

XnView has an option To Export It's Batch Processor Settings In To .bat file for NConvert using. If i set it as shown on at the first picture with the quality level 100, i expect to see code in the result .bat file like this when i press export

Code: Select all
nconvert -npcd 2 -size 256x256+0 -ctype rgb -corder inter -out -q 100 jpeg *.jpg


instead of this i see

Code: Select all
nconvert -npcd 2 -size 256x256+0 -ctype rgb -corder inter -out jpeg *.jpg


and of course when i use this last one .bat i get picture of 85% quality of original, when i want to get 100% quality, as it set in settings

Question-Do i need to modify manually scripts generated by XnView, or XnView needs to generate PROPER scripts according to it's settings? Or-Why XnView seted on 100% quality generates 85% quality scripts?

P.S. XnView 2.36 was installed clean, after installation settings under tools-options-write-jpeg was set as on the first image, then restarted
eli75
 
Posts: 4
Joined: Sat Jun 04, 2016 1:15 pm

Re: NConvert 6.88

Postby cday » Sat Jun 11, 2016 7:13 pm

eli75 wrote:Question-Do I need to modify manually scripts generated by XnView, or XnView needs to generate PROPER scripts according to it's settings? Or-Why XnView seted on 100% quality generates 85% quality scripts?

Confirmed: Scripts .bat exported from XnView for NConvert do not include the Q value set in XnView for JPEQ compression, so possibly a bug as it is not the expected behaviour, or possibly a limitation depending on how you view it...

In the absence of a q value in the script, NConvert uses the default value of 85 as you've found, and if a different value is required it must be added to the code.

You might note that XnView MP batch convert scripts exported for NConvert only include code for the actions specified, so no solution there.
cday
XnThusiast
 
Posts: 1334
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: JPEG quality with scripts exported from XnView

Postby XnTriq » Sat Jun 11, 2016 8:30 pm

User avatar
XnTriq
Moderator & Librarian
 
Posts: 4742
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: JPEG quality with scripts exported from XnView

Postby eli75 » Sun Jun 12, 2016 12:23 am



OK, OK, My Friends! I surrender! :)
I'll create .bat files manually instead of using this option from XnView as it was reccomended (somewhere, don't remember where). Lucky the script sequence is very simple, help is very clear, and the processor is just a miracle!
Thank all of You for Support
Best Wishes!
eli75
 
Posts: 4
Joined: Sat Jun 04, 2016 1:15 pm

Re: NConvert 6.88

Postby eli75 » Sun Jun 12, 2016 12:52 am

cday wrote:
eli75 wrote:Question-Do I need to modify manually scripts generated by XnView, or XnView needs to generate PROPER scripts according to it's settings? Or-Why XnView seted on 100% quality generates 85% quality scripts?

Confirmed: Scripts .bat exported from XnView for NConvert do not include the Q value set in XnView for JPEQ compression, so possibly a bug as it is not the expected behaviour, or possibly a limitation depending on how you view it...

In the absence of a q value in the script, NConvert uses the default value of 85 as you've found, and if a different value is required it must be added to the code.

You might note that XnView MP batch convert scripts exported for NConvert only include code for the actions specified, so no solution there.


Thank You've confirmed my guesses!
eli75
 
Posts: 4
Joined: Sat Jun 04, 2016 1:15 pm


Return to NConvert

Who is online

Users browsing this forum: No registered users and 3 guests