[z2354] backport GetGrayLevel close Pull Request #25 thanks @Evildead666 for pointing

Signed-off-by: Salja <salja2012@hotmail.de>