Thumbnail display method and related apparatus

By generating thumbnails by carrying the original image parameters in the texture file, the problem of poor thumbnail quality in the prior art is solved, and a display effect closer to the original image is achieved while saving resources.

WO2026103628A1PCT designated stage Publication Date: 2026-05-21HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-11-07
Publication Date
2026-05-21

AI Technical Summary

Technical Problem

In existing technologies, thumbnails cannot effectively reflect the various effects of the original image, resulting in a poor user experience.

Method used

By acquiring the texture data of the original image, including the compressed texture data and data indicating the parameters of the original image, a texture file is generated, and these parameters are carried when displaying the thumbnail so that the GPU can decode it without CPU decompression, thus improving the display effect.

Benefits of technology

This makes the thumbnails closer to the original images, improving the user browsing experience, saving resources, and reducing power consumption and CPU load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025133393_21052026_PF_FP_ABST
    Figure CN2025133393_21052026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a thumbnail display method and a related apparatus. The present application relates to the technical field of terminals. In the method, an electronic device can obtain a thumbnail by means of texture compression; in addition, the electronic device can acquire a texture file comprising certain parameters of an original image. Thus, the thumbnail displayed by the electronic device on the basis of the texture file can reflect the certain parameters of the original image.
Need to check novelty before this filing date? Find Prior Art

Description

A method and related apparatus for displaying thumbnails

[0001] This application claims priority to Chinese Patent Application No. 202411640858.4, filed on November 15, 2024, entitled "A Method and Related Apparatus for Displaying Thumbnails", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to a method and related apparatus for displaying thumbnails. Background Technology

[0003] In some scenarios, electronic devices display thumbnails of the original image on their interfaces. Some thumbnails only reflect the color information of the pixels in the original image, failing to capture other aspects of the original image, resulting in a poor user experience. How to improve the presentation of thumbnails is a pressing issue that needs to be addressed in this field. Summary of the Invention

[0004] This application provides a method and related apparatus for displaying thumbnails, which can save resources and make the displayed thumbnails more closely resemble the original images, thereby improving the user browsing experience.

[0005] In a first aspect, this application provides a method for displaying a thumbnail, the method comprising: acquiring a first original image; acquiring first texture data based on the first original image, the first texture data including first data and second data, the first data including data after texture compression of the pixels of the first original image, the second data indicating parameters of the first original image other than the pixels of the first original image; and displaying a first thumbnail generated based on the first texture data.

[0006] By implementing the above method, electronic devices can not only read data from texture files through the GPU without CPU decompression, saving resources, but also make the displayed thumbnails more closely resemble the original images by using parameters of the original images carried in the texture files, thus improving the user browsing experience.

[0007] In conjunction with the first aspect, in some implementations, after acquiring the first texture data based on the first original image, the method further includes: storing a file header, the first data, and the second data as a first file, wherein the file header is located before the first data in the first file, the first data is located before the second data in the first file, and the file header indicates the first data volume of the first data; before displaying the first thumbnail generated based on the first texture data, the method further includes: reading the file header from the first file, reading the first data volume of the first data from an adjacent position after the file header, and reading the second data from after the first data.

[0008] In some implementations, after acquiring first data based on a first original image, and after acquiring second data, the electronic device needs to store the first and second data in a first file so that the first and second data can be accurately read later. For example, the size of the ASTC file header is A1, the size of the ASTC data indicating the ASTC in the ASTC file header is A2 (i.e., the size of the first data is A2), and the size of the second ASTC file excluding the ASTC file header is A3. Then, the electronic device can determine that the ASTC file header data is stored in region a1 (size A1) starting from the beginning of the ASTC file, the ASTC data is stored in region a2 (size A2) adjacent to region a1, and the ASTC file tail data is stored in region a3 (size (A3-A2)) adjacent to region a2 (i.e., the region in the second ASTC file excluding regions a1 and a2). Finally, the ASTC data is read from region a2, and the ASTC file tail data is read from region a3.

[0009] In this way, the electronic device can successfully store the first file, and can also successfully read the data in the first file and analyze the specific content represented by each type of data.

[0010] In conjunction with the first aspect, in some implementations, the method further includes: storing first information after the first data, the first information indicating the type and order of parameters indicated by the second data; the reading of the second data from after the first data specifically includes: reading the first information from after the first data, and reading the second data based on the first information.

[0011] In some implementations, if the second data indicates multiple parameters, the first file can also use first information to indicate which segment of data read by the electronic device represents which parameter type. For example, the ASTC file tail may include one or more of the following: multiple parameter data, category information of multiple parameters, order information of multiple parameter data, and size information of multiple parameter data. Optionally, the order information of multiple parameter data may include category information of multiple parameters.

[0012] In this way, electronic devices can more accurately obtain the various parameters indicated by the second data and the specific content contained in the various parameters based on the first information, avoiding situations where the parameters indicated by the second data cannot be identified.

[0013] In conjunction with the first aspect, in some implementations, obtaining the first texture data based on the first original image specifically includes: obtaining the bitmap information of the first original image; obtaining the first data based on the bitmap information of the first original image; and obtaining the second data based on the image source information of the first original image. Since the electronic device needs to obtain the bitmap information of the original image before it can perform texture compression on the pixels of the original image, the electronic device needs to decode the original image to obtain editable bitmap information.

[0014] In conjunction with the first aspect, in some implementations, the parameters of the first original image include one or more of the following: color gamut information, bit depth information, high dynamic range (HDR) information, pixel format information, contrast information, brightness information, hue information, and gain map information. In the embodiments of this application, the specific data included in the above-mentioned second data is only illustrative and may include more data related to the first original image, without limitation. The parameters indicated by the second data need to satisfy the following: a thumbnail displayed by the electronic device with the parameters indicated by the second data provides a better effect than a thumbnail obtained based on method one.

[0015] In conjunction with the first aspect, in some implementations, the color gamut information indicates the Digital Cinema Initiatives Alliance-Protocol 3DCI-P3 color gamut, or the pixel format information indicates YUV.

[0016] In conjunction with the first aspect, in some implementations, the parameters of the first original image also include one or more of the following: location information, time information, and shooting parameters. For practical user considerations, users may want to know the relevant information about capturing the first original image while viewing the preview image.

[0017] In conjunction with the first aspect, in some implementations, acquiring the first original image specifically includes: receiving a photo-taking operation and capturing the first original image; displaying the first thumbnail generated based on the first texture data specifically includes: displaying the first thumbnail generated based on the first texture data in the shooting interface. For example, the user interface shown in Figures 6D-6E can be referred to, and will not be elaborated upon here.

[0018] In conjunction with the first aspect, in some implementations, before displaying the first thumbnail generated based on the first texture data, the method further includes: receiving an operation to launch a gallery application; the display of the first thumbnail generated based on the first texture data specifically includes: displaying the first thumbnail generated based on the first texture data in the interface of the gallery application or photo album application. For example, the user interface shown in Figures 6A-6C can be referred to, and will not be elaborated here. For example, after acquiring the original image, the electronic device can immediately acquire texture data based on the original image, and then, after receiving a click operation on the album icon, generate a thumbnail based on the texture data and display the thumbnail. For another example, after acquiring the original image, the electronic device can, after receiving a click operation on the album icon, acquire texture data based on the original image, generate a thumbnail based on the texture data, and display the thumbnail.

[0019] In conjunction with the first aspect, in some implementations, before displaying the first thumbnail generated based on the first texture data, the method further includes: receiving a second operation; adjusting the second data; the display of the first thumbnail generated based on the first texture data specifically includes: displaying the first thumbnail generated based on the adjusted first texture data.

[0020] In a second aspect, this application provides an electronic device including a memory, a processor, and computer instructions stored in the memory, wherein the processor executes the computer program to implement the method described in the first aspect or any embodiment of the first aspect.

[0021] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect or any of the embodiments of the first aspect.

[0022] Fourthly, embodiments of this application provide a computer program product comprising computer instructions that, when executed by a processor, implement the method described in the first aspect or any of the embodiments of the first aspect.

[0023] The beneficial effects of the second to fourth aspects can be referenced from the beneficial effects of the first aspect mentioned above. Attached Figure Description

[0024] Figure 1 illustrates an application scenario of generating and displaying thumbnails using an electronic device, as provided in an embodiment of this application.

[0025] Figure 2 is a flowchart of a method for displaying thumbnails provided in an embodiment of this application;

[0026] Figure 3A is a schematic diagram of the structure of a first ASTC file that does not contain second data, provided in an embodiment of this application.

[0027] Figure 3B is a schematic diagram of the structure of a second ASTC file containing second data provided in an embodiment of this application;

[0028] Figure 4A is a flowchart illustrating the internal implementation of an electronic device in this application that acquires a first file based on a first original image.

[0029] Figure 4B is a flowchart illustrating the internal implementation of the electronic device provided in this application for acquiring and displaying a first thumbnail based on a first file.

[0030] Figure 5 is a schematic diagram showing the effect of two thumbnails provided in the embodiments of this application;

[0031] Figures 6A-6C show a set of user interfaces provided in the following scenario according to the embodiments of this application;

[0032] Figures 6D-6E show a set of user interfaces provided in scenario two according to the embodiments of this application;

[0033] Figure 7 is a schematic diagram of the structure of the electronic device 100 provided in an embodiment of this application;

[0034] Figure 8 is a software structure block diagram of the electronic device 100 provided in an embodiment of this application. Detailed Implementation

[0035] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0036] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0037] First, let's introduce the terminology used in the embodiments of this application.

[0038] The original image usually refers to an image that has not undergone compression and can retain the most complete image information.

[0039] A thumbnail is an image obtained by compressing the original image. Thumbnails are smaller in size and contain less data than the original image.

[0040] Texture compression is an image compression technique. The compressed data (referred to as texture format data) is stored in a texture file. Texture compression can also refer to the process of obtaining texture format data from the original image. A texture file typically includes a file header and file data. The file header includes information such as file size and file compression resolution (e.g., 4x4 compression resolution). The file data refers to the data obtained by compressing the pixel blocks of the original image according to the compression resolution using an electronic device.

[0041] Pixelmap is an uncompressed bitmap format after image decoding. It's a core data structure for image processing, storing image data as a matrix of pixels. Each pixel contains values ​​for three color channels: red, green, and blue. Modifying these values ​​allows for image drawing and editing. This format supports various image operations such as rotation, scaling, and cropping.

[0042] In some scenarios, when users browse images on electronic devices, the devices may display thumbnails of the original images. The reasons for presenting images as thumbnails instead of the original images in this case are as follows: First, to display more images on the interface. Thumbnails are smaller than the original images, so more thumbnails can be displayed in the same user interface. Second, to reduce the time and resources consumed by the electronic device in loading images. Thumbnails contain less data than the original images, so loading thumbnails takes less time.

[0043] The following section, with reference to Figure 1, will introduce the application scenarios of generating and displaying thumbnails on electronic devices.

[0044] Figure 1 illustrates an example scenario where a thumbnail is displayed from the gallery app's interface after the original image is saved in the gallery app.

[0045] Specifically, the electronic device first acquires the original image, then obtains a thumbnail based on the original image, and finally displays the thumbnail.

[0046] Referring to Figure 1, the electronic device can acquire the original image 'a' through various means, such as downloading it from the internet or taking a photograph. After acquiring the original image 'a', the electronic device can obtain and save a thumbnail 'b' based on it. Finally, the electronic device can display the thumbnail 'b' in response to the user opening the gallery application. Generally, the size of the thumbnail 'a' displayed after entering the gallery application is the default preview size.

[0047] In some implementations, electronic devices can obtain thumbnails based on the original image in the following ways:

[0048] Method 1: Obtain thumbnails through texture compression.

[0049] In some implementations, texture compression methods specifically include the following: a series of DirectX Texture Compression (DTX) algorithms, referred to as DTX series texture compression; ETC series texture compression; Adaptive Scalable Texture Compression (ASTC); S3 texture compression; and PowerVR Texture Compression (PVRTC). In this embodiment, the following content will use ASTC as an example of texture compression used by electronic devices.

[0050] Because of its simple data structure, texture format data can be directly read and decompressed by the GPU for subsequent rendering. This avoids competing with the CPU for resources, improving thumbnail display performance. However, texture format data does not carry parameters of the original image other than element points, such as color gamut information. This may cause electronic devices to display thumbnails obtained through method one that do not reflect certain effects of the original image, affecting the user's viewing experience.

[0051] Method 2: Obtain thumbnails using Joint Photographic Experts Group (JPEG) compression.

[0052] In some implementations, JPEG compression is a standard used for compressing continuous-tone still images. The compressed data (referred to as JPEG format data) is stored in a JPEG file. JPEG files have the extension .jpg or .jpeg. A JPEG file typically includes: a header, image recognition information, a defined quantization table, basic image information, a defined Huffman table, a scan interval, scan start information, and a footer. The header identifies the file as a JPEG format file. The image recognition information includes the original image's version number, density unit, etc. The defined quantization table contains information about the quantization processing of the original image data during compression. The basic image information includes the original image's width, height, sample precision, etc.

[0053] Because JPRG files carry many parameters of the original image, electronic devices displaying thumbnails obtained through Method 2 can better reflect some of the effects of the original image. However, the JPRG format data structure is complex, requiring CPU decoding before rendering, resulting in high CPU load. Furthermore, when an electronic device needs to load multiple thumbnails simultaneously, drawing the UI, decoding the JPRG file, and rendering the UI all require CPU resources, which may lead to high application load, high power consumption, and even white blocks appearing on the screen.

[0054] For example, some electronic devices (e.g., single-frame devices) use Method 1 to obtain thumbnails, while others use Method 2. However, thumbnails obtained through texture compression do not support a wide color gamut and default to a single color gamut (e.g., sRGB), while thumbnails obtained through JPEG compression support a wide color gamut. If thumbnails are generated from the original image using both methods, the thumbnail generated using Method 1 will have paler colors than the thumbnail generated using Method 2, and there will be a difference in image saturation. However, the thumbnail generated using Method 2 requires more power and resources than the thumbnail generated using Method 1.

[0055] Besides the two methods mentioned above for obtaining thumbnails, thumbnails can also be obtained from the original image in the following ways: compression using Portable Network Graphics (PNG); compression using Bitmap (BMP); compression using Graphics Interchange Format (GIF); compression using Tagged Image File Format (TIFF); compression using Targa (TGA); compression using Scalable Vector Graphics (SVG); compression using Photoshop document (PSD), etc. These methods all share some of the same or similar problems as JPEG.

[0056] To mitigate the aforementioned problems, embodiments of this application provide a method for displaying thumbnails. In this method, an electronic device can obtain thumbnails through texture compression. Furthermore, the electronic device can acquire a texture file that includes certain parameters of the original image. Thus, the thumbnail displayed by the electronic device based on the aforementioned texture file can reflect certain parameters of the original image.

[0057] Using the methods described above, electronic devices can read data from texture files via the GPU, eliminating the need for CPU decompression and saving resources. Furthermore, by utilizing the parameters of the original image carried in the texture file, the displayed thumbnail effect can more closely resemble the original image, improving the user browsing experience. This mitigates the problems of limited texture format data dimensionality and poor scalability inherent in Method 1, and also increases the application depth of texture encoding and decoding. It also reduces the high load and power consumption issues associated with Method 2.

[0058] The following describes a method flow for displaying thumbnails provided by an embodiment of this application.

[0059] Figure 2 illustrates a schematic flowchart of a method for displaying thumbnails provided in an embodiment of this application. The method includes:

[0060] S201, The electronic device acquires the first raw image.

[0061] In some implementations, electronic devices can acquire the first original image through multiple means.

[0062] The methods for obtaining the first original image may include, but are not limited to: obtaining it by taking a picture, such as taking a picture of the first original image through a camera application or other applications that use a camera; obtaining it by downloading it from the Internet, such as saving the first original image from the Internet to the electronic device through a browser application; obtaining the first original image through social media and instant messaging applications, such as receiving the first original image through a social application and saving it to the electronic device; obtaining it through cloud storage services, such as viewing and downloading the first original image through a cloud storage application; obtaining it through file transfer tools, such as receiving the first original image sent to this electronic device by another electronic device through a file transfer function; obtaining it through QR code or NFC technology, such as obtaining the first original image by scanning a QR code or using NFC technology; and obtaining it through screenshots, such as the electronic device using the screenshot function to obtain and save the first original image.

[0063] In the embodiments of this application, the above-described methods for obtaining the first original image are merely illustrative examples, and may include more or fewer methods, which are not limited thereto.

[0064] In some implementations, after acquiring the first original image, the electronic device can save the first original image in the electronic device so that subsequent users can view the first original image or send the first original image to other electronic devices.

[0065] S202. The electronic device acquires first texture data based on a first original image. The first texture data includes first data and second data. The first data includes data after texture compression of the pixels of the first original image, and the second data indicates parameters of the first original image.

[0066] Specifically, the electronic device first acquires the bitmap information of the first original image, then acquires the first data based on the bitmap information of the first original image, and acquires the second data based on the image source information of the first original image.

[0067] In some implementations, the first texture data and the aforementioned texture format data are not the same concept. Texture format data can refer to the first data. The first texture data includes the texture format data.

[0068] In some implementations, the electronic device can specify which parameters of the first original image are included in the second data. The second data differs from the first data and does not include the first data. Furthermore, the second data is smaller. For example, when the second data indicates color gamut information, the size of the second data can be only 1 byte.

[0069] The second data indicates the parameters of the first original image. Specifically, the parameters of the first original image may include one or more of the following: color gamut information, bit depth information, high-dynamic range (HDR) information, pixel format information, contrast information, brightness information, hue information, and gain map information. For example, the color gamut may include the following: standard Red Green Blue (sRGB), National Television Standards Committee (NTSC), Adobe RGB, and Digital Cinema Initiatives-Protocol 3 (DCI-P3), etc. Pixel formats may include the following: RGB, YUV, RAM, CMYK, HSV, etc.

[0070] In the embodiments of this application, the types of color gamut and pixel format shown above are only illustrative examples. Color gamut and pixel format may also include more types, and there is no limitation on them.

[0071] In one possible implementation, when the first original image is obtained by shooting, the parameters of the first original image may further include one or more of the following: location information, time information, shooting parameters, and shooting device information. Specifically, location information refers to the location information at the time the first original image was captured, such as GPS information. Time information refers to the time information at the time the first original image was captured. Shooting parameters refer to the shooting parameters at the time the first original image was captured, such as shutter speed, aperture size, ISO sensitivity, etc. Shooting device information includes the identifier of the device used to capture the first original image, such as the identifier of a camera of model a, or the identifier of a mobile phone of model b.

[0072] In the embodiments of this application, the data specifically included in the second data is only for illustrative purposes and may also include more data related to the first original image, which is not limited thereto.

[0073] In one possible implementation, the electronic device can receive user input and adjust the parameter type indicated by the second data. That is, the electronic device can adjust the second data based on the user's considerations and regenerate the second data based on the user's selection. The subsequently displayed thumbnail is also obtained based on the adjusted first texture data.

[0074] In some implementations, after the electronic device acquires the first data and the second data, it can use the file header, the first data, and the second data as a first file, with the file header positioned before the first data in the first file, and the first data positioned before the second data in the first file.

[0075] The following describes two texture file formats. For example, we will use an ASTC texture file as an example.

[0076] Figure 3A illustrates, for example, a schematic diagram of the structure of a first ASTC file that does not contain second data.

[0077] Referring to Figure 3A, the first ASTC file includes: the ASTC file header and the ASTC file data.

[0078] The ASTC file header includes: Magic_ID, width, height, blockFootprint.width, and blockFootprint.height. Magic_ID, as a specific identifier, indicates that the file shown in Figure 3A is in ASTC format and is typically a fixed sequence of bytes. width represents the total width of the thumbnail, in pixels. That is, width represents the horizontal resolution of the thumbnail. height represents the total height of the thumbnail, in pixels. That is, height represents the vertical resolution of the thumbnail. blockFootprint.width represents the horizontal size of each compressed block in the ASTC file's data, in pixels. blockFootprint.width represents the horizontal coverage area of ​​each block. blockFootprint.height represents the vertical size of each block in the ASTC file's data, in pixels. blockFootprint.width represents the vertical coverage area of ​​each block. From the contents of the ASTC file header, it can be seen that it contains information such as the ASTC file size and compression resolution. For example, the ASTC file header is 16 bytes in size.

[0079] ASTC's data includes the complete data of the first original image after texture compression, that is, the data of the pixels of the first original image after texture compression.

[0080] When an electronic device uses the first ASTC file, it verifies that the ASTC file size information indicated in the ASTC file header matches the actual ASTC file size to confirm that the first ASTC file is error-free. The electronic device can then obtain a thumbnail based on the first ASTC file and display it. As can be seen from the above description of method one for obtaining thumbnails based on the original image, thumbnails obtained based on the first ASTC file may fail to reflect certain effects of the original image, thus affecting the user's viewing experience.

[0081] Figure 3B illustrates, for example, a schematic diagram of the structure of a second ASTC file containing the second data.

[0082] Referring to Figure 3B, the second ASTC file includes: an ASTC file header, ASTC file data, and an ASTC file footer.

[0083] The second ASTC file contains the same ASTC header and data as the first ASTC file. The difference lies in the ASTC file footer, which includes data indicating the parameters of the first original image. In other words, the ASTC file footer contains second data.

[0084] In this embodiment of the application, the data indicating parameters in the end of the ASTC file can be simply referred to as the parameter data of ASTC.

[0085] When using a second ASTC file, an electronic device can determine whether the second ASTC file includes an ASTC file tail by checking the ASTC file size information indicated in the ASTC file header. After confirming that the second ASTC file includes an ASTC file tail, the data included in the ASTC file tail is read based on the ASTC file size information indicated in the ASTC file header and the total size of the second ASTC file.

[0086] For example, the size of the ASTC file header is A1, the size of the ASTC data indicating the ASTC within the ASTC file header is A2 (i.e., the size of the first data is A2), and the size of the second ASTC file excluding the ASTC file header is A3. Then, the electronic device can determine that the ASTC file header data is stored in region a1 (size A1) starting from the beginning of the ASTC file, the ASTC data is stored in region a2 (size A2) adjacent to region a1, and the ASTC file tail data is stored in region a3 (size A3-A2) adjacent to region a2 (i.e., the region in the second ASTC file excluding regions a1 and a2). Finally, the ASTC data is read from region a2, and the ASTC file tail data is read from region a3.

[0087] In this way, the electronic device can successfully store the second ASTC file, and can also successfully read the data in the second ASTC file and determine the specific content represented by each type of data.

[0088] It is worth noting that the first original image obtained each time the display thumbnail provided in this application embodiment is executed may be inconsistent. Therefore, the size of the first data in the current execution of the method flow shown in Figure 2 may be inconsistent with the ASTC data in other executions of the method flow shown in Figure 2. That is to say, during multiple executions of the method flow shown in Figure 2, region a2 is not fixed; it is determined based on the data size of the first original image. Therefore, the electronic device determines region a2 based on the size of the ASTC data indicated in the ASTC header, and then further determines region a3.

[0089] The ASTC file tail can indicate one or more parameters of the original image.

[0090] When the ASTC file end indicates only one parameter, the ASTC file end only includes that one parameter's data. After reading the ASTC file end, the electronic device can identify the category of that parameter based on that one parameter's data, and can also determine the specific content included in that one parameter. Alternatively, the ASTC file end can include the one parameter's data and the parameter's category information. After reading the ASTC file end, the electronic device can determine the category of that parameter based on the parameter's identifier, and can also determine the specific content included in that one parameter based on the one parameter's data.

[0091] When the ASTC file end indicates multiple parameters, such as parameter X1 and parameter X2, the ASTC file end may include one or more of the following: multiple parameter data, category information of multiple parameters, order information of multiple parameter data, and size information of multiple parameter data. Optionally, the order information of multiple parameter data may include category information of multiple parameters.

[0092] For example, the ASTC file end may include only multiple parameter data. After reading the ASTC file end, the electronic device can identify the categories of multiple parameters based on the multiple parameter data, and can also determine the specific content included in each parameter.

[0093] For example, the ASTC file end may include multiple parameter data and multiple parameter category information. Furthermore, the category information for one parameter is stored before the parameter data. For instance, the data stored in the ASTC file end in the following order from front to back: category information for parameter X1, parameter X1 data, category information for parameter X2, and parameter X2 data. After reading the ASTC file end, the electronic device can determine the category of a parameter based on the category information, and then determine the specific content included in the parameter based on the parameter data, repeatedly determining the parameter category and the content included in the parameter until the reading of the ASTC file end is complete.

[0094] For example, the ASTC file end may include multiple parameter data, multiple parameter category information, and multiple parameter sequence information. Furthermore, the sequence information is stored before the parameter data. For instance, the data stored in the ASTC file end in the following order from front to back: sequence information and category information (e.g., parameter X1 data is stored before parameter X2 data), parameter X1 data, and parameter X2 data. After reading the ASTC file end, the electronic device can determine that the data read first is parameter X1 data, and the data read later is parameter X2 data. Then, based on this multiple parameter data, it can identify the categories of multiple parameters and determine the specific content included in each parameter.

[0095] For example, the ASTC file tail may include: multiple parameter data, multiple parameter category information, and multiple parameter data size information. For instance, the data stored in the ASTC file tail, in the following order from front to back, are: parameter X1 category information, parameter X1 data size information, parameter X1 data, parameter X2 category information, parameter X2 data size information, and parameter X2 data.

[0096] For example, the ASTC file tail may include: multiple parameter data, multiple parameter order information, multiple parameter category information, and multiple parameter data size information. For instance, the data stored in the ASTC file tail, in the following order from front to back, are: order information and category information (e.g., parameter X1 data is stored before parameter X2 data), size information of parameter X1 data, parameter X1 data, size information of parameter X2 data, and parameter X2 data.

[0097] In the embodiments of this application, when the ASTC file end contains multiple parameter data, the contents of the ASTC file end shown above are only illustrative examples. It may also include more or less information, and the storage location of each piece of information in the ASTC file end is only illustrative examples. It is only necessary to ensure that the electronic device can successfully determine the specific content of the parameters indicated by the multiple parameter data, and there is no limitation thereto.

[0098] In this application embodiment, if the data included at the end of the ASTC file is not limited to the second data, then the information represented by the other data included at the end of the ASTC file besides the second data can be referred to as the first information.

[0099] In this way, electronic devices can generate parameters carried in texture files by adding file footers to the texture files, allowing them to optimize thumbnail presentation. Furthermore, multiple parameters can be carried in this way, enhancing the data dimensionality and scalability of the texture file. When the electronic device subsequently decodes the texture file, it can accurately read these multiple parameters based on the initial information and then configure them for the thumbnail.

[0100] In some implementations, the timing of S202 execution by the electronic device can vary.

[0101] Specifically, the electronic device can execute S202 immediately after acquiring the first raw image. After executing S202, a texture file (e.g., a second ASTC file) containing the first texture data is stored in the electronic device. That is, the electronic device automatically executes S202 without receiving any user operation before execution. Furthermore, at this time, the electronic device can execute S203 in response to the user's operation of viewing the first thumbnail, or the electronic device can execute S203 automatically.

[0102] The electronic device can also store the first original image after acquiring it. Upon receiving an operation from the user to view the thumbnail corresponding to the first original image, the stored first original image is read from the electronic device, and then S202 is executed. In other words, before executing S202, the operation to view the thumbnail needs to be received; the electronic device responds to the thumbnail viewing operation before executing S202 and S203.

[0103] It is worth noting that after completing this method flow, the electronic device has already acquired the first texture data. If the execution of S202 occurs in the latter case, the electronic device can determine whether it has stored the first texture data after receiving the operation to view the thumbnail corresponding to the first original image again. If the first texture data has not been stored, i.e., if the electronic device previously encountered an error in acquiring the first texture data, it can then acquire the first texture data again based on the first original image.

[0104] S203, The electronic device displays a first thumbnail obtained based on the first texture data.

[0105] Before executing S203, the electronic device can read the first data and the second data from the first texture data. For details on how the first and second data are read, please refer to the relevant description in Figure 3B above; it will not be repeated here.

[0106] In some implementations, the electronic device can obtain a first thumbnail based on the first texture data after acquiring the first texture data, and then display the first thumbnail. Optionally, before displaying the first thumbnail, the electronic device can receive a user's request to view the first thumbnail.

[0107] Specifically, the electronic device first obtains parameter information based on the second data in the first texture data, then configures the obtained parameters. Next, with the above parameters configured, it draws and renders based on the first data, then the GPU decodes and obtains the first thumbnail, and finally sends the first thumbnail configured with parameters to the display. In this way, the first thumbnail can reflect the parameter information indicated in the second data, which can improve the display effect of the first thumbnail.

[0108] In some implementations, since the aforementioned file header plays a role in executing S202 and S203, S202 can also be understood as the electronic device acquiring a first file based on the first original image, the first file including first texture data and a file header. S203 can also be understood as the electronic device displaying a first thumbnail acquired based on the first file.

[0109] By implementing the above method, a file extension containing parameters indicating the original image is added to the texture file. These parameters can then be read and configured for the thumbnail during the decoding process. This enhances the information carrying capacity and dimensionality of the texture file, increasing the diversity of parameter configurations for thumbnail display. Furthermore, the texture file decoding process requires only GPU involvement, eliminating the need for CPU participation and reducing power consumption during thumbnail generation.

[0110] The following section uses the P3 color gamut parameter indicated by the second data as an example to introduce the specific process of S202 and S203 mentioned above.

[0111] Figure 4A illustrates an exemplary flowchart of the internal implementation of an electronic device acquiring a first file based on a first original image.

[0112] Referring to Figure 4A, firstly, the electronic device acquires a first original image. The first original image is configured with a P3 color gamut. Then, the electronic device can parse the pixel map data of the first original image. Next, the electronic device performs texture compression on the pixel map data of the first original image to obtain texture format data of the first original image.

[0113] When acquiring the first original image, the electronic device can simultaneously acquire the image source of the first original image. Then, it extracts the color gamut information of the first original image from the image source. Finally, the electronic device uses a packaging tool to package the texture format data and color gamut information of the first original image to generate a first file. The electronic device can also store the first file on its device for subsequent generation of a first thumbnail.

[0114] Figure 4B illustrates an exemplary flowchart of the internal implementation of an electronic device acquiring and displaying a first thumbnail based on a first file.

[0115] Referring to Figure 4B, firstly, the electronic device reads and decodes the second data in the first file to obtain the color gamut information indicated in the first file. The specific content of the second data in the first file can be found in the relevant description in S202 above, and will not be repeated here. Then, the electronic device configures the color gamut information, i.e., the P3 color gamut, for the first thumbnail to be generated subsequently. Next, the electronic device can draw and render the first data in the first file, and then decode the rendered first data using the GPU to obtain the PixelMap data of the first thumbnail. Finally, the electronic device generates and displays the first thumbnail based on the PixelMap data of the first thumbnail and the color gamut information configured for the first thumbnail. The color gamut information of this first thumbnail is the p3 color gamut.

[0116] Based on the content of Figures 4A and 4B above, after the second data indicates the color gamut information, the texture file can support a wider color gamut, improving the effect of displaying thumbnails in scenarios where the method of this application is applied.

[0117] The effects of the thumbnails provided in the embodiments of this application are described below.

[0118] Figure 5 exemplifies the effects of two thumbnails. Both thumbnails are derived from the same original image. Thumbnail b1 on the left is obtained using the thumbnail display method provided in this application embodiment, such as the thumbnail obtained from the second ASTC file mentioned above. Thumbnail b2 on the right is obtained without using the thumbnail display method provided in this application embodiment, such as the thumbnail obtained from the first ASTC file mentioned above. It is worth noting that the color gamut information of the thumbnail obtained from the first ASTC file can be the default color gamut set by the electronic device and is unrelated to the color gamut of the original image corresponding to thumbnail b2.

[0119] Referring to Figure 5, the color gamut information of the same original image corresponding to thumbnails b1 and b2 is the p3 color gamut. Thumbnail b1's color gamut information is the p3 color gamut, while thumbnail b2's color gamut information is the sRGB color gamut. Because the same color value can represent different colors when applied to different color gamuts—for example, the color value representing region 1 in thumbnail b1 is the same as the color value representing region 2 in thumbnail b2, but the color presented by region 1 is different from the color presented by region 2—thumbnail b1 presents the same color as the original image, while thumbnail b2 presents a different color. Thumbnail b1 and thumbnail b2 also present different colors. When the original image has a wider color gamut, thumbnail b1 presents a better color effect than thumbnail b2, and thumbnail b1 is closer to the effect of the original image than thumbnail b2.

[0120] In the embodiments of this application, the parameters of the second data indication involved in Figures 4A, 4B and 5 are only illustrative examples and are not limited to color gamut information. They may also include other parameters, as long as the parameters of the second data indication can make the first thumbnail closer to the original image and the effect of the first thumbnail is better. There is no limitation in this regard.

[0121] For example, the parameter indicated by the second data can also be a pixel format. The pixel format in the first ASTC file is also a default pixel format. However, the pixel format of the thumbnail obtained by the electronic device based on the first ASTC file may not be consistent with the pixel format of the original image. This may affect the display effect of the thumbnail. Therefore, the electronic device can add data indicating the pixel format of the original image to the second ASTC file so that the pixel format of the thumbnail obtained based on the second ASTC file is consistent with the pixel format of the original image, thereby improving the display effect of the thumbnail.

[0122] The following describes two specific application scenarios provided by the embodiments of this application.

[0123] Scenario 1: Displaying thumbnails in the photo album interface.

[0124] Figures 6A-6C exemplarily illustrate a user interface for an electronic device that acquires the original image and then displays a thumbnail in a photo album.

[0125] The electronic device can respond to a click operation on an image in the chat interface, displaying a user interface 600 as shown in Figure 6A. User interface 600 is the user interface for the electronic device to view images in the instant messaging application. The electronic device can respond to a click operation on the save control 602 displayed after a long press on the original image 601, saving the original image 601 to the electronic device. Then, the electronic device can respond to a click operation on the album icon 611 in the user interface 610 shown in Figure 6B, displaying a user interface 620 as shown in Figure 6C. User interface 620 is the user interface for the electronic device to view thumbnails corresponding to images in the album application. User interface 620 includes a thumbnail 621 corresponding to the original image 601.

[0126] In this embodiment, the method for obtaining the original image 601 described above is merely illustrative; other methods can also be used to obtain the original image 601, and no limitation is imposed. Similarly, the operation of viewing the thumbnail described above is also illustrative; it can further include responding to more operations to view the thumbnail, and no limitation is imposed.

[0127] In one possible implementation, after acquiring the original image 601, the electronic device can immediately acquire texture data based on the original image 601, and then, after receiving a click operation on the album icon 611, generate a thumbnail 621 based on the texture data and display the thumbnail 621.

[0128] In another possible implementation, after acquiring the original image 601, the electronic device can acquire texture data based on the original image 601 after receiving a click operation on the album icon 611, and then generate a thumbnail 621 based on the texture data and display the thumbnail 621.

[0129] Scene 2: Display thumbnails on the shooting interface.

[0130] Figures 6D-6E exemplarily illustrate a user interface for an electronic device to capture raw images and then display thumbnails in the shooting interface.

[0131] The electronic device can respond to the operation of launching the camera application and display the user interface 630 as shown in Figure 6D. The user interface 630 is the user interface for the shooting function provided by the camera application of the electronic device. The user interface 630 may include: a preview interface 631, thumbnails 632, and shooting controls 633. The preview interface 631 displays content acquired in real-time by the camera. The thumbnails 632 display thumbnails of the original image previously captured by the electronic device.

[0132] The electronic device can respond to a click operation on the shooting control 633, capture a raw image, and display it on the user interface 640 as shown in Figure 6E. The captured raw image is the image captured by the camera when the electronic device receives the click operation, that is, the content displayed on the preview interface 631 when the electronic device receives the click operation. The user interface 640 also includes: the preview interface 641, the thumbnail 642, and the shooting control 643. Among them, the thumbnail 642 is a thumbnail corresponding to the captured raw image.

[0133] In one possible implementation, after receiving a click operation on the shooting control 633, the electronic device can capture the original image, then obtain texture data based on the original image, and then generate and display a thumbnail 642 based on the texture data.

[0134] In one possible implementation, after capturing the original image, the electronic device can also view a thumbnail of the captured original image in a photo album application. For example, the electronic device can display a thumbnail of the captured original image in response to a photo album viewing operation. The above process can be referred to the internal implementation flow shown in Figure 4B above, and will not be elaborated upon here.

[0135] In the embodiments of this application, the two scenarios described above are merely illustrative examples. More application scenarios that implement the thumbnail display provided in the embodiments of this application may also be included, and no limitation is made thereto.

[0136] Figure 7 shows a schematic diagram of the structure of the electronic device 100.

[0137] The following description uses electronic device 100 as an example to illustrate the embodiment. It should be understood that the electronic device 100 shown in FIG. 7 is merely an example, and the electronic device 100 may have more or fewer components than those shown in FIG. 7, may combine two or more components, or may have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0138] For example, electronic device 100 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. This application embodiment does not impose any special restrictions on the specific type of electronic device 100.

[0139] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0140] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0141] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0142] In some implementations, processor 110 can be used to acquire a first original image. Processor 110 can also be used to acquire first texture data based on the first original image. Specifically, processor 110 can be used to acquire bitmap information of the first original image, processor 110 can also be used to acquire first data based on the bitmap information of the first original image, and processor 110 can be used to acquire second data based on the image source information of the first original image. Processor 110 can be used to acquire a first thumbnail based on the first texture data. Specifically, GPU can be used to decode the first data. Processor 110 can also be used to determine whether the first texture data is stored. Processor 110 can also be used to determine whether the first file includes second data.

[0143] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0144] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0145] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0146] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0147] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0148] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0149] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0150] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0151] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0152] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0153] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0154] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0155] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0156] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0157] In some implementations, the display screen 194 can be used to display a first thumbnail obtained based on the first texture data.

[0158] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0159] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimizations on image noise, brightness, etc. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0160] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0161] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0162] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0163] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0164] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0165] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0166] In some implementations, internal memory 121 can be used to store the first texture data.

[0167] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0168] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. Microphone 170C, also called a "microphone" or "microphone," is used to convert sound signals into electrical signals. Headphone jack 170D is used to connect wired headphones. Headphone jack 170D can be a USB interface 130, or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, or a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0169] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals.

[0170] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100.

[0171] The 180C barometric pressure sensor is used to measure barometric pressure.

[0172] The magnetic sensor 180D includes a Hall sensor.

[0173] The accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes).

[0174] Distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser.

[0175] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode.

[0176] The 180L ambient light sensor is used to detect ambient light intensity.

[0177] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.

[0178] The 180J temperature sensor is used to detect temperature.

[0179] The 180K touch sensor is also known as a "touch panel".

[0180] The bone conduction sensor 180M can acquire vibration signals. Buttons 190 include a power button, volume buttons, etc.

[0181] Motor 191 can generate vibration alerts.

[0182] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0183] The SIM card interface 195 is used to connect the SIM card.

[0184] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.

[0185] Figure 8 is a software structure block diagram of an electronic device 100 according to an embodiment of this application.

[0186] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0187] The application layer can include a series of application packages.

[0188] As shown in Figure 8, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0189] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0190] As shown in Figure 8, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0191] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0192] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0193] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0194] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0195] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0196] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0197] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0198] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0199] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0200] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0201] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0202] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0203] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0204] A 2D graphics engine is a graphics engine for 2D drawing.

[0205] In some implementations, after an application (such as a gallery application) obtains the first raw image at the application layer, the electronic device can obtain the first texture data based on the first raw image through a decoder in the system library and related engines, and store the first texture data in the media library. The electronic device then reads the first texture data and generates a first thumbnail through a surface manager and related engines. Finally, the display driver sends the first thumbnail for display processing.

[0206] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0207] The following example, using a scene of capturing a photograph, illustrates the workflow of the software and hardware of the electronic device 100.

[0208] When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, etc.). The raw input event is stored in the kernel layer. The application framework layer retrieves the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking a touch click as an example, where the corresponding control is the camera application icon, the camera application calls the application framework layer's interface to launch the camera application, and then calls the kernel layer to launch the camera driver, capturing still images or videos through camera 193.

[0209] This application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the above-described method for displaying notifications.

[0210] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.

[0211] This application also provides a computer program product, including a computing program, which, when run on a computer, enables the computer to perform the steps in the various method embodiments described above.

[0212] This application also provides a chip system, which includes a processing circuit interface circuit. The interface circuit receives code instructions and transmits them to the processing circuit. The processing circuit executes the code instructions to enable the chip system to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0213] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method of displaying a thumbnail, characterized by, The method includes: Obtain the first original image; First texture data is obtained based on the first original image. The first texture data includes first data and second data. The first data includes data after texture compression of the pixels of the first original image. The second data indicates the parameters of the first original image other than the pixels of the first original image. Displays a first thumbnail generated based on the first texture data.

2. The method of claim 1, wherein, After obtaining the first texture data based on the first original image, the method further includes: The file header, the first data, and the second data are stored in a first file. The file header is located before the first data in the first file, and the first data is located before the second data in the first file. The file header indicates the first data volume of the first data. Before displaying the first thumbnail generated based on the first texture data, the method further includes: The file header is read from the first file, the first data of the first data volume is read from the adjacent position after the file header, and the second data is read from the position after the first data.

3. The method of claim 2, wherein, The method further includes: First information is stored after the first data, indicating the type and order of the parameters indicated by the second data; The step of reading the second data after the first data specifically includes: The first information is read from the first data, and the second data is read based on the first information.

4. The method according to any one of claims 1 to 3, characterized in that, The step of obtaining the first texture data based on the first original image specifically includes: Obtain the bitmap information of the first original image; The first data is obtained based on the bitmap information of the first original image; The second data is obtained based on the image source information of the first original image.

5. The method according to any one of claims 1-4, characterized in that, The parameters of the first original image include one or more of the following: color gamut information, bit depth information, high dynamic range (HDR) information, pixel format information, contrast information, brightness information, hue information, and gain map information.

6. The method of claim 5, wherein, The color gamut information indicates the Digital Cinema Initiatives Alliance-Protocol 3DCI-P3 color gamut, or the pixel format information indicates YUV.

7. The method according to any one of claims 1 to 6, characterized in that, The parameters of the first original image also include one or more of the following: location information, time information, and shooting parameters.

8. The method according to any one of claims 1-7, characterized in that, The acquisition of the first original image specifically includes: Receive the photo-taking operation and capture the first original image; The display of the first thumbnail generated based on the first texture data specifically includes: The first thumbnail, generated based on the first texture data, is displayed in the shooting interface.

9. The method according to any one of claims 1-7, characterized in that, Before displaying the first thumbnail generated based on the first texture data, the method further includes: Receive the command to launch the gallery application; The display of the first thumbnail generated based on the first texture data specifically includes: The first thumbnail, generated based on the first texture data, is displayed in the interface of the gallery application.

10. The method according to any one of claims 1-9, characterized in that, Before displaying the first thumbnail generated based on the first texture data, the method further includes: Receive the second operation; Adjust the second data; The display of the first thumbnail generated based on the first texture data specifically includes: Displays a first thumbnail generated based on the adjusted first texture data.

11. An electronic device, comprising: The electronic device includes a memory, a processor, and computer instructions stored in the memory, wherein the processor executes the computer program to implement the method of any one of claims 1-10.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-10.

13. A computer program product, characterised in that, The computer program product includes computer instructions that, when executed by a processor, implement the method of any one of claims 1-10.