Batch conversion doubts

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
Orso
Posts: 3
Joined: Sat Apr 30, 2016 7:29 am

Batch conversion doubts

Post by Orso »

Hello everyone.
I'm starting to use xnviewpro and I have some difficulty.
In particular with convert batch.
When I select the "as original" format I think that the program does not do any conversion. Unfortunately it's not what I get.
If I select "as original" the file is converted to png format and the size of the output file depends on "Preferences, View, Camera Raw, use .. embedded or half or full size".

This is an example of my conversion:

/Fotografia/TestXncView/2010_03_14/_K6T2799.CR2 1761x1174x24: loaded
/Desktop/Prova_serie_XnView/_K6T2799.CR2.png: saved

This way of converting it right?
Or I something wrong?

My aim is to select the raw files (canon cr2) that I chose (with categories) to develop in B&W and copy these files while keeping the directory structure.
That's because I'm used to store the files by date and I would keep this sort for the two categories (color and B&W).

Thanks in advance to those who want to give me information and explanations.

Orso.

PS
Work conditions: Imac 2008 and OS X el capitan
I do not speak English. I write with an automatic translator.
Be kind, answers with short sentences, like a manual of computers, would help me a lot to understand the answers.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Batch conversion doubts

Post by XnTriq »

Welcome to the forum, Orso.

If you activate Keep folder structure and Keep parent folder, …
  • /Fotografia/TestXncView/2010_03_14/_K6T2799.CR2
… will be converted to…
  • /Fotografia/TestXncView/2010_03_14/_K6T2799.CR2.png
Although XnView MP can read CR2 files, it doesn't have write support for this (proprietary) format.
Orso
Posts: 3
Joined: Sat Apr 30, 2016 7:29 am

Re: Batch conversion doubts

Post by Orso »

XnTriq wrote: Although XnView MP can read CR2 files, it doesn't have write support for this (proprietary) format.
Hello XnTriq and thanks for your quick and comprehensive answer and also for the links you provided me.
That's a lot of material to study! :D
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Batch conversion doubts

Post by XnTriq »

Please let us know once you've found a solution (-:
Orso
Posts: 3
Joined: Sat Apr 30, 2016 7:29 am

Re: Batch conversion doubts

Post by Orso »

XnTriq wrote:Please let us know once you've found a solution (-:
Hello XnTriq indeed I have found two possible solutions.

First solution:
just add an entry to the batch conversion menu.
The program has already prepared the list of files to be passed to convertion engine and the source and destination directories.
* Pseudo-code *
Instead of "for in $list files; do convert $list $list.png endo"
simply just replace convert "format as" with a system call (system (copy (or move as user wish) $list /destinationdir/$list).
This first solution is very convenient for users, the work is done by the programmer excellent XnViewPro software. :mrgreen:

Second solution:
Pending the first solution if there ever will be I have not been watching the water passing under bridges. Who acts as one make for three. :wink:
I have made a tiny little script that solves the problem.
WARNING! This script works with OSX bash and is deliberately incomplete to avoid problems for those unfamiliar.
Furthermore the script is crude, there is no error checking, everything is in the hands of the user.
I must say that the script is simple, those who know how to work with bash will not have problems to adapt it to their needs.

Code: Select all

cat test_export-list.txt | awk '{print("cp "$1" "$1)}' | sed 's/Fotografia/Blackwhite/2'
where test_export-list.txt can be done with menu voice create->file listing

in this way we get the following code:

Code: Select all

cp /Volumes/Public/Fotografia/TestXncView/2010_03_14/_K6T2996.CR2 /Volumes/Public/Blackwhite/TestXncView/2010_03_14/_K6T2996.CR2
cp /Volumes/Public/Fotografia/TestXncView/2010_03_14/_K6T3000.CR2 /Volumes/Public/blackwhite/TestXncView/2010_03_14/_K6T3000.CR2
cp /Volumes/Public/Fotografia/TestXncView/2010_04_15/_K6T3291.CR2 /Volumes/Public/blackwhite/TestXncView/2010_04_15/_K6T3291.CR2
... and so on.
In both the solutions it is nice to note that the dirty work is done by the operating system. This will also avoid any potential problems with remote directories.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Batch conversion doubts

Post by XnTriq »

Thanks for reporting back and sharing your solution(s), Orso 8-)
Post Reply