Improve check for valid channel mask.
Improve check for valid channel mask.

Priyank57/securimage,spandansingh/securimage,dapphp/securimage,Priyank57/securimage,ericariyanto/securimage,spandansingh/securimage,dapphp/securimage,ericariyanto/securimage,primrix/securimage,dapphp/securimage