hw-1

UIGraphicsBeginImageContextWithOptions – returned Image has a unwanted border

UIGraphicsBeginImageContextWithOptions – returned Image has a unwanted border

1
2
func UIGraphicsBeginImageContextWithOptions(_ size: CGSize, _ opaque: Bool, _ scale: CGFloat).
A Boolean flag indicating whether the bitmap is opaque. If you know the bitmap is fully opaque, specify YES to ignore the alpha channel and optimize the bitmap’s storage. Specifying NO means that the bitmap must include an alpha channel to handle any partially transparent pixels.