convert to rgb profile

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
peterbradd

convert to rgb profile

Post by peterbradd »

I've got 160 jpeg images I want to convert to rgb profile, can I use image magick for this?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert to rgb profile

Post by fmw42 »

peterbradd

Re: convert to rgb profile

Post by peterbradd »

I have a file on desktop called temp with 132 jpeg images with cmyk profile attached

I want to convert to rgb profile

I type /users/peter/desktop/temp peter$ convert jpeg -colorspace rgb .jpeg
and I get -bash: /users/peter/desktop/temp: is a directory

What am i doing wrong?

Thanks in advance.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert to rgb profile

Post by fmw42 »

you left off the wild card * symbols, but
convert only process one (or a few) images at a time and does not deal with wild cards well.

try mogrify see

http://www.imagemagick.org/Usage/basics/#mogrify
peterbradd

Re: convert to rgb profile

Post by peterbradd »

I get this

Macintosh:~ peter$ /users/peter/desktop/temp peter$ mogrify -convert jpg -colorspace rgb *.jpg
-bash: /users/peter/desktop/temp: is a directory

any suggestions?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert to rgb profile

Post by fmw42 »

mogrify -convert jpg -colorspace rgb *.jpg
Bad syntax. You cannot mix mogrify and convert!!!!

When I use mogrify, I set up a new folder to receive the new images. So say you have your images in folder test1 and you want to put them in folder test2

cd pathto/test1
mogrify -path pathto/test2 -format jpg -colorspace rgb *.jpg

That will move you to the directory where you have your images, test1, then convert them and put them in the new directory, test2

But you have not supplied any profile so it will use some default profile to convert to rgb colorspace.

PS What colorspace are your images? CMYK? If already RGB, then no point in doing this at all unless you have a better color profile.
peterbradd

Re: convert to rgb profile

Post by peterbradd »

images are CMYK want adobe rgb

files are on desktop file named a-1.jpeg through a-132.jpeg

Macintosh:~ peter$ cd /users/peter/desktop/temp
Macintosh:temp peter$ mogrify -path /users/peter/desktop/temp2 -format jpg -colorspace rgb *.jpg
mogrify: unable to open image `*.jpg': No such file or directory @ blob.c/OpenBlob/2482.

thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert to rgb profile

Post by fmw42 »

peterbradd wrote:images are CMYK want adobe rgb

files are on desktop file named a-1.jpeg through a-132.jpeg

Macintosh:~ peter$ cd /users/peter/desktop/temp
Macintosh:temp peter$ mogrify -path /users/peter/desktop/temp2 -format jpg -colorspace rgb *.jpg
mogrify: unable to open image `*.jpg': No such file or directory @ blob.c/OpenBlob/2482.

thanks
If your files have suffix .jpeg and you want to keep .jpeg vs .jpg, then you must use that suffix in the command


mogrify -path /users/peter/desktop/temp2 -format jpeg -colorspace rgb *.jpeg

Be sure to create temp2 before using mogrify as it will not create it.

If that does not work, then move your folders from the desktop to your home directory (/peter). I have not tried processing files outside my home directory.
peterbradd

Re: convert to rgb profile

Post by peterbradd »

hi,

that worked perfectly! thanks I am learning.

it converted it to sRGB and I need adobe RGB. is there a way of defining this profile.

Will mogrify convert the profile or assign a profile?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert to rgb profile

Post by fmw42 »

peterbradd wrote:hi,

that worked perfectly! thanks I am learning.

it converted it to sRGB and I need adobe RGB. is there a way of defining this profile.

Will mogrify convert the profile or assign a profile?
Sorry, I have never used profiles, so don't know much about them or where to get them or put them. The only resource I know is at http://www.imagemagick.org/Usage/formats/#profiles. Perhaps you should look on the Adobe web site for their profiles.

I presume mogrify can add or remove profiles.


Search the forum for profiles and perhaps you will find some examples.
peterbradd

Re: convert to rgb profile

Post by peterbradd »

thanks,

i have had no luck with that. I posted a new topic around adobe RGB.
Post Reply