iOS, Swift, Image Processing.
This method creates an area with the given size, enable/ disable the opacity according to the opaque boolean value and sets the given scale factor for the image. size — CGRect value to specify the size of the canvas. opaque — Boolean value to specify whether the output will be transparent or not.