Convert pictures via batch file in different sizes

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

Moderators: XnTriq, helmut, xnview

User avatar
Lakrimosa
Posts: 4
Joined: Mon Dec 11, 2006 11:03 am
Location: Rheinhessen

Convert pictures via batch file in different sizes

Post by Lakrimosa »

Hi @ll,

is it possible to convert pictures at once in different sizes by using NConvert or XBS Script?

To be more specific:
I have an iPod video Theme and want convert it in a iPod Nano Theme.
The Theme incudes nearly 400 .bmp files in different sizes. The Nano has a smaller display as the video and this is why every picture has to convert in a new size and the new size is not the same for all of the 400 .bmp files.


For example:
pic000.bmp - old size 40x40 - new size 20x20
pic001.bmp - old size 124x85 - new size 75x40
and so on...

I know that I have to write down every filename with the new size. But it would be great if I have to do it only once and not for every Theme I want to convert.

Maybe someone can help me here.
Thanks in advance.
Have a nice day.
Lakrimosa
User avatar
xnview
Author of XnView
Posts: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Convert pictures via batch file in different sizes

Post by xnview »

Lakrimosa wrote:Hi @ll,

is it possible to convert pictures at once in different sizes by using NConvert or XBS Script?

To be more specific:
I have an iPod video Theme and want convert it in a iPod Nano Theme.
The Theme incudes nearly 400 .bmp files in different sizes. The Nano has a smaller display as the video and this is why every picture has to convert in a new size and the new size is not the same for all of the 400 .bmp files.


For example:
pic000.bmp - old size 40x40 - new size 20x20
pic001.bmp - old size 124x85 - new size 75x40
and so on...

I know that I have to write down every filename with the new size. But it would be great if I have to do it only once and not for every Theme I want to convert.

Maybe someone can help me here.
Thanks in advance.
No but you can use 2 command with nconvert
Pierre.
User avatar
Lakrimosa
Posts: 4
Joined: Mon Dec 11, 2006 11:03 am
Location: Rheinhessen

Post by Lakrimosa »

Hi Pierre,

thanks for the quick answer.
OK, then I will try to create something in NConvert.
This will be funny :mrgreen: but I will try.
Have a nice day.
Lakrimosa
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

Lakrimosa wrote:OK, then I will try to create something in NConvert.
This will be funny :mrgreen: but I will try.
To get the real fun have a look at the info in How to use nconvert. ;-)
User avatar
Lakrimosa
Posts: 4
Joined: Mon Dec 11, 2006 11:03 am
Location: Rheinhessen

Post by Lakrimosa »

Hehe, I know. :wink:
I read it and I read some other infos which I have "googled".
Well I have wrote the following line in a .bat file:

d:\ipod\test\test\nconvert.exe -in pic000.bmp -resize 120 100 -o pic010.bmp
and got an error: Bad input format ´pic000.bmp´

Then I tried :
d:\ipod\test\test\nconvert.exe pic000.bmp -resize 120 100 -o pic010.bmp
and got the following message:
Conversion of pic000.bmp into pic000.bmp OK
Error: Can`t open file (120)
Error: Can`t open file (100)
Error: Can`t open file (-o)
Error: Can`t open file (pic010.bmp)

What must I do that nconvert will only resize the file pic000.bmp and not another one in the same path?
The .bat file, nconvert.exe and pic000.bmp are in the path d:\ipod\test\test\

Thanks in advance.
Lakrimosa
Have a nice day.
Lakrimosa
User avatar
xnview
Author of XnView
Posts: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

Lakrimosa wrote:Hehe, I know. :wink:
I read it and I read some other infos which I have "googled".
Well I have wrote the following line in a .bat file:

d:\ipod\test\test\nconvert.exe -in pic000.bmp -resize 120 100 -o pic010.bmp
and got an error: Bad input format ´pic000.bmp´

Then I tried :
d:\ipod\test\test\nconvert.exe pic000.bmp -resize 120 100 -o pic010.bmp
and got the following message:
Conversion of pic000.bmp into pic000.bmp OK
Error: Can`t open file (120)
Error: Can`t open file (100)
Error: Can`t open file (-o)
Error: Can`t open file (pic010.bmp)

What must I do that nconvert will only resize the file pic000.bmp and not another one in the same path?
The .bat file, nconvert.exe and pic000.bmp are in the path d:\ipod\test\test\

Thanks in advance.
Lakrimosa
Try:
nconvert.exe -resize 120 100 -out bmp -o pic010.bmp pic000.bmp
Pierre.
User avatar
Lakrimosa
Posts: 4
Joined: Mon Dec 11, 2006 11:03 am
Location: Rheinhessen

Post by Lakrimosa »

:mrgreen:
It works!!! Thank you very much :P
Have a nice day.
Lakrimosa