Announcement

Collapse
No announcement yet.

simple change color depth of the input image to BitsPerPixel and save file

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

    simple change color depth of the input image to BitsPerPixel and save file

    I wrote a batch file
    "C:\Program Files\IrfanView\i_view64.exe" "D:\A-IHT website\icons\tilesDB\tiles24\%1" /ini="D:" /advancedbatch
    the ini is processed
    and irfan is opened showing the result of the new color depth

    BUT how do I get it to write that image back out and close irfan in the batch file above????

    In other words I want to change the color depth of an image file and write the result automatically to another file!

    What is the secret majic??
    Last edited by farout1234; 23.12.2022, 03:29 PM.

    #2
    add:

    /convert=filename

    and possibly:
    /cmdexit
    see Help/Irfanview help/Command Line Options
    Last edited by IrfanUserGuyxyx; 23.12.2022, 05:57 PM.

    Comment


      #3
      thanks for reply

      I thought that may be it and already tried
      "C:\Program Files\IrfanView\i_view64.exe" "D:\A-IHT website\icons\tilesDB\tiles24\%1" /ini="D:" /advancedbatch /convert="D:\A-IHT website\icons\tilesDB\tiles8\%1" /cmdexit
      but the file saved was not changed???

      Comment


        #4
        this works
        "C:\Program Files\IrfanView\i_view64.exe" "D:\A-IHT website\icons\tilesDB\tiles24\%1" /ini="D:" /advancedbatch /convert="D:\A-IHT website\icons\tilesDB\tiles8\test.bmp"
        the bmp has 256 colors
        following that command with
        "C:\Program Files\IrfanView\i_view64.exe" "D:\A-IHT website\icons\tilesDB\tiles8\test.bmp" /convert="D:\A-IHT website\icons\tilesDB\tiles8\%1"
        the resulting jpg is still 16M colors
        %1 = 47174426.jpg

        Comment


          #5
          It works! Excellent work and thank you
          See my bug report
          the original jpg image and info is on the right, the image and info on left is after color reduction to 256bpp and saved as on disk Note the current colors info shows 16M which is wrong but the file size is smaller which looks correct. we used the irfan GUI 32 bit and 64 bit versions with same result Clipboard01.jpg

          Comment

          Working...
          X