Announcement

Collapse
No announcement yet.

please help with command line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    please help with command line

    I'm trying to figure out how to use the command line to change an image to grayscale.

    here is what I tried to run from a program code
    C:\Program Files\IrfanView\i_view32.exe/c:\ocr\open.gif/gray

    I got an error , so then I tries this
    "C:\Program Files\IrfanView\i_view32.exe"/c:\ocr\open.gif/gray

    Infraview opened but the file wasn't converted to grayscale

    so then I tried this
    "C:\Program Files\IrfanView\i_view32.exe"/c:\ocr\open.gif/gray=c:\ocr\open2.gif

    again infraview opened but nothing happened


    So I decided to run the line from the start>run window and all the lines above generated an error in windows xp


    Can these command lines be run from the Start>Run ?

    Is there something wrong with my syntax that they will not run from my program ?

    I also tried them from excel vba using the Shell command and had no luck , again I got errors ?

    Please help me understand what I am doing wrong with this .

    Also is it possible to change a file to grayscale without infraview opening ?


    Thank you for your help.

    #2
    Hi,

    welcome here

    Try to use:

    Code:
    "C:\Program Files\IrfanView\i_view32.exe" c:\ocr\open.gif /convert=c:\ocr\open2.gif /gray
    Untested!

    steve

    Comment


      #3
      Steve thank you for replying.

      The line of code you provided does save a new file but it fails to change it to grayscale.

      There is a widow that comes up for an option to select a transparent color , and if you don't want that you hit escape.

      Is there a way to make sure that window doesn't show ?

      Why isn't my image being converted to gray scale ?

      What if I want to save the same file , just convert a file without creating a new file ?

      Comment


        #4
        I enter the same path for both files in the line of code and it ran without error.

        C:\Program Files\IrfanView\i_view32.exe" c:\ocr\open.gif /convert=c:\ocr\open.gif /gray

        So that would seem to work if I could get to a point where it actually converts to gray scale

        Comment


          #5
          I tried this

          "C:\Program Files\IrfanView\i_view32.exe" c:\ocr\open.gif /gray/convert=c:\ocr\open.gif

          It brings the image up in the infraview window and in gray scale but it doesn't save it.

          And I want to bypass all windows.
          Last edited by suitedaces; 23.02.2008, 11:15 PM.

          Comment


            #6
            Steve I got this to work as intended, the transparency window will not come up with jpg format.
            And I needed to make sure I had a space between jpg and gray and between gray and convert.

            RunProgram>C:\Program Files\IrfanView\i_view32.exe c:\ocr\o.jpg /gray /convert=c:\ocr\o60.jpg


            Again thanks for replying.

            Comment


              #7
              Hi,
              I just found this thread and it helped me quite much.

              But I still have a question and I hope there is anybody who can help me.

              I'd like to convert raster images into grayscale in batch mode. It actually works with the code above however it only seems to convert into grayscale as long as the target format is JPG.
              I would like to have TIFF as target format. My batch runs but afterwards when I open the tif-file in gimp the mode is indexed.
              does the convertione to grayscale doesn't work for tiff-files?

              Comment


                #8
                Hi,
                i solved my problem with an workaround: I have to chang a import parameter when I import the images into the database

                Comment

                Working...
                X