Announcement

Collapse
No announcement yet.

Decrease Color Depth enhancement

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

    #16
    A possible solution could be to import a fixed palette. You can create a palette of 16 shades of gray. When the palette is imported into Irfanview, the colors in the picture will be replaced with the nearest colors in the palette. There is no dithering applied.

    The palette file format is a simple text file, so it can be easily edited.

    An example of such palette file:
    Code:
    JASC-PAL
    0100
    16
    0 0 0
    17 17 17
    34 34 34
    51 51 51
    68 68 68
    85 85 85
    102 102 102
    119 119 119
    136 136 136
    153 153 153
    170 170 170
    187 187 187
    204 204 204
    221 221 221
    238 238 238
    255 255 255
    Last edited by JendaLinda; 05.10.2020, 04:33 PM.
    My system: IrfanView 4.62 64bit, Windows 10 22H2, Intel Core i5-3570, 16GB RAM, NVidia GTX 1050Ti 4GB

    Comment


      #17
      Originally posted by JendaLinda View Post
      A possible solution could be to import a fixed palette. You can create a palette of 16 shades of gray. When the palette is imported into Irfanview, the colors in the picture will be replaced with the nearest colors in the palette. There is no dithering applied.

      The palette file format is a simple text file, so it can be easily edited.

      An example of such palette file:
      Code:
      JASC-PAL
      0100
      16
      0 0 0
      17 17 17
      34 34 34
      51 51 51
      68 68 68
      85 85 85
      102 102 102
      119 119 119
      136 136 136
      153 153 153
      170 170 170
      187 187 187
      204 204 204
      221 221 221
      238 238 238
      255 255 255
      Thank you for the tip !
      I tried it with 4 colours and it works as well.

      Comment


        #18
        Actually, loading a palette every time I decrease the number of colours is rather slow, especially because this action cannot be included in a batch file.
        Or did I miss this possibility in the list of batch actions?
        An option to set the darker colour to black and the lighter colour to white when decreasing colour depth would still be a far better option... as proposed 13 years ago...

        However, I found a "Replace color" function in the bach options (instead of F12) and yes, it does the job, with adequate tolerance value to convert the very light grey to true white. In this way, I can automate both decrease to 4 colours and quasi-white replacement by white.
        It is probably possible to apply it to quasi-black as well, but only one colour can be replaced at a time so two batch actions are required. This is not a big issue.

        Actually, the reason why very light grey is not nice is the way this is printed, not only using ink, but also giving the pages (music scores in my case) a dirty greyish look. So fixing the white colour is solving the most important problem.
        Last edited by RogerF; 05.12.2021, 01:23 PM.

        Comment

        Working...
        X