Added implementation.
Update of code.
Code clean up.
Added handling of multi-channel images.
Fixed a bug.
Updated code.
Remove duplicate code.
Bugfix.
Bugfix.
Added new function.
Removed duplicate code.