I have a very specific requirement. I have a service that needs to upload photos in their exact imageblobs. The EXIF information can be disregarded, but the image data itself MUST remain exactly as is. This service has to work cross-platforms as well.
So far, I have tested PC, Mac, with various browsers, as well as various Android phones, and they all worked as expected. When a photo is transferred from one platform to another, via emails, flash drives, various cloud services (One Drive, Google Drive, Dropbox), no problems at all. The photos stay in their exact format, with the same EXIF info having the exact same size, down to the final byte.
But problems arise when I am dealing with Apple products and services. First, whenever a photo is saved into an iPhone, the iPhone seems to add some additional EXIF data to the image, making the image size slightly bigger. But as I said above, my requirement can disregard the EXIF info, so I stripped them when they are uploaded to server side. However, the iPhone seems to be doing more than during the uploaded to back-end. It seems to be re-compressing the images before they are sent.
When I upload an image in my iPhone, using Safari, it arrives at server side with a drastic change in file size. I have tested this multiple times and with different images. In some cases, the size is reduced, and in some cases the size is increased. This does not happen when I upload them using a PC or Android phone. The application itself is a website, so it is written using HTML and JavaScript.
Below is a sample of the results:
Image 1 - original image size: 317,185 bytes
(without stripping EXIF data)
Uploading to server using a PC or Android Phone: 317,185 bytes
Uploading to server using iPhone: 368,698 bytes
(stripping EXIF data)
Uploading to server using a PC or Android Phone: 296,412 bytes
Uploading to server using iPhone: 356,680 bytes
Image 2 - original image size: 3,630 bytes
(without stripping EXIF data)
Uploading to server using a PC or Android Phone: 3,630 bytes
Uploading to server using iPhone: 2,752 bytes
(stripping EXIF data)
Uploading to server using a PC or Android Phone: 2,795 bytes
Uploading to server using iPhone: 2,144 bytes
The only conclusion I can draw from the above, is that the iPhone seems to be re-compressing the image before it is sent out. Why does it do this, and how do I stop it?
Surely, if it was not an image, it would not mangle with it? Such as an .docx or .php?
This issue has been resolved with the iOS update 9.0.3. Apparently, Apple themselves knew of this bug and fixed it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With