Changing CMYK to RGB

Discussion in 'HTML' started by Jason Gastrich, B.A., M.A., Nov 5, 2003.

  1. Hey friends,

    Does anyone know how to change 1,000 .jpg files from CMYK to RGB? I've
    found a program that will do it one by one. However, I need to convert
    1,000 of them, so this will take a long time unless I either find the right
    program or use some sort of batch process.

    Any input is appreciated.

    Sincerely,
    Jason

    --

    Jesus Christ Saves Ministries
    http://www.jcsm.org
    Over 50,000 web pages!

    John 8:36 reads, "Therefore if the Son makes you free, you shall be free
    indeed."

    Galatians 5:1 reads, "Stand fast therefore in the liberty by which Christ
    has made us free, and do not be entangled again with a yoke of bondage."
     
    Jason Gastrich, B.A., M.A., Nov 5, 2003
    #1
    1. Advertising

  2. Jason Gastrich, B.A., M.A. wrote:

    > Does anyone know how to change 1,000 .jpg files from CMYK to RGB? I've
    > found a program that will do it one by one. However, I need to convert
    > 1,000 of them, so this will take a long time unless I either find the right
    > program or use some sort of batch process.


    Perl's Image::Magick module?

    Perhaps someting similar in PHP?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 5, 2003
    #2
    1. Advertising

  3. Toby A Inkster wrote:
    > Jason Gastrich, B.A., M.A. wrote:
    >
    >> Does anyone know how to change 1,000 .jpg files from CMYK to RGB?
    >> I've found a program that will do it one by one. However, I need to
    >> convert 1,000 of them, so this will take a long time unless I either
    >> find the right program or use some sort of batch process.

    >
    > Perl's Image::Magick module?


    Thanks. Is this a free program?

    Sincerely,
    Jason

    > Perhaps someting similar in PHP?
     
    Jason Gastrich, B.A., M.A., Nov 5, 2003
    #3
  4. In article <ZU0qb.25981$>,
    says...
    > Hey friends,
    >
    > Does anyone know how to change 1,000 .jpg files from CMYK to RGB? I've
    > found a program that will do it one by one. However, I need to convert
    > 1,000 of them, so this will take a long time unless I either find the right
    > program or use some sort of batch process.


    http://www.irfanview.com/ has batch conversion facilities. Not sure
    about the CMYK think but it's worth a look, and it's free.

    --
    Hywel I do not eat quiche
    http://hyweljenkins.co.uk/
    http://hyweljenkins.co.uk/mfaq.php
     
    Hywel Jenkins, Nov 5, 2003
    #4
  5. Hywel Jenkins wrote:
    > In article <ZU0qb.25981$>,
    > says...
    >> Hey friends,
    >>
    >> Does anyone know how to change 1,000 .jpg files from CMYK to RGB?
    >> I've found a program that will do it one by one. However, I need to
    >> convert 1,000 of them, so this will take a long time unless I either
    >> find the right program or use some sort of batch process.

    >
    > http://www.irfanview.com/ has batch conversion facilities. Not sure
    > about the CMYK think but it's worth a look, and it's free.


    Good idea. I just wrote irfanviewer and asked if this is possible.

    JG
     
    Jason Gastrich, B.A., M.A., Nov 5, 2003
    #5
  6. Jason Gastrich, B.A., M.A. wrote:

    > Toby A Inkster wrote:
    >
    >> Perl's Image::Magick module?

    >
    > Thanks. Is this a free program?


    Yes. Of course, I assume some knowledge of a scripting language (such
    as command-line Perl or PHP) for automation purposes. Your script would
    need to get a list of files to be converted, loop through them and for
    each file:

    - think up a name for the new file. (e.g. for myfile.jpeg, the
    new file name might be myfile-rgb.jpeg)

    - call ImageMagick using either a language-specific module, or
    (easier) a system() call to run:
    convert -colorspace RGB myfile.jpeg myfile-rgb.jpeg

    - optionally, delete the original.

    ImageMagick homepage:
    <http://www.imagemagick.org/>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 5, 2003
    #6
  7. Toby A Inkster wrote:
    > Jason Gastrich, B.A., M.A. wrote:
    >
    >> Toby A Inkster wrote:
    >>
    >>> Perl's Image::Magick module?

    >>
    >> Thanks. Is this a free program?

    >
    > Yes. Of course, I assume some knowledge of a scripting language (such
    > as command-line Perl or PHP) for automation purposes. Your script
    > would need to get a list of files to be converted, loop through them
    > and for each file:
    >
    > - think up a name for the new file. (e.g. for myfile.jpeg, the
    > new file name might be myfile-rgb.jpeg)
    >
    > - call ImageMagick using either a language-specific module, or
    > (easier) a system() call to run:
    > convert -colorspace RGB myfile.jpeg myfile-rgb.jpeg
    >
    > - optionally, delete the original.
    >
    > ImageMagick homepage:
    > http://www.imagemagick.org/


    I affrim that a batch script could be used with a variety of programs. This
    is a bit over my head, though. Is there an article on this?

    JG
     
    Jason Gastrich, B.A., M.A., Nov 5, 2003
    #7
  8. Jason Gastrich, B.A., M.A.

    Zak McGregor Guest

    On Wed, 05 Nov 2003 08:37:45 +0200, Jason Gastrich, B.A., M.A. <"Jason
    Gastrich, B.A., M.A." <>> wrote:

    > Hey friends,
    >
    > Does anyone know how to change 1,000 .jpg files from CMYK to RGB? I've
    > found a program that will do it one by one. However, I need to convert
    > 1,000 of them, so this will take a long time unless I either find the
    > right program or use some sort of batch process.
    >


    Image Magick is your friend.
    Ciao
    Zak

    --
    ========================================================================
    http://www.carfolio.com/ Searchable database of 10 000+ car specs
    Auctioning motoring-related items at eBay? http://www.carfolio.com/ebay/
    ========================================================================
     
    Zak McGregor, Nov 5, 2003
    #8
  9. Jason Gastrich, B.A., M.A.

    Zak McGregor Guest

    On Wed, 05 Nov 2003 11:02:35 +0200, Zak McGregor <"Zak McGregor"
    <>> wrote:

    > On Wed, 05 Nov 2003 08:37:45 +0200, Jason Gastrich, B.A., M.A. <"Jason
    > Gastrich, B.A., M.A." <>> wrote:
    >
    >> Hey friends,
    >>
    >> Does anyone know how to change 1,000 .jpg files from CMYK to RGB? I've
    >> found a program that will do it one by one. However, I need to convert
    >> 1,000 of them, so this will take a long time unless I either find the
    >> right program or use some sort of batch process.
    >>
    >>

    > Image Magick is your friend.


    Sorry I should elaborate a bit. Install ImageMagick. If you have a
    reasonable shell, you can cd to the directory in which the images are
    stored, and issue a command like
    for i in *.jpg ; do convert -colorspace rgb -quality 100 $i $i.rgb.jpeg ;
    done

    convert is merely one of the tools provided by the ImageMagick suite.

    Ciao

    Zak

    --
    ========================================================================
    http://www.carfolio.com/ Searchable database of 10 000+ car specs
    Auctioning motoring-related items at eBay? http://www.carfolio.com/ebay/
    ========================================================================
     
    Zak McGregor, Nov 5, 2003
    #9
  10. Zak McGregor wrote:

    > If you have a reasonable shell


    Forget it, he uses Windows. (Yes, I'll admit that I do too. Getting rid
    of it as soon as I can.)
     
    Leif K-Brooks, Nov 5, 2003
    #10
  11. Jason Gastrich, B.A., M.A.

    Markus Ernst Guest

    "Jason Gastrich, B.A., M.A." <> schrieb im Newsbeitrag
    news:ZU0qb.25981$...
    > Hey friends,
    >
    > Does anyone know how to change 1,000 .jpg files from CMYK to RGB? I've
    > found a program that will do it one by one. However, I need to convert
    > 1,000 of them, so this will take a long time unless I either find the

    right
    > program or use some sort of batch process.
    >


    Adobe Photoshop has a nice batch function. You can record an action, start
    the batch process on the image folder and go for lunch.

    --
    Markus
     
    Markus Ernst, Nov 5, 2003
    #11
  12. Jason Gastrich, B.A., M.A.

    Richard Guest

    Jason Gastrich, B.A., M.A. wrote:

    > Hywel Jenkins wrote:
    >> In article <ZU0qb.25981$>,
    >> says...
    >>> Hey friends,


    >>> Does anyone know how to change 1,000 .jpg files from CMYK to RGB?
    >>> I've found a program that will do it one by one. However, I need to
    >>> convert 1,000 of them, so this will take a long time unless I either
    >>> find the right program or use some sort of batch process.


    >> http://www.irfanview.com/ has batch conversion facilities. Not sure
    >> about the CMYK think but it's worth a look, and it's free.


    > Good idea. I just wrote irfanviewer and asked if this is possible.


    > JG



    irfanview's output is RGB.
    as are most image producers for a PC.
     
    Richard, Nov 5, 2003
    #12
  13. Jason Gastrich, B.A., M.A.

    Andy Dingley Guest

    On Wed, 05 Nov 2003 11:56:20 GMT, Leif K-Brooks
    <> wrote:

    >Zak McGregor wrote:
    >
    >> If you have a reasonable shell

    >
    >Forget it, he uses Windows.


    Windows has a great shell, it's called Perl :cool:

    Actually, for simply iterating a directory full of files, you could do
    it perfectly well in DOS ! The trick is to do it in two batch files,
    one with the loop in and one with the command. Parameter or variable
    handling in DOS / Windows shell is negligible, but there's just about
    enough to work with if you use the command-line parameters (hence the
    need to use two batch files).
    --
    Die Gotterspammerung - Junkmail of the Gods
     
    Andy Dingley, Nov 5, 2003
    #13
  14. Jason Gastrich, B.A., M.A.

    janoonk

    Joined:
    Nov 5, 2008
    Messages:
    1
    Batch file to convert CMYK files to RGB

    I installed ImageMagick for Windows.

    Here's a batch file which checks for CMYK .jpg and convert it to RGB .jpg.
    The original file is kept and the RGB version of the original file has the same name with -rgb added to it.

    ---

    @echo off
    for /F "delims=" %%I in ('dir /B /S *.jpg') do call :process "%%I"
    goto :eof

    :process
    identify -verbose %1 | find /c /i "Colorspace: CMYK" > temp.txt
    set /p count=<temp.txt
    del temp.txt
    if %count%==1 (
    if not exist "%~dpn1-rgb.jpg" convert -quality 90 -colorspace RGB %1 "%~dpn1-rgb.jpg"
    )
    goto :eof
     
    janoonk, Nov 5, 2008
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gt
    Replies:
    0
    Views:
    793
  2. Oracle3001

    RGB to CMYK

    Oracle3001, Oct 3, 2003, in forum: Java
    Replies:
    4
    Views:
    8,132
    Tor Iver Wilhelmsen
    Oct 3, 2003
  3. Oracle3001

    Splitting a CMYK Image

    Oracle3001, Oct 3, 2003, in forum: Java
    Replies:
    1
    Views:
    604
    Marco Schmidt
    Oct 4, 2003
  4. Andrew Banks

    Setting colour as CMYK not RGB

    Andrew Banks, Mar 5, 2004, in forum: HTML
    Replies:
    1
    Views:
    504
    Chris Morris
    Mar 5, 2004
  5. Johan Holst Nielsen

    Regarding color conversion (RGB->CMYK)

    Johan Holst Nielsen, Nov 12, 2004, in forum: Python
    Replies:
    4
    Views:
    1,896
    Robert Kern
    Nov 13, 2004
Loading...

Share This Page