changed pixel format check to ignore alpha channel