Author Topic: Magic Wand  (Read 137 times)

guga

  • Member
  • *****
  • Posts: 1027
  • Assembly is a state of art.
    • RosAsm
Magic Wand
« on: March 27, 2019, 03:56:46 AM »
Hi guys


how to create a magic wand for selecting a certain range of colors like the ones existent in PaintShopPro ?
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

jj2007

  • Member
  • *****
  • Posts: 9278
  • Assembler is fun ;-)
    • MasmBasic
Re: Magic Wand
« Reply #1 on: March 27, 2019, 04:32:10 AM »
- take the rgb val of the starting point as the reference
- define R+-X, G+-X, B+-X
- go left & right until you reach a point that is not inside the tolerance
etc