grayscale matrix to Image bug resolved.

Resending the pull request (#436)
Resolved bug (#435)