RSS/Atom feed Twitter
Site is read-only, email is disabled

batch image convert to rgb

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

batch image convert to rgb HarryH 07 Oct 03:25
  batch image convert to rgb Ofnuts 08 Oct 06:42
2015-10-07 03:25:36 UTC (about 9 years ago)
postings
1

batch image convert to rgb

Hi

Just trying a batch in a folder of png files, want to convert from indexed mode to rgb. Followed GIMP help instructions for batch convert via terminal (I'm using Xubuntu 14.04 if that makes any difference).

I tried this and got an error:

gimp -i -b '(gimp-image-convert-rgb "*.png")' -b '(gimp-quit 0)' batch command experienced an execution error: Error: ( : 1) Invalid type for argument 1 to gimp-image-convert-rgb

Can anyone explain to me what I did wrong?

Cheers

Ofnuts
2015-10-08 06:42:36 UTC (about 9 years ago)

batch image convert to rgb

On 07/10/15 05:25, HarryH wrote:

Hi

Just trying a batch in a folder of png files, want to convert from indexed mode to rgb. Followed GIMP help instructions for batch convert via terminal (I'm using Xubuntu 14.04 if that makes any difference).

I tried this and got an error:

gimp -i -b '(gimp-image-convert-rgb "*.png")' -b '(gimp-quit 0)' batch command experienced an execution error: Error: ( : 1) Invalid type for argument 1 to gimp-image-convert-rgb

Can anyone explain to me what I did wrong?

The first parameter to that function is an image already loaded in Gimp, not a filename (with a wildcard too boot). So your script would need to iterate the wildcard pattern, and for each file, load the image, convert it, and save the result.

But for this kind of work, you should really be using the ImageMagick toolbox (available in the Ubuntu repositories), a set a command line tools to edit/convert images. See
http://www.imagemagick.org/script/index.php