Updated image initialization to support iOS 4.