fix for completly white or black image