iOS 5 compatibility

Makes it compatible with iOS 5.0 and fixes error "CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 416 bytes/row.".