added support for multichannel images