How does UIImageJPEGRepresentation work?

4.4k views Asked by At

I have this line of code

UIImageJPEGRepresentation(profileImage, 0.8)

and I was wondering if it adjusts the height and width of the image or just the size by decreasing the quality?

1

There are 1 answers

0
wiredy On

It just decreases the quality.

func UIImageJPEGRepresentation(_ image: UIImage!,
                         _ compressionQuality: CGFloat) -> NSData!

Source: UIImageJPEGRepresentation