I'm not sure it implied racism, just that the woman cheated on him and he obviously found out because the baby came out black. No other way for a picture to tell you she cheated on him. Although you would assume by now he'd be used to the idea and wouldn't punch her before a family photo. Maybe at the hospital would make more sense? The fact he's there, posing in a family picture should show you that he probably cares for the baby even though it is black, therefor negating implied racism.
That being said, it's not that funny really, maybe to 12 year olds it is.