Announcement

Collapse
No announcement yet.

Decrease color depth changes RGB values slightly

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

    Decrease color depth changes RGB values slightly

    Hello,

    I often create simple graphic images with MS Paint for web usage. These images contain only a few colors, for example 19. To reduce file size, I load that images finally in IV, let IV count the colors (Image -> Information -> Number of unique colors) and then I decrease the color depth to exactly that number of colors (using the 'Custom' option). IV should then create a palette which contains exactly all the colors - and only the colors - which the image contains. IV does this job quite well, but in the resulting image practically all the colors have slightly different RGB values. For example, a red color 255/0/0 is changed to 252/2/4. It's not a big problem, but why doesn't IV remain the RGB values exactly? There's no need to calculate "average colors" because I reduce to exactly the number of different colors which the image contains. Does the decreasing algorithm not work in full 24-bit color resolution?

    Greetings,
    Patrick

    #2
    If your purpose is to reduce the file size for web usage to get the best possible results, save in PNG format with PNGOUT. I doubt if any other method will give better results, but I'm always interested to learn.

    Post a couple of MS Paint images as 24-bit PNG, and see if anyone can reduce the filesize without losing the colour information.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Indeed, PNGout may convert the picture to a paleted color format if it contains less than 256 colors. Most graphics programs does color depth reduction automatically with little or no parameters to adjust. However, in Paint Shop Pro you can select between two different algorithms. "Optimized Octree" would suit you well.

      Comment

      Working...
      X