Jump to content

DelphiSpass

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. DelphiSpass

    Compute nearest color

    The screenshot looks interesting. Thanks for the links, will take some time to go trough it. Just for fun, I offline typed the code into Delphi, from the OKlab page, that you suggested, to convert from sRGB to linear and to OKlab. Will experiment with it this week, for interest. Can post it later, when I think it works.
  2. DelphiSpass

    Compute nearest color

    Thanks, I am using GR32. I am not yet so much into the color spaces, but I also read about better using other spaces for good results instead of sRGB. For my app its important to have high quality color reduction, based on visible similarity. Finally, I need both, color reduction with and without dithering. I am even thinking about, if for my app it could be little bit more important to care about the hue, instead of the other parameters, for a nearest decision. Or I would add settings, so the user can choose, and take which result he likes more. (was thinking even about using your ColorDistanceHue/Brightness/Sat.. and somehow to combine it in a way that the user can give it different weights in the decision, but thats maybe a luxury wish for the future at the moment). What I read is that converting to Lab (cielab), or HLC = LCh = LCH, or HSV makes sense, and Delta E from CIE2000 is good. Now, I just read from you about the OKlab, this looks quite good! Maybe I should go this way and convert it to OKlab. With the GIF, I think, it will not the right way for me. In fact at the end its even more complicated, a picture with full colors, will need to be mapped to a small color palette (approx 400colors), but even more the user can choose that the result will use only a max amount of colors from that, e.g. 60 colors. 🙂 🙂 To be honestly, I also thinking since a while, what would be the criteria, which colors to throw away 🙂 I think the solution for this detail will be, to first map to the 400 colors, which can result in a picture, which can then have even less then the full palette, lets say e.g. 300 colors, and then sort the Distances, and then to remove colors beginnging with the smallest distance. Practical experiments will show... But, one step after another... first I am happy, if the mapping with dithering principally works fine, and allows some adjustments. I you have any, even not yet satisfying code, I would for sure like to try it.
  3. My apps are not signed. A self written installer "suddenly" made problems at customers, Defender blocked it. Reason was that I added more information in the Project Options->Version page. I removed allmost information from it again, recompiled, and then the customer was able to run the installer again without problems. Since then, I let these fields empty, see green marked in the attached picture. Hope it helps. However, signing is for sure a good idea.
  4. DelphiSpass

    Compute nearest color

    Hello Anders, thank you for sharing the code. Something is missing. The function ColorScale() I can not find. While, the function EMMS, it is the one which I found in JclGraphUtils? Besides, you mentioned Dithering, if I may ask, do you have code for dithering, I would need that for a project, where I want to dither a picture to a reduced palette with only a few colors, where your ColorDistanceRGBA would for sure be also an important part of it.
×