added test cases, fixed problem with png/nochannel