I want to upload an image up to 8 mb. so for testing I have added image in my photo gallery of size 4.2 mb (dimension : 3264 X 2443). But when I am picking that image for uploading, I have checked size of image. But it returning 9840076 bytes i.e. 9.3842 mb which is 4.2 mb in actual. So image of size 4.2 mb is not able to upload.

I have used below method to calculate size of image, and this is returning 9840076 bytes.

```
[UIImageJPEGRepresentation(imageRerurnedFromPhotoGallery , 1.0) length];

```

Am I doing something wrong in calculating size of image?
Please suggest me the proper way.
Thanks in advance!