Export for NConvert ...

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

User avatar
Peter2
XnThusiast
Posts: 1347
Joined: Thu Nov 24, 2005 3:07 pm
Location: CH

Export for NConvert ...

Post by Peter2 »

I selected 30 files to convert and had some settings, stored in the XBS-file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?><XnView_script version="1.0" name="max_2000">
    <Resize mode="1" width="2000" height="0" unit="0" ratio="true" orientation="false" enlarge="1" resample="7" gamma_correct="false"/>
    <Output folder="" filename="{Filename}" case="0" startIndex="1" format="JPEG">
        <Options overwrite="0" orgDate="true" keepMeta="true" keepICC="false" keepFolder="true" keepParentFolder="true" keepExtension="true" delOrg="false" multipage="false" allPages="false" openExplorer="false" openBrowser="false" clearItems="false"/>
        <JPEG quality="80" progressive="false" optimizeHuffman="false" rebuildThumb="true" orgQuality="true" DCTMethod="0" subSampling="0" smoothFactor="0"/>
    </Output>
</XnView_script>
Then I used the button "Export for NConvert ..." and got

Code: Select all

nconvert -ratio -rtype lanczos -rflag decr -resize longest 2000  -out jpeg -q 80 
Now I'm confused - can it be correct?
a) I thought that also the files (input an output were stored..)
b) where are the settings for keepfiledate, orgQuality and some more?


Addendum:
When I set the same (I hope so ...) settings in XNView and export to Batch, I get

Code: Select all

nconvert -npcd 2 -size 256x256+0 -ctype rgb -corder inter -out jpeg -ratio -rtype lanczos -rflag decr -rflag orient -resize 2000 2000 "L:\_Tmyfile_06.JPG"
XnViewMP <Current version> German, XnConvert <Current version>, Win 10
User avatar
xnview
Author of XnView
Posts: 44589
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Export for NConvert ...

Post by xnview »

file list is not exported, only actions. Is it better to output file list too??
Pierre.
User avatar
Peter2
XnThusiast
Posts: 1347
Joined: Thu Nov 24, 2005 3:07 pm
Location: CH

Re: Export for NConvert ...

Post by Peter2 »

I wrote this posting before I run into the other problem - that tons of files can't be handled in a comfortable way:
viewtopic.php?p=179006#p179006

But nevertheless - a batch without files is not a batch, it is a configuration file. Maybe there is a way to offer both ways ....
XnViewMP <Current version> German, XnConvert <Current version>, Win 10
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Export for NConvert ...

Post by helmut »

xnview wrote: Thu Jul 21, 2022 12:42 pm file list is not exported, only actions. Is it better to output file list too??
Perhaps in "Create > File listing" an option could be added so that you can export a list of files without headings which can be read by nconvert. And Create > File listing could have presets - one preset could be "File list for nconvert" or "nconvert". Just an idea...
User avatar
xnview
Author of XnView
Posts: 44589
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Export for NConvert ...

Post by xnview »

See issue for current status and some details.
Pierre.
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Export for NConvert ...

Post by helmut »

XnView MP 1.2 exports the script with files included.

From my perspective including files into the batch script clutters the batch script. And does this inclusion work for 1000 files, too?
I think that export is supposed to generate two files: One script file with nconvert and actions and options and one file with a list of files. Input and actions would be clearly separated this way. And this would allow for reusing the script more easily because file list can be edited or generated by XnView.
cday
XnThusiast
Posts: 4138
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Export for NConvert ...

Post by cday »

helmut wrote: Wed Sep 14, 2022 9:42 pm XnView MP 1.2 exports the script with files included.

From my perspective including files into the batch script clutters the batch script. And does this inclusion work for 1000 files, too?
I think that export is supposed to generate two files: One script file with nconvert and actions and options and one file with a list of files. Input and actions would be clearly separated this way. And this would allow for reusing the script more easily because file list can be edited or generated by XnView.
XnView software's export for NConvert function has always exported only the code for the actions selected, and not the code for the input files loaded, or the code for the form of output selected.

It would seem logical for the exported code to include the code for the output terms, which will be constant, and not the code for the input files, which if the exported code is to be useful will vary.

Anyone requiring a filelist for a particular run of NConvert is able to do that using the existing XnView MP function Create > File listing... tool.
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Export for NConvert ...

Post by helmut »

cday wrote: Thu Sep 15, 2022 5:42 am... It would seem logical for the exported code to include the code for the output terms, which will be constant, and not the code for the input files, which if the exported code is to be useful will vary.

Anyone requiring a filelist for a particular run of NConvert is able to do that using the existing XnView MP function Create > File listing... tool.
Thank you for your support and backing the idea of exporting two files, Chris. Flexibility and reusability are clear advantages. Export to a single file isn't a good solution and might be even removed once export in two files (script + file list) is implemented.
cday
XnThusiast
Posts: 4138
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Export for NConvert ...

Post by cday »

My suggestion is that the default exported script should include the currently missing output terms, the output file format, compression options and path to the output folder...

An option to export the currently loaded input files might also be useful, although I'm not sure why someone would wish to set up XnConvert to process a set of files and then run the script with the same files on NConvert, rather than use the exported script with different and likely changing batches of input files.

A filelist for a particular set of input files can already be created in the browser, if required.