A few months ago, we added the WEBP format to our project, and during this period we encountered some problems, which is one of the small records.
Official: Https://code.google.com/p/webp/downloads/list
For iOS, there's a webp.framework on the official website, but unfortunately, this framework only supports 32-bit, and it doesn't work for iOS that already has 64-bit support, so we need to do some processing.
First we download its source code, because iOS support C and C + +, so you can import the source code into the project for processing, but the actual operation found that the compilation failed, after the investigation found that there are two main reasons:
1. The project uses WEBP's Sdwebimage library to define part of the C function, there are definitions in the source code, there is a duplicate definition of the method, you need to delete one of the repeating function of the definition
2. There are some parts of the source code compilation, can not be compiled under 64 bits, so I closed the use of this part of the assembly code, all by its internal C language implementation, there may be some performance loss, but does not affect the use.
After the above two steps of processing, the source code can be successfully compiled in the project through.
The Sdwebimage library can then be used to handle the WEBP package accordingly.
Writing is relatively simple, is a summary of the record it.
64-bit support processing in WEBP format in iOS development