Added pixel format and size constraints to texture image loader.