imageterminalrgbgimpindexed

Change mode of an image from indexed to rgb using shell


I'd like to make a script where I could put an image file(in indexed mode) as input then the return will be one image (in rgb mode).

It is like something gimp does in the interactive mode when you you click on Image -> Mode then click on rgb (http://docs.gimp.org/en/images/tutorials/quickie-mode-menu.png), I want to do the same thing but in the linux terminal (or in python) with a lot of images every day.

Any tips?

Thanks in Advance, sorry for the bad english.


Solution

  • This would be done easier/faster with ImageMagick.

    Then you would be able to run the following command from your shell:

    $ convert cmyk_image.jpg -colorspace rgb rgb_image.jpg

    A guide/reference is available at the ImageMagick project wiki.