WebP format picture loading method and device, computer equipment and medium
By decoding and redrawing the RGBA data of WebP format images and loading them according to user configuration, the loading efficiency and stability of WebP format images on iOS is solved, and the effect of reducing memory usage is achieved.
Patent Information
- Application Number
- CN202411998732.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
AI Technical Summary
WebP format images fail to achieve the effect of improving loading efficiency when loading on iOS, which instead leads to abnormal operation stability of the application.
By obtaining the initial image data of the WebP format image, decode it into RGBA data using a decoding library that supports WebP format, and redrawing it through the specified graphic identification interface to obtain the image identification object. Load the image identification object according to the image processing configuration specified by the user, reducing memory usage and improving the operation stability of the application.
Reduces the memory usage of WebP format images when loading on iOS applications, and improves the operation stability of the application.
Smart Images

Figure CN119941487A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, computer equipment and medium for loading images in WebP format. Background Art
[0002] With the popularization of smart terminals and the development of Internet technology, the demand for image resources in the development process of smart terminal applications is increasing. In order to improve the loading speed of image resources on smart terminals, developers have begun to replace PNG (Portable Network Graphics) format images with WebP (Web Picture) format images with the iteration of versions to further compress the image size to improve loading efficiency.
[0003] However, in actual applications, WebP format images failed to achieve the effect of improving loading efficiency when loaded on iOS (iPhone Operating System), and instead caused abnormal running stability of iOS applications. Therefore, the existing solution of replacing PNG format images with WebP format images failed to effectively meet the needs of iOS, resulting in poor running performance of WebP format images in iOS applications. Summary of the invention
[0004] In response to the above-mentioned deficiencies or shortcomings, the present application provides a method, apparatus, computer equipment and medium for loading WebP format images, which can reduce the memory usage when loading WebP format images on iOS applications and improve the operating stability of the application.
[0005] According to a first aspect, the present application provides a method for loading a WebP format image, which is applied to an iOS terminal and includes:
[0006] Get the initial image data of the WebP format image to be loaded.
[0007] Use a decoding library that supports the WebP format to decode the initial image data of the WebP format image into RGBA data.
[0008] Redraw the RGBA data through the specified graphic identification interface to obtain the picture identification object.
[0009] The image identification object is loaded according to the image processing configuration specified by the user to obtain the target image that has been loaded.
[0010] In some embodiments, the initial image data includes raw byte stream data of a picture in Webp format stored in a designated storage medium inside the iOS terminal.
[0011] In some embodiments, the decoding library supporting the WebP format is an open source image decoding library libwebp library.
[0012] In some embodiments, the graphic identification interface is a set of application programming interfaces UIGraphics for performing graphics and image processing in the system of the iOS terminal. The step of redrawing the RGBA data is performed by UIGraphics in the core graphics drawing framework Core Graphics for graphics and image processing in the system of the iOS terminal, and the picture identification object is a CGImageRef object or a UIImage object in Core Graphics.
[0013] In some embodiments, the RGBA data is redrawn to obtain a picture identification object, including: using the RGBA data to create a CGDataProviderRef object, the CGDataProviderRef object is used to provide pixel data of the WebP format picture to Core Graphics.
[0014] Use CGDataProviderRef to create a CGImageRef object based on the spatial information of the WebP format image, which includes the width, height, and bit depth of the WebP format image.
[0015] Using the graphics context CGContext of Core Graphics, redraw based on the CGImageRef object to obtain a new CGImageRef object. The new CGImageRef object serves as the original data required by the iOS terminal system for image processing and rendering.
[0016] In some embodiments, after obtaining the new CGImageRef object, the method further includes: converting the new CGImageRef object into a UIImage object.
[0017] In some embodiments, the RGBA data is formatted data including red level information, green level information, blue level information, and transparency information of a WebP formatted image, and the image processing configuration includes a user-defined quality parameter and a scaling ratio. Loading an image into an image identification object according to the user-specified image processing configuration includes:
[0018] According to the image processing configuration specified by the user, the display format of one or more of the red level information, the green level information and the blue level information of the image identification object is adjusted to load the image.
[0019] The quality parameter is used to determine the clarity of the target image after loading, and the scaling ratio is used to determine the size of the target image after loading.
[0020] According to a second aspect, the present application provides a WebP format image loading device, which is applied to an iOS terminal; the WebP format image loading device includes:
[0021] The image data acquisition module is used to obtain the initial image data of the WebP format image to be loaded.
[0022] The image data decoding module is used to decode the initial image data of a WebP format image into RGBA data using a decoding library that supports the WebP format.
[0023] The image redrawing execution module is used to redraw the RGBA data through the specified graphic identification interface to obtain a picture identification object.
[0024] The image loading execution module is used to load the image identification object according to the image processing configuration specified by the user to obtain the target image that has been loaded.
[0025] According to a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the WebP format image loading methods in the above-mentioned embodiments.
[0026] According to a fourth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which, when executed, implements the steps of any one of the WebP format image loading methods in the above-mentioned embodiments.
[0027] The WebP format image loading method of the above embodiment can be applied to iOS terminals, and the iOS terminal can first obtain and read the initial image data of the WebP format image to be loaded from its own designated storage medium. Then, use a decoding library that supports the WebP format to decode the initial image data of the WebP format image into RGBA data. Next, redraw the RGBA data through the specified graphic identification interface to obtain a picture identification object. Finally, load the picture identification object according to the picture processing configuration specified by the user to obtain the target picture that has been loaded. Since the iOS terminal does not directly use the pixel data after decoding the WebP format image to load the picture, but converts the decoded RGBA data into a new picture object, and then uses the picture object to load the picture, it can reduce the memory usage of the WebP format image when loading on the iOS application, thereby improving the running stability of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of an application environment of a WebP format image loading method in one or more embodiments of the present application;
[0029] Figure 2 A flowchart of a method for loading a WebP format image in one or more embodiments of the present application;
[0030] Figure 3 A flow chart of a method for redrawing RGBA data in one or more embodiments of the present application;
[0031] Figure 4 A structural diagram of a WebP format image loading device in one or more embodiments of the present application;
[0032] Figure 5 A schematic diagram of the internal structure of a computer device in one or more embodiments of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] The present application provides a WebP format image loading method according to the first aspect, which can be applied to Figure 1 The iOS terminal (102) shown in the figure can obtain the WebP format image to be loaded from the external device (104) or the storage medium specified by itself, and then start the WebP format image loading process described in this application. Finally, the iOS terminal (102) completes the WebP format image loading task. Among them, the external device (104) can be a remote server.
[0035] In some exemplary embodiments of the present application, Figure 2 As shown, this method is applied to Figure 1 The following steps are used as an example to illustrate the iOS terminal:
[0036] Step 201: Obtain initial image data of the WebP format image to be loaded.
[0037] Among them, the iOS terminal is an iOS mobile device or iOS fixed device loaded with iOS system. The iOS mobile device includes but is not limited to smart phones, wearable devices and vehicle-mounted devices, while the iOS fixed device includes but is not limited to computers, servers and fixed devices in natural environments.
[0038] In some embodiments, the initial image data includes raw byte stream data of a Webp format image stored in a designated storage medium inside an iOS terminal. Among them, the raw byte stream data refers to image information that has not yet been decoded, and the iOS terminal can obtain pixel data, transparency information, color space information, and animation information of the WebP format image by decoding the raw byte stream data. The designated storage medium is a storage location in the iOS terminal that is different from the flash memory (FlashStorage), such as a sandbox directory, a Documents directory, a Library directory, a photo library, or an application-specific file system. In addition, the raw byte stream data is a data sequence of a WebP image file in a binary form in the system of the iOS terminal. Since WebP files occupy less memory than files in other formats (such as PNG), the iOS terminal can load from the storage medium into the flash memory faster, and complete the network download of Webp format images faster, thereby improving the response speed and user experience of the iOS terminal application.
[0039] Step 202: Use a decoding library that supports the WebP format to decode the initial image data of the WebP format picture into RGBA data.
[0040] Among them, the decoding library supporting the WebP format is the decoding library that the developer decides to use according to the system type of the iOS terminal. For example, the decoding library can be the open source image decoding library libwebp library, the Java ImageIO extension library or Whale, which is a VP8L (WebP lossless) bitstream decoder.
[0041] Specifically, the iOS terminal can use one of the libwebp library, the Java ImageIO extension library, or Whale to decode the initial image data into RGBA data. For example, the iOS terminal reads and writes WebP format images through the ImageIOAPI of the Java application and parses to obtain RGBA data; or the iOS terminal can also parse the VP8L bit stream of the initial image data to obtain RGBA data through Whale written in C (or C++) and Zig language.
[0042] For example, since iOS terminals generally support Objective-C and Swift as the development languages of their native applications, iOS terminals can use the corresponding J2ObjC conversion tool to convert Java code into Objective-C code, so that the Java ImageIO extension library can run on the system of the iOS terminal; or, use the corresponding third-party application to convert C (or C++) language and Zig language into Objective-C code, so that Whale can run on the system of the iOS terminal.
[0043] Step 203: redraw the RGBA data through the specified graphic identification interface to obtain a picture identification object.
[0044] Among them, in the system of iOS terminal, the graphic identification interface is the interface of the drawing framework for graphics and image processing in the system of iOS terminal, and the drawing framework includes but is not limited to Core Graphics, UIKit and Core Image in the system of iOS terminal. Among them, the image processing functions of Core Graphics include filters, image conversion and color adjustment; UIKit is suitable for executing the drawing and processing of 2D WebP format images; Core Image generally needs to use the GPU (Graphics Processing Unit) of iOS terminal to redraw RGBA data, and Core Image is applicable to the Apple filter framework of WebP format images.
[0045] In some embodiments, the graphic identification interface is a set of application programming interfaces UIGraphics for performing graphics and image processing in the system of the iOS terminal.
[0046] Specifically, iOS terminals can redraw RGBA data in one of the three drawing frameworks, Core Graphics, UIKit or Core Image, through UIGraphics. In this way, since UIGraphics provides a unified interface to access different drawing frameworks, switching between drawing frameworks with different functions is achieved, improving code flexibility and the efficiency of redrawing RGBA data.
[0047] In some embodiments, the decoding library supporting the WebP format is an open source image decoding library libwebp library. The step of redrawing the RGBA data is performed by UIGraphics in Core Graphics, a core graphics drawing framework for graphics and image processing in the system of the iOS terminal, and the image identification object is a CGImageRef object or a UIImage object in Core Graphics.
[0048] Among them, because the libwebp library provides excellent compression efficiency, iOS terminals can significantly reduce the file size of the RGBA data obtained after decoding while maintaining the quality of Webp format images. Therefore, in this way, WebP format images can be decoded into RGBA data with significantly reduced file size, thereby reducing the memory usage of WebP format images when loaded on iOS applications. In addition, the libwebp library also supports transparent (Alpha) channels, which improves the visual richness of the loaded target images.
[0049] In some embodiments, the RGBA data is redrawn to obtain a picture identification object, such as Figure 3 As shown, the following steps are included:
[0050] Step 301: Use RGBA data to create a CGDataProviderRef object, which is used to provide pixel data of WebP format images to Core Graphics.
[0051] The pixel data includes all pixel information of the WebP format image. For example, for lossy compressed WebP format images, their pixel data can be encoded using VP8; and for lossless compressed WebP format images, their pixel data is encoded using VP8L. VP8 is an open source video encoding format launched by Google and is commonly used in WebM video containers; and VP8L is a codec used for lossless compression in WebP format images.
[0052] Step 302: Using CGDataProviderRef, create a CGImageRef object based on the spatial information of the WebP format image, where the spatial information includes the width, height, and bit depth of the WebP format image.
[0053] Among them, the CGImageRef object is used to represent the decoded image data.
[0054] Step 303: Redraw based on the CGImageRef object using the graphics context CGContext of Core Graphics to obtain a new CGImageRef object, which serves as the original data required by the iOS terminal system for image processing and rendering.
[0055] Among them, CGContext is created by the iOS terminal and used as the target for redrawing RGBA data. Then the iOS terminal can draw the original CGImageRef object into the newly created CGContext for redrawing. In this way, since the iOS terminal uses CGContextDrawImage to redraw RGBA data instead of the traditional way of directly operating pixel data, and the use of CGContextDrawImage will start the graphics hardware acceleration function of the iOS terminal, it will reduce the memory usage of WebP format images when loading on the iOS application and improve the drawing performance.
[0056] In some embodiments, after obtaining the new CGImageRef object, the method further includes: converting the new CGImageRef object into a UIImage object, which is used for display and further processing in the application of the iOS terminal. Among them, since the UIImage object provides an advanced interface, loading, displaying and processing images in the iOS terminal application becomes simpler and more direct; and UIImage is part of the UIKit framework, which is naturally integrated with other UI (User Interface) components (such as UIImageView) of the iOS terminal application, making the display and processing of images more convenient, thereby improving development efficiency. Therefore, in this way, it is possible to simplify the image processing process, improve development efficiency, and enhance the stability and extensibility of iOS terminal applications.
[0057] Step 204: Load the image identification object according to the image processing configuration specified by the user to obtain a loaded target image.
[0058] Among them, the image processing configuration is customized by the user according to the needs, and is used to determine the configuration information of the clarity, memory usage, color, and size of the target image that is loaded. Since the iOS terminal does not directly use the pixel data after decoding the WebP format image to load the image, it converts the decoded RGBA data into a new image object, and then uses the image object to load the image. In this way, the memory usage of the WebP format image when loading on the iOS application can be reduced, and the running stability of the application can be improved.
[0059] In some embodiments, the RGBA data is formatted data including red level information, green level information, blue level information, and transparency information of a WebP formatted image, and the image processing configuration includes a user-defined quality parameter and a scaling ratio. Loading an image into an image identification object according to the user-specified image processing configuration includes:
[0060] According to the image processing configuration specified by the user, the display format of one or more of the red level information, green level information and blue level information of the image identification object is adjusted to load the image. The quality parameter is used to determine the clarity of the loaded target image, and the scaling ratio is used to determine the size of the loaded target image.
[0061] Specifically, when loading images, iOS terminals will not change the color of WebP format images, that is, they will not change the specific values of the red level information, green level information, and blue level information of the RGBA data; and they will not adjust the transparency information of the RGBA data. However, iOS terminals can adjust the arrangement density of the red level information, green level information, and blue level information of the RGBA data according to the scaling ratio to change the size of the target image; or, iOS terminals can adjust the pixel size of the red level information, green level information, and blue level information of the RGBA data according to the quality parameters to change the clarity of the target image.
[0062] It should be noted that, with respect to the various steps included in the WebP format image loading method provided in any of the above embodiments, unless otherwise clearly stated in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of these steps may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0063] In another embodiment of the present application, the WebP format image loading method can be applied to Figure 1The iOS terminal (102) shown, and in the WebP format image loading method in this embodiment, the iOS terminal can first obtain the original byte stream data of the WebP format image from its own specified storage medium. Then, the initial image data of the WebP format image is decoded into RGBA data using the libwebp library. Then, the RGBA data is redrawn through UIGraphics to obtain the UIImage object in CoreGraphics. Finally, the image identification object is loaded according to the image processing configuration specified by the user to obtain the target image that has been loaded. Among them, the image processing configuration is used to determine the clarity and size of the target image that has been loaded. In this embodiment, since the iOS terminal actually uses CGContextDrawImage to replace the traditional way of directly operating pixel data to redraw the RGBA data, and using CGContextDrawImage will start the graphics hardware acceleration function of the iOS terminal, thereby reducing the memory usage of the WebP format image when loading on the application on the iOS side and improving the drawing performance. Therefore, in this way, the memory usage of the WebP format image when loading on the application on the iOS side can be reduced, and the running stability of the application can be improved.
[0064] According to the second aspect, the present application provides a WebP format image loading device, which is applied to an iOS terminal; Figure 4 As shown, the WebP format image loading device includes:
[0065] The image data acquisition module 110 is used to acquire the initial image data of the WebP format image to be loaded.
[0066] The image data decoding module 120 is used to decode the initial image data of the WebP format picture into RGBA data using a decoding library that supports the WebP format.
[0067] The image redrawing execution module 130 is used to redraw the RGBA data through a specified graphic identification interface to obtain a picture identification object.
[0068] The image loading execution module 140 is used to load the image identification object according to the image processing configuration specified by the user to obtain the loaded target image.
[0069] In some embodiments, the initial image data of the WebP format image loading device includes original byte stream data of the WebP format image stored in a designated storage medium inside the iOS terminal.
[0070] In some embodiments, the decoding library supporting the WebP format of the WebP format image loading device is an open source image decoding library libwebp library.
[0071] In some embodiments, the graphic identification interface of the WebP format image loading device is a set of application programming interfaces UIGraphics for performing graphics and image processing in the system of the iOS terminal. The step of redrawing the RGBA data is performed by UIGraphics in the core graphics drawing framework CoreGraphics for graphics and image processing in the system of the iOS terminal, and the image identification object is a CGImageRef object or a UIImage object in Core Graphics.
[0072] In some embodiments, the image redrawing execution module 130 is further used to: create a CGDataProviderRef object using RGBA data, and the CGDataProviderRef object is used to provide pixel data of WebP format images to Core Graphics. Using CGDataProviderRef, create a CGImageRef object based on the spatial information of the WebP format image, and the spatial information includes the width, height, and bit depth of the WebP format image. Using the graphics context CGContext of Core Graphics, redraw based on the CGImageRef object to obtain a new CGImageRef object, which is used as the original data required by the system of the iOS terminal for image processing and rendering.
[0073] In some embodiments, after obtaining the new CGImageRef object, the WebP format image loading device is further used to: convert the new CGImageRef object into a UIImage object, which is used for display and further processing in an application of an iOS terminal.
[0074] In some embodiments, the RGBA data is formatted data including red level information, green level information, blue level information, and transparency information of a WebP formatted image, and the image processing configuration includes a user-defined quality parameter and a scaling ratio. The image loading execution module 140 is also used to: adjust the format of one or more of the red level information, green level information, and blue level information of the image identification object according to the user-specified image processing configuration to load the image. Among them, the quality parameter is used to determine the clarity of the target image that has been loaded, and the scaling ratio is used to determine the size of the target image that has been loaded.
[0075] For specific limitations applicable to the WebP format image loading device, please refer to the limitations applicable to the WebP format image loading method above, which will not be repeated here. The various modules in the above-mentioned device applicable to WebP format image loading can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0076] According to a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the WebP format image loading methods in the above-mentioned embodiments.
[0077] According to a fourth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which, when executed, implements the steps of any one of the WebP format image loading methods in the above-mentioned embodiments.
[0078] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the loading of WebP format images. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements any of the above-mentioned WebP format image loading methods.
[0079] Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (RamCUs), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0080] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0081] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
[0082] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for loading a WebP format image, characterized in that: Applied to iOS terminals; the method comprises: Get the initial image data of the WebP format image to be loaded; Decoding the initial image data of the WebP format picture into RGBA data using a decoding library supporting the WebP format; Redraw the RGBA data through a specified graphic identification interface to obtain a picture identification object; The image identification object is loaded with an image according to the image processing configuration specified by the user to obtain a target image that has been loaded.
2. The method according to claim 1, characterized in that The initial image data includes original byte stream data of the Webp format picture stored in a designated storage medium inside the iOS terminal.
3. The method according to claim 2, characterized in that The decoding library supporting the WebP format is an open source image decoding library libwebp library.
4. The method according to claim 3, characterized in that The graphic identification interface is a set of application programming interfaces UIGraphics for performing graphics and image processing in the system of the iOS terminal; The step of redrawing the RGBA data is performed in Core Graphics, a core graphics drawing framework for graphics and image processing in the system of the iOS terminal, through the UIGraphics, and the image identification object is a CGImageRef object or a UIImage object in the Core Graphics.
5. The method according to claim 4, characterized in that The step of redrawing the RGBA data to obtain a picture identification object includes: Using the RGBA data, create a CGDataProviderRef object, where the CGDataProviderRef object is used to provide pixel data of the WebP format image to the Core Graphics; Using CGDataProviderRef, create a CGImageRef object based on the spatial information of the WebP format image, where the spatial information includes the width, height, and bit depth of the WebP format image; The graphics context CGContext of the Core Graphics is used to redraw based on the CGImageRef object to obtain a new CGImageRef object, and the new CGImageRef object serves as the original data required by the system of the iOS terminal for image processing and rendering.
6. The method according to claim 5, characterized in that After obtaining the new CGImageRef object, the method further includes: Convert the new CGImageRef object to a UIImage object.
7. The method according to claim 1, characterized in that The RGBA data is format data including red level information, green level information, blue level information and transparency information of the WebP format image, and the image processing configuration includes a user-defined quality parameter and a scaling ratio; The loading of the image into the image identification object according to the image processing configuration specified by the user includes: According to the image processing configuration specified by the user, adjusting the display format of one or more of the red level information, the green level information and the blue level information of the image identification object to load the image; The quality parameter is used to determine the clarity of the target image that has been loaded, and the scaling ratio is used to determine the size of the target image that has been loaded.
8. A WebP format image loading device, characterized in that: Applicable to iOS terminals; The WebP format image loading device comprises: An image data acquisition module, used to acquire the initial image data of the WebP format image to be loaded; An image data decoding module, used to decode the initial image data of the WebP format picture into RGBA data using a decoding library supporting the WebP format; An image redrawing execution module, used to redraw the RGBA data through a specified graphic identification interface to obtain a picture identification object; The image loading execution module is used to load the image on the image identification object according to the image processing configuration specified by the user to obtain a target image that has been loaded.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.