I have an Image which getting grom user Gallery and I convert this image to Byte Array like
let imageOther = myImage
let dataOther = imageOther.jpegData(compressionQuality: 1)
This dataOther
type is Data
and about 700k KB. I know If I change jpegData(compressionQuality: 1)
this , I can reduce this size but If I change this , MyImage quality is also down. So I want to compress this byteArray to reduce size and send to server with no losing quality. I searched some questions and answers in SO but can't find anything.
So , How can I compress byte Array for Image with no losing quality of image?