added handling of 2-channel images (greyscale+alpha)
fixed compilation error with VS2013