Announcement

Collapse
No announcement yet.

Decrease color depth using palette

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

    Requested Decrease color depth using palette

    Hello,

    I frequently work with images with only a few specific colors (like the colors from the standard VGA color palette). The source images are 256 color, and I do a batch conversion using 'decrease color depth' to 16.

    Problem is that the colors that Irfanview chooses are not allways the same, and white pixels are no longer pure white but something like 252-252-252.

    I would like a feature in 'decrease color depth' that allows you to select the color palette to use.


    Note : when you just do 'import palette' of a 16 color palette, the colors are decreased to 16 colors, but the pixels in the image are not remapped to the new palette. This means that if 'red' is index 10 in the old palette, and in the new palette index 10 is 'green', then all red pixels will become green.

    This is the intended behaviour for 'import palette' of course. Maybe there could be an option 'remap pixels to closest color' in 'import palette' to get the functionality I need.

    Best regards,
    Marc

    #2
    Unfortunately the Batch conversion dialog doesn't have an option to load some common .PAL file when decreasing color.
    While there is already a command line of IrfanView to do this : /import_pal=palfile.
    white pixels are no longer pure white but something like 252-252-252
    You ask for 'closest color', but this is probably the reason for this behaviour. If some pixels are 248-248-248 and some are white, and the number of colors has to be reduced, there you go.
    This is due to the algoritm of color decreasing (a guess I must say). It searches for averages.
    Also when converting to 256 color I would prefer the option to at least keep e.g. the number 0 real black and nr 255 real white.
    But as long as the palettes of the 256 color version images are not identical, I'm afraid these things will happen if going to 16.
    I endure the same problem when reducing grayscale document scans to 4 colors. Loosing the white background it had.
    In the meantime I just correct this manually afterwards.
    0.6180339887
    Rest In Peace, Sam!

    Comment

    Working...
    X