Yeah, calls to lists or maps is an organized way of checking previously found colors, but extremely non-optimistic in terms of speed.
With the array, you only check once if a color has been met. With tlist/maps your checking EVERY single pixel whether a color has been added or not.
With an array, you can even count how many times a color was found, with no real loss in speed (talking 5-10%, maybe).
My method (derived from burnsides pixel ptr method of getting r,g,b values) could probobly still be optimized some. I would assume this is the idea that programs like paintshop pro & adobe use for counting colors.
With the array, you only check once if a color has been met. With tlist/maps your checking EVERY single pixel whether a color has been added or not.
With an array, you can even count how many times a color was found, with no real loss in speed (talking 5-10%, maybe).
My method (derived from burnsides pixel ptr method of getting r,g,b values) could probobly still be optimized some. I would assume this is the idea that programs like paintshop pro & adobe use for counting colors.