64-bit support processing in WEBP format in iOS development

Source: Internet
Author: User
Tags webp

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.