use with commandline
Message-ID:<6vibakFjsrcnU1@mid.individual.net>
Subject:
use with commandline
Date:Thu, 12 Feb 2009 11:16:55 +0100
I have a 256x256 xfc file and want to export it as a png in a few resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256). Is it possible to do this on commandline so I can write a batch-file for it? I didn't found usefull options with --help. -- publictimestamp.org/ptb/PTB-5427 ripemd256 2009-02-12 09:00:04 069F9C66311CE467A74392C6ACE7F17C8A188C1445DFC6C96C356AB65FFE5731
Message-ID:<6d2e4c1d-1069-4d04-84ff-15573706a14e@f3g2000yqf.googlegroups.com>
Subject:
Re: use with commandline
Date:Thu, 12 Feb 2009 11:27:17 +0100
On 12 Feb., 11:16, Christian Buhtz <exsu...@gmx.de> wrote: > I have a 256x256 xfc file and want to export it as a png in a few > resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256). > > Is it possible to do this on commandline so I can write a batch-file for it? Create a script that does do this kind of export for a loaded image, and then call it in the way that is described in the batch tutorial at http://www.gimp.org/tutorials/Basic_Batch/ HTH, Michael
Message-ID:<slrngp85n1.1fn.houghi@pasta.houghi>
Subject:
Re: use with commandline
Date:Thu, 12 Feb 2009 13:32:33 +0100
Christian Buhtz wrote: > I have a 256x256 xfc file and want to export it as a png in a few > resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256). > > Is it possible to do this on commandline so I can write a batch-file for it? yes and yes > I didn't found usefull options with --help. Best is to use ImagageMagic and specificaly `convert` http://www.imagemagick.org/Usage/resize/#resize And then something like #!/bin/bash for I in *.xfc do convert $I -resize 16x16 $I.png done Untested. Also the name will become `file.xfc.png` and it asumes there are no spaces or such in the filename and all are in the same directory. You could also add the following for J in 16 24 32 48 128 256 do <here the other loop. Replace 16x16 with $jx$j> done houghi -- Usenet is like a herd of performing elephants with diarrhea - massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it.
Message-ID:<87ab8r3hjo.fld@apaflo.com>
Subject:
Re: use with commandline
Date:Thu, 12 Feb 2009 14:34:35 +0100
houghi <houghi@houghi.org.invalid> wrote:
>Christian Buhtz wrote:
>> I have a 256x256 xfc file and want to export it as a png in a few
>> resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256).
>>
>> Is it possible to do this on commandline so I can write a batch-file for it?
>
>yes and yes
>
>> I didn't found usefull options with --help.
>
>Best is to use ImagageMagic and specificaly `convert`
>http://www.imagemagick.org/Usage/resize/#resize
>
>And then something like
>#!/bin/bash
I'm not sure what value that has to someone using Windows... :-)
>for I in *.xfc
>do
> convert $I -resize 16x16 $I.png
>done
>
>Untested. Also the name will become `file.xfc.png` and it asumes there
>are no spaces or such in the filename and all are in the same directory.
>
>You could also add the following
>for J in 16 24 32 48 128 256
>do
><here the other loop. Replace 16x16 with $jx$j>
>done
#!/bin/bash
for i in *.xfc ; do
echo "Converting file: ${i}"
for j in 16 24 32 48 128 256 ; do
convert "${i}" -resize ${j} "${i%%xfc}png"
done
done
That will give proper names, e.g. "xxx.png" instead of
"xxx.xfc.png". Also not that the argument to the
"-resize" option need only be a single value, and the
largest dimension will be that value: hence, "-resize
128" will resize a 800x400 to 128x64 or it will resize a
400x800 to 64x128.
--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@apaflo.com
Message-ID:<slrngp8d2i.ers.houghi@pasta.houghi>
Subject:
Re: use with commandline
Date:Thu, 12 Feb 2009 15:38:10 +0100
Floyd L. Davidson wrote: >>And then something like >>#!/bin/bash > > I'm not sure what value that has to someone using Windows... :-) The same http://win-bash.sourceforge.net/faq.html :-D > That will give proper names, e.g. "xxx.png" instead of > "xxx.xfc.png". Also not that the argument to the > "-resize" option need only be a single value, and the > largest dimension will be that value: hence, "-resize > 128" will resize a 800x400 to 128x64 or it will resize a > 400x800 to 64x128. And there are one or two other options he could use, depending on what he wants to do with the images later. He could easily turn them into "buttons" both elevated and pressed if he would want to use them as icons. To be honest, if possible I use ImageMagick and go to Gimp script only if it is not possible with ImageMagick. Well, for scripts anyway. A lot faster and easier to use for scripts. My biggest issue with Gimp is the complex way the CLI is and the lack of documentation about the scripting more, while that is for me one of the most importand things. houghi -- Usenet is like a herd of performing elephants with diarrhea - massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it.
Message-ID:<4994c46a$0$769$426a74cc@news.free.fr>
Subject:
Re: use with commandline
Date:Fri, 13 Feb 2009 01:52:57 +0100
Floyd L. Davidson wrote:
> houghi <houghi@houghi.org.invalid> wrote:
>> Christian Buhtz wrote:
>>> I have a 256x256 xfc file and want to export it as a png in a few
>>> resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256).
>>>
>>> Is it possible to do this on commandline so I can write a batch-file for it?
>> yes and yes
>>
>>> I didn't found usefull options with --help.
>> Best is to use ImagageMagic and specificaly `convert`
>> http://www.imagemagick.org/Usage/resize/#resize
>>
>> And then something like
>> #!/bin/bash
>
> I'm not sure what value that has to someone using Windows... :-)
>
>> for I in *.xfc
>> do
>> convert $I -resize 16x16 $I.png
>> done
>>
>> Untested. Also the name will become `file.xfc.png` and it asumes there
>> are no spaces or such in the filename and all are in the same directory.
>>
>> You could also add the following
>> for J in 16 24 32 48 128 256
>> do
>> <here the other loop. Replace 16x16 with $jx$j>
>> done
>
> #!/bin/bash
> for i in *.xfc ; do
> echo "Converting file: ${i}"
> for j in 16 24 32 48 128 256 ; do
> convert "${i}" -resize ${j} "${i%%xfc}png"
> done
> done
>
> That will give proper names, e.g. "xxx.png" instead of
> "xxx.xfc.png". Also not that the argument to the
> "-resize" option need only be a single value, and the
> largest dimension will be that value: hence, "-resize
> 128" will resize a 800x400 to 128x64 or it will resize a
> 400x800 to 64x128.
>
In Windows (inside a .BAT, with the file passed as parameter to the .BAT):
for %%s in (16 24 32 48 128 256) do convert %1 -resize %%s %~n1.png
assuming I've got the "convert" parameters right.
--
Bertrand
Message-ID:<6vibakFjsrcnU1@mid.individual.net>
Subject:
use with commandline
Date:Thu, 12 Feb 2009 11:16:55 +0100
I have a 256x256 xfc file and want to export it as a png in a few resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256). Is it possible to do this on commandline so I can write a batch-file for it? I didn't found usefull options with --help. -- publictimestamp.org/ptb/PTB-5427 ripemd256 2009-02-12 09:00:04 069F9C66311CE467A74392C6ACE7F17C8A188C1445DFC6C96C356AB65FFE5731
Message-ID:<6d2e4c1d-1069-4d04-84ff-15573706a14e@f3g2000yqf.googlegroups.com>
Subject:
Re: use with commandline
Date:Thu, 12 Feb 2009 11:27:17 +0100
On 12 Feb., 11:16, Christian Buhtz <exsu...@gmx.de> wrote: > I have a 256x256 xfc file and want to export it as a png in a few > resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256). > > Is it possible to do this on commandline so I can write a batch-file for it? Create a script that does do this kind of export for a loaded image, and then call it in the way that is described in the batch tutorial at http://www.gimp.org/tutorials/Basic_Batch/ HTH, Michael
Message-ID:<slrngp85n1.1fn.houghi@pasta.houghi>
Subject:
Re: use with commandline
Date:Thu, 12 Feb 2009 13:32:33 +0100
Christian Buhtz wrote: > I have a 256x256 xfc file and want to export it as a png in a few > resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256). > > Is it possible to do this on commandline so I can write a batch-file for it? yes and yes > I didn't found usefull options with --help. Best is to use ImagageMagic and specificaly `convert` http://www.imagemagick.org/Usage/resize/#resize And then something like #!/bin/bash for I in *.xfc do convert $I -resize 16x16 $I.png done Untested. Also the name will become `file.xfc.png` and it asumes there are no spaces or such in the filename and all are in the same directory. You could also add the following for J in 16 24 32 48 128 256 do <here the other loop. Replace 16x16 with $jx$j> done houghi -- Usenet is like a herd of performing elephants with diarrhea - massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it.
Message-ID:<87ab8r3hjo.fld@apaflo.com>
Subject:
Re: use with commandline
Date:Thu, 12 Feb 2009 14:34:35 +0100
houghi <houghi@houghi.org.invalid> wrote:
>Christian Buhtz wrote:
>> I have a 256x256 xfc file and want to export it as a png in a few
>> resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256).
>>
>> Is it possible to do this on commandline so I can write a batch-file for it?
>
>yes and yes
>
>> I didn't found usefull options with --help.
>
>Best is to use ImagageMagic and specificaly `convert`
>http://www.imagemagick.org/Usage/resize/#resize
>
>And then something like
>#!/bin/bash
I'm not sure what value that has to someone using Windows... :-)
>for I in *.xfc
>do
> convert $I -resize 16x16 $I.png
>done
>
>Untested. Also the name will become `file.xfc.png` and it asumes there
>are no spaces or such in the filename and all are in the same directory.
>
>You could also add the following
>for J in 16 24 32 48 128 256
>do
><here the other loop. Replace 16x16 with $jx$j>
>done
#!/bin/bash
for i in *.xfc ; do
echo "Converting file: ${i}"
for j in 16 24 32 48 128 256 ; do
convert "${i}" -resize ${j} "${i%%xfc}png"
done
done
That will give proper names, e.g. "xxx.png" instead of
"xxx.xfc.png". Also not that the argument to the
"-resize" option need only be a single value, and the
largest dimension will be that value: hence, "-resize
128" will resize a 800x400 to 128x64 or it will resize a
400x800 to 64x128.
--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@apaflo.com
Message-ID:<slrngp8d2i.ers.houghi@pasta.houghi>
Subject:
Re: use with commandline
Date:Thu, 12 Feb 2009 15:38:10 +0100
Floyd L. Davidson wrote: >>And then something like >>#!/bin/bash > > I'm not sure what value that has to someone using Windows... :-) The same http://win-bash.sourceforge.net/faq.html :-D > That will give proper names, e.g. "xxx.png" instead of > "xxx.xfc.png". Also not that the argument to the > "-resize" option need only be a single value, and the > largest dimension will be that value: hence, "-resize > 128" will resize a 800x400 to 128x64 or it will resize a > 400x800 to 64x128. And there are one or two other options he could use, depending on what he wants to do with the images later. He could easily turn them into "buttons" both elevated and pressed if he would want to use them as icons. To be honest, if possible I use ImageMagick and go to Gimp script only if it is not possible with ImageMagick. Well, for scripts anyway. A lot faster and easier to use for scripts. My biggest issue with Gimp is the complex way the CLI is and the lack of documentation about the scripting more, while that is for me one of the most importand things. houghi -- Usenet is like a herd of performing elephants with diarrhea - massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it.
Message-ID:<4994c46a$0$769$426a74cc@news.free.fr>
Subject:
Re: use with commandline
Date:Fri, 13 Feb 2009 01:52:57 +0100
Floyd L. Davidson wrote:
> houghi <houghi@houghi.org.invalid> wrote:
>> Christian Buhtz wrote:
>>> I have a 256x256 xfc file and want to export it as a png in a few
>>> resolutions (16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256).
>>>
>>> Is it possible to do this on commandline so I can write a batch-file for it?
>> yes and yes
>>
>>> I didn't found usefull options with --help.
>> Best is to use ImagageMagic and specificaly `convert`
>> http://www.imagemagick.org/Usage/resize/#resize
>>
>> And then something like
>> #!/bin/bash
>
> I'm not sure what value that has to someone using Windows... :-)
>
>> for I in *.xfc
>> do
>> convert $I -resize 16x16 $I.png
>> done
>>
>> Untested. Also the name will become `file.xfc.png` and it asumes there
>> are no spaces or such in the filename and all are in the same directory.
>>
>> You could also add the following
>> for J in 16 24 32 48 128 256
>> do
>> <here the other loop. Replace 16x16 with $jx$j>
>> done
>
> #!/bin/bash
> for i in *.xfc ; do
> echo "Converting file: ${i}"
> for j in 16 24 32 48 128 256 ; do
> convert "${i}" -resize ${j} "${i%%xfc}png"
> done
> done
>
> That will give proper names, e.g. "xxx.png" instead of
> "xxx.xfc.png". Also not that the argument to the
> "-resize" option need only be a single value, and the
> largest dimension will be that value: hence, "-resize
> 128" will resize a 800x400 to 128x64 or it will resize a
> 400x800 to 64x128.
>
In Windows (inside a .BAT, with the file passed as parameter to the .BAT):
for %%s in (16 24 32 48 128 256) do convert %1 -resize %%s %~n1.png
assuming I've got the "convert" parameters right.
--
Bertrand



RSS News Feed