|
Check to see if a bitmap is a solid color |
Ceagon Xylas
Member #5,495
February 2005
|
Like the topic title indicates, I'm asking what is the fastest way to check if a bitmap's a solid color? |
miran
Member #2,407
June 2002
|
EDIT: nm, I misunderstood the question. The real answer: two for loops. -- |
Ceagon Xylas
Member #5,495
February 2005
|
And getpixel I assume? I guess it's not too slow for only loading bitmap routines. |
miran
Member #2,407
June 2002
|
You can also use direct access. Or one of the colour depth specific access functions that don't do bounds checking.
-- |
Ceagon Xylas
Member #5,495
February 2005
|
Okee doke. Thanks |
GullRaDriel
Member #3,861
September 2003
|
Perhaps this from exfire.c, with some little change you can adjust it to fit your need:
This article from Gamedev about digital processing can help too for implementing gaussian blur. "Code is like shit - it only smells if it is not yours" |
Onewing
Member #6,152
August 2005
|
Funny thing about this is the worst case scenario is when the bitmap IS the given solid color. ------------ |
Rampage
Member #3,035
December 2002
|
Ceagon Xylas
Member #5,495
February 2005
|
|
|