Bonjour à tous.
Bon début d'année 2016.
Nouveau membre, j'aimerai connaitre la ligne de commandes à inscrire dans un .BAT
Pour pouvoir faire, si c'est possible, un drag & drop de fichiers .EMF afin qu'ils soient redimensionnés à 200% puis sauvegardés dans le même dossier, avec le même nom, au format .JPG
Oui ; je sais que Noël est passé, mais si une âme charritable passe par ici, ça serait sympa de me dégrossir le "travail" ^^
Par avance, merci.
[RÉSOLU] batch .EMF > 200% > .JPG ?
Moderators: XnTriq, helmut, xnview
-
- Posts: 4
- Joined: Fri Jan 15, 2016 7:55 am
[RÉSOLU] batch .EMF > 200% > .JPG ?
Last edited by Ctrl-Alt-Suppr on Mon Jan 18, 2016 11:01 am, edited 1 time in total.
-
- XnThusiast
- Posts: 4176
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: batch .EMF > 200% > .JPG ?
Bonjour,Ctrl-Alt-Suppr wrote:Bonjour à tous.
Nouveau membre, j'aimerai connaitre la ligne de commandes à inscrire dans un .BAT
Pour pouvoir faire, si c'est possible, un drag & drop de fichiers .EMF afin qu'ils soient redimensionnés à 200% puis sauvegardés dans le même dossier, avec le même nom, au format .JPG
Can you read English? Prière de répondre en français… ?
-
- Posts: 4
- Joined: Fri Jan 15, 2016 7:55 am
Re: batch .EMF > 200% > .JPG ?
!?
Hi,
I have many files .EMF to be converted.
I shall like knowing the line of commands in a .BAT for:
- Enlarge in 200 % the size x, y of my files
- Register in .JPG
If possible, I would like making a drag and a drop EMF on the batch
Thank you in advance.
Hi,
I have many files .EMF to be converted.
I shall like knowing the line of commands in a .BAT for:
- Enlarge in 200 % the size x, y of my files
- Register in .JPG
If possible, I would like making a drag and a drop EMF on the batch
Thank you in advance.
-
- XnThusiast
- Posts: 4176
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: batch .EMF > 200% > .JPG ?
I have code for a batch file .bat but have been testing it using a .wmf file, do you have an example .emf file you could upload to the forum, 2MiB maximum in a ZIP, or post online?
-
- Posts: 4
- Joined: Fri Jan 15, 2016 7:55 am
Re: batch .EMF > 200% > .JPG ?
(into a .Zip because EMF is not supported by forum)
You do not have the required permissions to view the files attached to this post.
-
- XnThusiast
- Posts: 4176
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: batch .EMF > 200% > .JPG ?
Thanks, that image looks rather technical!
The following basic code run at the command line will convert a .emf file to JPEG with JPEG quality = 80 :
The following basic code run at the command line will convert all the .emf files in the Input folder into JPEG files in the Output folder with the same file names:
When that code is run as a Windows batch file .bat the % symbol must be doubled to 'escape' the character:
In a 'drag and drop' action the input files are deleted, in this case after they have been read rather than moved, which can be achieved by adding -D to the code:
To resize the pixel dimensions of the output images by 200% the code -resize 200%% 200%% may be added to give the final batch file code you require:
Note that due to a limitation on the use of quotes (" ") with wildcards (*) in NConvert, the following restrictions apply, as determined by my tests:
-Quotes may not be placed around the input term;
-The path to the file name of the input files must not contain any spaces, but the file name may contain spaces.
Any editing or other errors excepted...
In the event of any development work being required, testing may be simplified slightly by omitting the -D term until the code is otherwise working.
Test on a copy of your input EMF files!!
The following basic code run at the command line will convert a .emf file to JPEG with JPEG quality = 80 :
Code: Select all
nconvert -out jpeg -q 80 filename.emf
Code: Select all
nconvert -out jpeg -q 80 -o "C:\A\Output\%.jpeg" C:\A\Input\*.emf
Code: Select all
nconvert -out jpeg -q 80 -o "C:\A\Output\%%.jpeg" C:\A\Input\*.emf
Code: Select all
nconvert -out jpeg -q 80 -D -o "C:\A\Output\%%.jpeg" C:\A\Input\*.emf
Code: Select all
nconvert -resize 200%% 200%% -out jpeg -q 80 -D -o "C:\A\Output\%%.jpeg" C:\A\Input\*.emf
-Quotes may not be placed around the input term;
-The path to the file name of the input files must not contain any spaces, but the file name may contain spaces.
Any editing or other errors excepted...
In the event of any development work being required, testing may be simplified slightly by omitting the -D term until the code is otherwise working.
Test on a copy of your input EMF files!!
-
- Posts: 4
- Joined: Fri Jan 15, 2016 7:55 am
Re: batch .EMF > 200% > .JPG ?
I adapted to my repertory, and that works!
Great, thanks.
Great, thanks.
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: [RÉSOLU] batch .EMF > 200% > .JPG ?
Great post, cday! That one went rrright to my bookmarks