Fix for non-rgb images