This article mainly records the process of a bug from discovery, location to delayed resolution. The pitfalls that have been stepped on are added at the end of the article
Recently, when working on the "send original image" function, I encountered a bug: when sending the original image on Android, Windows, or Mac clients, and receiving and saving it on iOS clients, the physical size of the original image remained unchanged, the storage space became smaller, and the corresponding Exif information such as location was lost. At the same time, there was no problem sending the original image between iOS clients. To address this issue, I conducted the following test investigations and now record them:
1. First, let me introduce the process of sending an original image:
2. The problem is located in the last step, saving the picture:
Verification test: Download the pictures generated by the Android end (including photos "jpg" and screenshots "png") from the browser to the computer, the size remains unchanged, drag the picture file to the project, execute the method to save the picture, and the size also changes. Supplementary test: The Android client takes a picture (size is 5M), sends it to the iOS client (download size is 5M), saves it (size is 3M), then sends the saved picture to the Android client (save size is 3M), and the Android client sends it to the iOS client (save size is 3M). Conclusion: The compression is only performed once After saving the image, the Exif information of the image is lost, but the size of the Exif information is much smaller than the size of the file loss. The physical size of the image has not changed. 3. Current status of this function of competing products:
IV. Analysis based on the current situation
5. Add some useful information 1. About the new ".heic" format images added in iOS11 What is a ".heic" format image? Previously called "live" pictures, you can turn on this mode by clicking the button in the red box in the picture below. After taking a photo, a clip of about two seconds before and after the photo is captured. Unlike "Gif" pictures, this format also includes sound (currently only)
What kind of mobile phone can take pictures in ".heic" format? Only when using iOS 11 and the CPU is A10 or above (*** also requires iPhone 7), in other cases the pictures taken are ordinary "live" pictures, that is, they will be automatically converted to ".jpg/.jpeg" format when the format needs to be converted. How to determine whether a picture is in ".heic" format? SDWebImage-NSData+ImageContentType.m has been updated. When I first encountered this problem, I raised an issue and asked me to provide the corresponding URL.
How should we deal with ".heic" format pictures?
|
<<: After getting the iPhone X, be sure to try these new features that others don’t have
>>: Teach you how to install the Home button on iPhone X in a few easy steps
CES has never been a showcase for new smartphones...
With the increasing intelligence of search delive...
Produced by: Science Popularization China Author:...
Find inner peace in 1 minute with the sound of th...
The "Announcement on the Handling of Inducem...
Source: Dr. Curious This article has been authori...
1. If you want to find real users, pay for the ap...
With the listing of Internet financial platforms ...
Although this is not the first time we have seen ...
There are several common questions about blood pr...
[[220766]] If we want to create better Android ap...
[[313780]] On February 3, on the first day of wor...
Nickname: Ice Ribbon Venue name: National Speed ...
Why are my ads always performing poorly? I think ...
As a way of life for people to cultivate their ch...