Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Color Extraction Developer Insights
#4
A better way may be to just get values directly.

$Checking:off
Alpha = _MEMGET(m, o +3, _unsigned _byte)
Red = _MEMGET(m, o + 2, unsigned byte)
Green...   o + 1
Blue ... o
$Checking:on

No shifting, no calculations.  Just a direct value read.

(When then goes to the speed question: is it faster to just read 4 values directly, or to only read one and then math it?)

I'd *think* a simple direct read would be faster, but with cacheing and all nowadays...  I'd swear to nothing!  Wink
Reply


Messages In This Thread
RE: Color Extraction Developer Insights - by SMcNeill - 01-28-2024, 07:16 AM



Users browsing this thread: 1 Guest(s)