Picture display method and electronic equipment
By performing different processing on the image area and background area in the large picture mode in the electronic device, the brightness of the image area is improved, the problem of poor picture display in the large picture mode is solved, and better display effects and HDR effects are achieved. .
Patent Information
- Application Number
- CN202310209493.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2024-08-27
AI Technical Summary
In the large picture mode of electronic devices, the picture display effect is not good, especially the colors are not bright and the highlight areas are dim. When the existing technology increases the screen brightness, it cannot specifically increase the brightness of the image area, resulting in poor display effects.
By performing different synthesis processes on the image area and background area in the large picture mode in the electronic device, specifically the image area is not darkened, the background area is darkened, and the darkening is calculated based on the screen brightness and environmental parameters. Proportion to darken the second layer to increase the brightness of the image area.
It effectively improves the display brightness of the image area in large picture mode, highlights the image area, improves the display effect of the picture, and simulates the high dynamic range imaging (HDR) effect.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a method for displaying a picture and an electronic device. Background Art
[0002] With the continuous development of terminal technology, electronic devices such as mobile phones have gradually become convenient shooting tools for users, and more and more users can use electronic devices to take pictures.
[0003] Gallery APK is an application used to view and browse pictures on mobile phones. It provides a large picture display mode (also known as large picture mode). In large picture mode, mobile phones usually use standard dynamic range (SDR) to display pictures. In SDR display mode, the picture display effect is not good, for example, the picture display color is not bright, the highlight area is dim, etc. Summary of the invention
[0004] In view of this, the present application provides a method for displaying a picture and an electronic device, which can improve the display effect of the electronic device displaying a picture in a large picture mode.
[0005] In a first aspect, the present application provides a method for displaying a picture, which is applied to an electronic device, and the method includes: displaying a first interface including a thumbnail of a first picture, and receiving a first operation of a user on the thumbnail of the first picture; wherein the first operation is used to trigger the electronic device to display the first picture in a large-picture mode; in response to the first operation, drawing a first layer and a second layer, and performing a non-darkening synthesis processing on the first layer, performing a darkening synthesis processing on the second layer, and displaying a second interface; wherein the screen brightness of the electronic device when displaying the second interface is higher than the screen brightness of the electronic device when displaying the first interface; the first layer includes the first picture, and the second interface is formed by superimposing the first layer and the second layer, and the first layer is superimposed on the second layer.
[0006] Generally speaking, if the display brightness of the image area in the large picture mode needs to be improved, the electronic device can improve the screen brightness. However, improving the screen brightness not only improves the display brightness of the image area in the large picture mode, but also improves the display brightness of the background area in the large picture mode, and does not specifically improve the display brightness of the image area in the large picture mode. Moreover, by using the above-mentioned brightness improvement method, the electronic device will not make any difference in the synthesis processing of the above-mentioned first layer and the second layer.
[0007] In the present application, the electronic device not only improves the screen brightness (such as the screen brightness when the electronic device displays the second interface is higher than the screen brightness when the electronic device displays the first interface), but also performs different synthesis processing on the first layer (i.e., the layer corresponding to the image area in the large picture mode) and the second layer (i.e., the layer corresponding to the background area in the large picture mode). Specifically, the electronic device can perform a non-darkening synthesis processing on the first layer and a darkening synthesis processing on the second layer. In this way, although the electronic device improves the screen brightness, it also performs a darkening processing on the layer corresponding to the background area in the large picture mode, while the layer corresponding to the image area in the large picture mode is not darkened. In this way, the display brightness of the image area in the large picture mode is higher than the display brightness of the background area in the large picture mode. The electronic device specifically improves the display brightness of the image area in the large picture mode, which can highlight the image area in the large picture mode and improve the display effect of the picture displayed in the large picture mode.
[0008] In a possible implementation of the first aspect, the method further includes: obtaining the backlight brightness, environmental parameters and device temperature when the electronic device displays the first interface; wherein the environmental parameters include the ambient light brightness and; obtaining a first brightness value and a second brightness value according to the backlight brightness and environmental parameters when the electronic device displays the first interface; wherein the first brightness value is equal to the screen brightness when the electronic device displays the first interface, and the second brightness value is higher than the first brightness value; calculating the ratio of the first brightness value to the second brightness value to obtain a darkening ratio of the second layer; wherein performing a darkening synthesis process on the second layer includes: performing a darkening synthesis process on the second layer based on the darkening ratio. The method for displaying a picture provided in the present application calculates the darkening ratio based on the first brightness value of the screen brightness when the electronic device displays the first interface and the second brightness value of the screen when the electronic device displays the second interface, and performs a darkening synthesis process on the second layer based on the darkening ratio.
[0009] In a possible implementation of the first aspect, after drawing the second layer and the first layer including the first picture, the method further includes: adding a layer identifier to the first layer and / or the second layer; wherein the layer identifier is used to mark whether the corresponding layer is a layer including the first picture; wherein the second layer is subjected to a darkening synthesis process, and the first layer is subjected to a non-darkening synthesis process, including: recognizing that the second layer is a layer that does not include the first picture according to the layer identifier, and performing a darkening synthesis process on the second layer; recognizing that the first layer is a layer that includes the first picture according to the layer identifier, and performing a non-darkening synthesis process on the first layer. The method for displaying pictures provided in the present application adds a layer identifier to the first layer and / or the second layer, which helps to distinguish the first layer from the second layer when performing a darkening synthesis process.
[0010] In a possible implementation of the first aspect, the first interface is a picture list interface of a gallery application in an electronic device, the picture list interface includes thumbnails of one or more pictures, and the one or more pictures include the first picture; or the first interface is a shooting preview interface of the electronic device, and the shooting preview interface includes a thumbnail of the first picture. The picture display method provided by the present application, when jumping from the picture list interface or shooting preview interface of the gallery application to the second interface, can highlight the first layer and not highlight the second layer.
[0011] In a possible implementation of the first aspect, in response to a first operation, a first layer and a second layer are drawn, and the first layer is synthesized without being darkened, and the second layer is synthesized with being darkened, and a second interface is displayed, including: in response to the first operation, if the high dynamic range imaging HDR function of the electronic device is turned on, the first layer and the second layer are drawn, and the first layer is synthesized without being darkened, and the second layer is synthesized with being darkened, and the second interface is displayed. The method for displaying a picture provided by the present application, if the high dynamic range imaging HDR function of the electronic device is turned on, when displaying the second interface, the first layer is brightened and the second layer is not brightened.
[0012] In a possible implementation of the first aspect, the method further includes: if the HDR function is turned off, displaying a third interface; wherein the screen brightness when the electronic device displays the third interface is equal to the screen brightness when the electronic device displays the first interface, and the third interface includes a third layer. In the method for displaying pictures provided in the present application, if the high dynamic range imaging HDR function of the electronic device is turned off, the screen brightness of the display screen is not increased when the second interface is displayed.
[0013] In a possible implementation of the first aspect, the electronic device includes: a gallery brightness management module, a system brightness service module, a drawing module and a synthesis display module, the synthesis display module includes a SurfaceFlinger and a hardware synthesis HWC module; wherein, in response to a first operation, a first layer and a second layer are drawn, and the first layer is synthesized without being dimmed, and the second layer is synthesized with being dimmed, including: the gallery brightness management module sends a first notification to the system brightness service module in response to the first operation, and the first notification is used to indicate entering a brightened display mode; the system brightness service module obtains a first brightness value and a second brightness value according to the backlight brightness, environmental parameters, and device temperature when the electronic device displays a first interface in response to the first notification; wherein the first brightness value is equal to the screen brightness when the electronic device displays the first interface, and the second brightness value is higher than the first brightness value; the system brightness service module notifies the synthesis display module of the first brightness value and the second brightness value; the drawing module draws the first layer and the second layer; the synthesis display module calculates a ratio of the first brightness value to the second brightness value to obtain a dimming ratio of the second layer, performs a dimming synthesis processing on the second layer based on the dimming ratio, and performs a non-darkening synthesis processing on the first layer. The electronic device provided in the present application includes a gallery brightness management module, a system brightness service module, a drawing module and a composite display module. The composite display module includes a SurfaceFlinger and a HWC module. The above modules interact with each other to implement any possible design method in the embodiment.
[0014] In a possible implementation of the first aspect: the system brightness service module triggers the screen brightness of the electronic device to be adjusted to a second brightness value. In the electronic device provided in the present application, the system brightness service module triggers the screen brightness of the electronic device to be adjusted to a second brightness value.
[0015] In a possible implementation of the first aspect, the electronic device further includes: a large image layer management module; the gallery brightness management module triggers the large image layer management module to create a first layer for the first image in response to the first operation; in response to the completion of the creation of the first layer, the large image layer management module adds a layer identifier to the first layer and / or the second layer; wherein the layer identifier is used to mark whether the corresponding layer is a layer including the first image. The electronic device provided by the present application includes a large image layer management module, which is used to create a first layer and add a layer identifier to the first layer and / or the second layer, and the layer identifier is used to mark whether the corresponding layer is the first layer.
[0016] In a possible implementation of the first aspect, the synthesis display module performs synthesis processing of darkening the second layer and performs synthesis processing of not darkening the first layer, including: performing synthesis processing of darkening the second layer; the synthesis display module identifies the first layer as a layer including the first picture according to the layer identifier, and performs synthesis processing of not darkening the first layer. In the electronic device provided by the present application, the synthesis display module identifies the first layer and the second layer according to the layer identifier, and the synthesis display module performs synthesis processing of not darkening the first layer and performs synthesis processing of darkening the second layer.
[0017] In a second aspect, the present application provides an electronic device, comprising: a memory, one or more processors; the memory is coupled to the processor; wherein the memory is used to store computer program code, and the computer program code comprises computer instructions; when the computer instructions are executed by the processor, the electronic device executes a method as described in any one of the first aspects.
[0018] In a third aspect, the present application provides a chip system, which can be applied to an electronic device including a memory. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from the above-mentioned memory and send the signal to the processor, and the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the method as in the first aspect and any possible design thereof.
[0019] In a fourth aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the first aspect and any possible design thereof.
[0020] In a fifth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method of the first aspect and any possible design thereof.
[0021] It can be understood that the beneficial effects that can be achieved by the electronic device of any possible design of the second aspect, the chip system of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect can be referred to as the beneficial effects in the first aspect and any possible design of the electronic device, and will not be repeated here.
[0022] It can be understood that the beneficial effects that can be achieved by the electronic device of any possible design of the second aspect, the chip system of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect can be referred to as the beneficial effects in the first aspect and any possible design of the electronic device, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A method for displaying a second interface on a mobile phone provided in an embodiment of the present application;
[0024] Figure 2 Another method for displaying a second interface on a mobile phone provided in an embodiment of the present application;
[0025] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of the software architecture structure of an electronic device provided in an embodiment of the present application;
[0027] Figure 5 A flowchart of a method for displaying an image provided in an embodiment of the present application;
[0028] Figure 6 An example diagram of a second interface provided in an embodiment of the present application;
[0029] Figure 7 A schematic diagram of a high dynamic range imaging HDR function button switch provided in an embodiment of the present application;
[0030] Figure 8 A schematic diagram of the interaction of internal modules of an electronic device provided in an embodiment of the present application;
[0031] Fig. 9 A timing flow chart of the interaction of internal modules of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] With the continuous development of terminal technology, electronic devices such as mobile phones have gradually become convenient shooting tools for users, and more and more users use electronic devices to take pictures.
[0033] Gallery is an application for viewing and browsing pictures on a mobile phone. It can display pictures stored on the mobile phone. Pictures can be photos taken by the user. Gallery provides multiple display modes, such as small picture display mode and large picture display mode (also known as large picture mode). Figure 1 A brief introduction to the two display modes is given below.
[0034] Figure 1In the example, the mobile phone displays the first interface 101 of the gallery application, and the first interface 101 includes thumbnails of one or more pictures. The first interface 101 can be a picture list interface, in which thumbnails of one or more pictures are displayed in a grid format, and each grid displays a thumbnail of a picture. In the first interface 101, the user can quickly browse existing pictures and search for existing pictures. In response to the user's first operation of clicking on the first photo in the first interface, the large picture mode of the picture is entered, and the mobile phone displays the second interface 102 of the gallery, and the second interface can display the first picture in a large screen format. The second interface 102 includes the first picture, the interface image of the gallery application, and system icons, etc.
[0035] In some embodiments, the user can enter the second interface of the gallery in the photo taking interface. Figure 2 As shown, the mobile phone displays a photo preview interface 201, which includes a small picture display window 202, in which a thumbnail of the last picture taken is displayed. In response to the user clicking the photo button, the mobile phone takes a first picture and displays the thumbnail of the first picture in the small display window. In response to the user clicking the thumbnail of the first picture, the mobile phone displays the second interface 102.
[0036] Standard Dynamic Range (SDR) is a universal color display method. Figure 1 or Figure 2 When the second interface is shown, the mobile phone usually uses a standard dynamic range to display the first image. When the first image is displayed in the SDR mode, there are problems such as the first image being not bright in color and the highlight area being dim, resulting in a poor display effect of the first image.
[0037] In conventional technology, the display effect of the first picture can be improved by increasing the screen brightness when the mobile phone displays the second interface. However, the display screen of the mobile phone is a whole, and the display screen cannot adjust the brightness of a certain area separately. As mentioned above, the second interface includes the first picture, the interface image of the gallery application, and the system icons. If the screen brightness of the mobile phone displaying the second interface is increased, the brightness of the second interface will be brighter as a whole, and the display effect of the first picture cannot be effectively improved.
[0038] In order to solve the above problems, the embodiments of the present application provide a method for displaying pictures and an electronic device. The electronic device can display a first interface including a thumbnail of a first picture and receive a first operation of a user. In response to the first operation, the electronic device draws a first layer and a second layer respectively, wherein the first layer includes a first picture. The electronic device does not perform a darkening process when synthesizing the first layer (i.e., performs a non-darkening synthesis process on the first layer), and performs a darkening process when synthesizing the second layer (i.e., performs a darkening synthesis process on the second layer). The electronic device increases the screen brightness and displays the second interface. Since the second layer is darkened, the image brightness of the picture in the second layer is reduced. After the screen brightness of the electronic device is increased, the first picture in the first layer is brightened and displayed. In the second interface, the display brightness of the first picture is higher than the display brightness of the picture in the second layer. The electronic device can specifically increase the display brightness of the first picture on the second interface, can highlight the first picture, and improve the display effect of the first picture. For example, the first picture will display a more transparent effect.
[0039] The method provided in the embodiment of the present application can be applied to electronic devices with data processing capabilities. The above-mentioned electronic devices may include servers, mobile phones, tablet computers, laptops, personal computers (personal computers, PCs), ultra-mobile personal computers (ultra-mobile personal computers, UMPCs), handheld computers, netbooks, smart home devices (such as smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (personal digital assistants, PDAs), wearable devices (such as smart watches, smart bracelets, etc.), vehicle-mounted devices, virtual reality devices, etc., and the embodiments of the present application do not impose any restrictions on this. In the embodiments of the present application, the above-mentioned electronic devices are electronic devices that can run operating systems and install applications. Optionally, the operating system running on the electronic device may be Android system, system, System, etc.
[0040] For example, please refer to Figure 3 , which shows a schematic diagram of the structure of an electronic device 300. The electronic device 300 may include a processor 310, an external memory interface 320, an internal memory 321, an audio module 330, a speaker 330A, a microphone 330B, a display screen 340, a communication module 350, a power module 360, an input device 370, a sensor module 380, etc. Among them, the sensor module 380 may include a pressure sensor, a touch sensor, etc.
[0041] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 300. In other embodiments of the present application, the electronic device 300 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0042] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 300 may also include one or more processors 310.
[0043] The controller is the nerve center and command center of the electronic device 300. It can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0044] The application processor can run the operating system of the electronic device 300, which is used to manage the hardware and software resources of the electronic device 300. For example, it can manage and configure memory, determine the priority of system resource supply and demand, control input and output devices, operate the network, manage the file system, manage drivers, etc. The operating system can also be used to provide an operation page for users to interact with the system. Among them, various types of software can be installed in the operating system, such as drivers, applications (applications, Apps), etc.
[0045] NPU is a neural network (NN) computing processor, which can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of electronic device 300.
[0046] The processor 310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.
[0047] In some embodiments, the processor 310 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an 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 SIM card interface, and / or a USB interface, etc.
[0048] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 300. In other embodiments of the present application, the electronic device 300 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0049] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 300. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0050] The internal memory 321 can be used to store one or more computer programs, which include instructions. The processor 310 can enable the electronic device 300 to execute the application running method provided in some embodiments of the present application, as well as various applications and data management, etc. by running the above instructions stored in the internal memory 321. The internal memory 321 may include a code storage area and a data storage area. Among them, the data storage area can store data created during the use of the electronic device 300, etc. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, a flash memory component, a universal flash storage (universal flash storage, UFS), etc. In some embodiments, the processor 310 can enable the electronic device 300 to execute the application running method provided in the embodiment of the present application, as well as other applications and data management by running instructions stored in the internal memory 321, and / or instructions stored in a memory provided in the processor 310.
[0051] The electronic device 300 can implement audio functions through an audio module 330, a speaker 330A, a microphone 330B, and an application processor, etc. For example, music playing, recording, etc. The audio module 330 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 330 can also be used to encode and decode audio signals. In some embodiments, the audio module 330 can be arranged in the processor 310, or some functional modules of the audio module 330 can be arranged in the processor 310.
[0052] The speaker 330A, also called a "horn", is used to convert audio electrical signals into sound signals.
[0053] The microphone 330B, also called a "microphone" or "microphone", is used to convert a sound signal into an electrical signal. A user can make a sound by approaching the microphone 330B with his or her mouth, and input the sound signal into the microphone 330B.
[0054] The communication function of the electronic device 300 can be realized through the antenna 1, the antenna 2 and the communication module 350.
[0055] The communication module 350 can provide solutions for wireless communications including cellular, Wi-Fi, Bluetooth (BT), wireless data transmission modules (e.g., 433MHz, 868MHz, 915MHz) applied to the electronic device 300. The communication module 350 can be one or more devices integrating at least one communication processing module. The communication module 350 receives electromagnetic waves via antenna 1 or antenna 2, filters and frequency modulates the electromagnetic wave signals, and sends the processed signals to the processor 310. The communication module 350 can also receive the signal to be sent from the processor 310, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through antenna 1 or antenna 2.
[0056] The electronic device 300 implements the display function through a GPU, a display screen 340, and an application processor. The GPU is a microprocessor for image processing, which is connected to the display screen 340 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs that execute program instructions to generate or change display information. For example, in the implementation of the present application, the GPU can perform synthesis processing on the first layer and the second layer.
[0057] The display screen 340 is used to display images, videos, etc. The display screen 340 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicrOLED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 300 may include 1 or N display screens 340, where N is a positive integer greater than 1. In an embodiment of the present application, the display screen 340 can be used to display a UI and receive user operations on the UI. For example, in an embodiment of the present application, the display screen is used to display a first interface and a second interface.
[0058] In some embodiments, the display screen 340 is provided with a pressure sensor, a touch sensor, and the like. The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. When a touch operation is applied to the display screen 340, the electronic device 300 detects the strength of the touch operation based on the pressure sensor. The electronic device 300 can also calculate the position of the touch based on the detection signal of the pressure sensor. The touch sensor, also known as a "touch panel", can form a touch screen, also known as a "touch screen", with the display screen 340. The touch sensor is used to detect touch operations applied thereto or thereabout. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can also be provided through the display screen 340.
[0059] The power module 360 can be used to supply power to various components included in the electronic device 300. In some embodiments, the power module 360 can be a battery, such as a rechargeable battery.
[0060] The input device 370 may include a keyboard, a mouse, etc. The keyboard is used to input English letters, numbers, punctuation marks, etc. into the electronic device 300, thereby issuing commands to the electronic device 300, inputting data, etc. The mouse is an indicator for the vertical and horizontal coordinates of the display system of the electronic device 300, and is used to input instructions, etc. to the electronic device 300. Among them, the input device 370 can be connected to the electronic device 300 through a wired connection, for example, the input device 370 is connected to the electronic device 300 through a GPIO interface, a USB interface, etc. The input device 370 can also be connected to the electronic device 300 wirelessly, for example, the input device 370 is connected to the electronic device 300 through Bluetooth, infrared, etc.
[0061] Take the above electronic device 300 as a mobile phone as an example. The software system of the electronic device 300 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device 300.
[0062] Figure 4 It is a software structure block diagram of the electronic device 300 according to an embodiment of the present invention.
[0063] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime, system library, hardware abstraction layer and kernel layer.
[0064] The application layer can include a series of application packages.
[0065] like Figure 4 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, desktop launcher, etc.
[0066] The gallery application may include a gallery brightness management module, a drawing module, and a large image layer management module. The gallery brightness management module in the gallery application may send a first notification to the system brightness service module through the system brightness interface of the application framework layer, and the first notification is used to notify that the current mobile phone needs to increase the screen brightness (i.e., enter the large screen brightening display mode) when browsing pictures. The gallery brightness management module triggers the large image layer management module to create the first layer in response to the first operation.
[0067] The drawing module is used to draw layers, such as (the first layer and the second layer), and transmit the first layer and the second layer to SurfaceFlinger, which performs layer synthesis on them respectively. The large image layer management module can add a layer identifier to the first layer and / or the second layer, and the layer identifier is used to mark whether the corresponding layer is a layer including the first image.
[0068] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0069] like Figure 4 As shown, the application framework layer may include a window manager, a content provider, a view system, a call manager, a resource manager, a notification manager, a system brightness service module, and SurfaceFlinger, etc.
[0070] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the display screen, capture the display screen, etc. The window manager can be a desktop launcher and a system framework (Framework module) transfer class, and the configuration parameters of the application can be obtained through the window manager.
[0071] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0072] The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. A display page can be composed of one or more views. For example, a display page including a text notification icon can include a view for displaying text and a view for displaying images.
[0073] The system brightness service module responds to the first notification sent by the gallery brightness management module, and obtains the first brightness value and the second brightness value according to the screen brightness and environmental parameters when the mobile phone displays the first interface. The system brightness service module can also send the first brightness value and the second brightness value to the SurfaceFlinger and the hardware composition (Hardware Composer, HWC) module. The above-mentioned first brightness value and second brightness value are used by the SurfaceFlinger and / or HWC module to perform synthesis processing of dimming or non-darkening on the first layer and the second layer. For example, it can be used to perform synthesis processing without dimming on the first layer and perform synthesis processing of dimming on the second layer.
[0074] The call manager is used to provide communication functions of the electronic device 300, such as management of call status (including connecting, hanging up, etc.).
[0075] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0076] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the display in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0077] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
[0078] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0079] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0080] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0081] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0082] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0083] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0084] A 2D graphics engine is a drawing engine for 2D drawings.
[0085] The hardware abstraction layer includes a HWC module, which is used to perform a non-dimming synthesis process on the first layer, perform a dimming synthesis process on the second layer, and send the synthesized layers to the display screen for display.
[0086] The kernel layer is a layer between hardware and software. The kernel layer may include display drivers, audio drivers, sensor drivers, etc. Among them, the display driver is used to drive the display screen to display the first interface or the second interface.
[0087] The following takes the electronic device 300 being a mobile phone as an example to introduce a method for displaying a picture provided in an embodiment of the present application.
[0088] Figure 5 A flowchart of a method for displaying an image provided in an embodiment of the present application.
[0089] In S501, the mobile phone displays a first interface including a thumbnail of a first picture, and receives a first operation of a user on the thumbnail of the first picture.
[0090] Exemplarily, the first interface may be Figure 1 The picture list interface shown includes one or more picture thumbnails. The first picture is one of the one or more pictures. The first interface can also be Figure 2 The shooting preview interface shown includes a thumbnail of the first picture.
[0091] The first operation is used to trigger the electronic device to display the first picture in a large picture mode. Figure 1 or Figure 2The first picture is displayed in the second interface shown. The first operation may be, for example, the user clicking on the thumbnail of the first picture in the picture list interface, or the user clicking on the thumbnail of the first picture in the shooting preview interface.
[0092] In the embodiment of the present application, the mobile phone may display a second interface (such as Figure 6 It should be noted that the screen brightness of the electronic device when displaying the second interface is higher than the screen brightness when displaying the first interface. Figure 6 As shown in 6a in FIG. 6 , the second interface is formed by superimposing a first layer 601 and a second layer 602, wherein the first layer 601 is superimposed on the second layer 602, the first layer 601 includes a first image, and the second layer 602 includes a background image and interface elements of the gallery application, and the interface elements include various buttons, such as a share button, a favorite button, an edit button, a delete button, a more button, and an information viewing button. In some embodiments, Figure 6 As shown in 6b, the second interface may further include a system image layer 603, and the system image layer 603 includes the interface elements of the system. In the second interface, the brightness of the system image layer 603 is lower than that of the first layer 601, that is, the system image layer 603 may be subjected to a darkening synthesis process.
[0093] It should be noted that in the second interface, the brightness of the second layer 602 is lower than the brightness of the first layer 601 including the first picture. Exemplarily, the mobile phone can perform a darkening synthesis process on the second layer when synthesizing the second layer. In this way, the brightness of the second layer can be reduced so that the brightness of the second layer is lower than the brightness of the first layer including the first picture.
[0094] As another example, when the mobile phone synthesizes the above-mentioned first layer, it performs a synthesis process to brighten the first layer, and does not adjust the brightness of the second layer. In this way, the brightness of the first layer can be increased, so that the brightness of the second layer is lower than that of the first layer.
[0095] As another example, when the mobile phone synthesizes the first layer, it performs a brightened synthesis display on the first layer and a brightened synthesis display on the second layer, but the brightness increase amplitude of the mobile phone on the first layer is greater than the brightness increase amplitude of the mobile phone on the second layer. In this way, the brightness of the first layer and the brightness of the second layer can be increased, but the brightness increase amplitude of the second layer is smaller than that of the first layer, so that the brightness of the second layer is smaller than that of the first layer.
[0096] As another example, when synthesizing the first layer, the mobile phone performs a dimmed synthesis display on the first layer and a dimmed synthesis display on the second layer, but the brightness dimming amplitude of the first layer by the mobile phone is smaller than the brightness dimming amplitude of the second layer by the mobile phone. In this way, the brightness of the first layer and the brightness of the second layer can be dimmed, but the brightness dimming amplitude of the first layer is smaller than that of the first layer, so that the brightness of the second layer is smaller than that of the first layer.
[0097] In the embodiment of the present application, the present solution is introduced by taking the case where the mobile phone performs a non-darkening synthesis process on the first layer and performs a darkening synthesis process on the second layer as an example. Specifically, after S501, the method of the embodiment of the present application may further include S502.
[0098] In S502, the mobile phone responds to the first operation, draws the first layer and the second layer, performs non-darkening synthesis processing on the first layer, performs darkening synthesis processing on the second layer, and displays the second interface, wherein the screen brightness of the electronic device when displaying the second interface is higher than the screen brightness when displaying the first interface.
[0099] The mobile phone draws the first layer and the second layer, including the mobile phone creating the first layer and the second layer, and the mobile phone draws the image data of the first layer and the second layer.
[0100] Creating a layer includes creating a surface, creating an image buffer corresponding to the surface, and creating a layer. The surface corresponds to the application, and the layer corresponds to the composite display module in the mobile phone (such as surfaceflinger and HWC module). The application draws the image data of the layer in the corresponding image buffer through the surface to complete the image data drawing.
[0101] In an embodiment of the present application, the mobile phone creates a first layer, and the gallery application draws the image data of the first picture in the image buffer to complete the drawing of the first layer; the mobile phone creates a second layer, and the gallery application draws the image data of the picture in the second layer in the image buffer to complete the drawing of the second layer.
[0102] The mobile phone performs synthesis processing on the first layer and the second layer, including: the mobile phone takes the image data of the first layer from the image buffer of the first layer, performs synthesis processing on the image data of the first layer, and sends it to the mobile phone display screen for display; the mobile phone takes the image data of the second layer from the image buffer of the second layer, performs synthesis processing on the image data of the second layer, and sends it to the mobile phone display screen for display.
[0103] When the mobile phone performs synthesis processing on the first layer (i.e., the mobile phone is synthesizing the first layer), the image data of the first layer is not darkened. When the mobile phone performs synthesis processing on the second layer (i.e., the mobile phone is synthesizing the second layer), the image data of the second layer is darkened.
[0104] Darkening is a digital image processing method that reduces the brightness of an image. As an example, an image can be stored in a mobile phone in the form of a bitmap before being displayed. The mobile phone can read the bitmap and display it on the screen, and the mobile phone can process the bitmap. A bitmap can also be called a raster image, which is composed of pixels. The mobile phone can obtain the RGB value of a single pixel based on the bitmap, and obtain the brightness of a single pixel based on the RGB value. The mobile phone obtains the brightness of multiple pixels in the bitmap and takes the average to obtain the image brightness of the image. The mobile phone can reduce the RGB value of a single pixel to reduce the image brightness of the image.
[0105] The mobile phone performs darkening processing on the second layer, which can reduce the image brightness of the picture in the second layer. Specifically, when synthesizing the second layer, the mobile phone can reduce the brightness of each pixel in the bitmap of the second layer to reduce the image brightness of the picture in the second layer. The image brightness of the picture in the second layer is reduced, and under the same screen brightness, when the mobile phone displays the darkened second layer, the brightness of the picture in the second layer is lower than when the mobile phone displays the undarkened second layer.
[0106] When the mobile phone displays the first interface, the brightness value of the screen brightness is the first brightness value, and when the mobile phone displays the second interface, the brightness value of the screen brightness is the second brightness value, and the second brightness value is greater than the first brightness value. In other words, when the mobile phone jumps from the first interface to the second interface, the screen brightness is increased. When the mobile phone displays the first picture at the second brightness value, the brightness of the first picture is brighter than when the mobile phone displays the first picture at the first brightness value, that is, the mobile phone brightens the display of the first layer.
[0107] Since the second layer is subjected to a darkening synthesis process, the brightness of the image in the second layer is pre-lowered before the second layer is displayed. When the mobile phone displays the image of the second layer at the second brightness value, the brightness of the image is lower than the brightness of the first image when the mobile phone displays the first image at the second brightness value, which is equivalent to the mobile phone not brightening the display of the second layer. It should be understood that as long as the mobile phone displays the second interface at the second brightness value, the brightness of the first image is higher than the brightness of the image in the second layer, it can be understood that the first layer is brightened and the second layer is not brightened.
[0108] In some embodiments, Figure 6As shown in 6b, the second interface also includes a third layer 603, and the third layer 603 includes the system icons of the mobile phone. In response to the first operation, the mobile phone can also draw the third layer and perform darkening synthesis processing on the third system. The darkening synthesis method is consistent with the second layer, which will not be repeated here.
[0109] Before the mobile phone performs a synthesis process to darken the second layer, it can obtain a first brightness value of the screen brightness when the mobile phone displays the first interface and a second brightness value of the screen brightness when the mobile phone displays the second interface, and perform a synthesis process to darken the second layer based on the first brightness value and the second brightness value.
[0110] Specifically, the mobile phone obtains a first brightness value of the screen brightness when the first interface is displayed. In some embodiments, the mobile phone can obtain the backlight brightness, current environmental parameters, and current mobile phone temperature when the first interface is displayed. The environmental parameters include the ambient light brightness. The mobile phone calculates the first brightness value of the screen brightness when the mobile phone displays the first interface based on the backlight brightness and the current environmental parameters when the first interface is displayed.
[0111] The mobile phone can obtain a second brightness value of the screen brightness when the mobile phone displays the second interface according to the obtained first brightness value and the ambient light parameter. The second brightness value is higher than the first brightness value. In some embodiments, the first brightness value is 100 nits (nit) and the second brightness value is 400 nits.
[0112] As an example, the mobile phone has a preset calculation method between the first brightness value and the second brightness value, for example, the first brightness value can be calculated by addition, multiplication, etc. to obtain an intermediate brightness value. The mobile phone corrects the intermediate brightness value according to the current environmental parameters and the current backlight brightness to obtain the second brightness value. The correction can be, for example, to increase the backlight brightness when the environmental parameters become larger, and to reduce the backlight brightness when the environmental parameters become smaller.
[0113] Based on the first brightness value and the second brightness value obtained, the mobile phone calculates the ratio of the first brightness value to the second brightness value to obtain the darkening ratio of the second layer. As an example, the first brightness value is 100nit, the second brightness value is 400nit, and the darkening ratio of the second layer is 1:4. When performing a darkening synthesis process on the second layer, the second layer can be darkened based on the darkening ratio. Taking the darkening ratio of 1:4 as an example, when the mobile phone reduces the brightness of each pixel in the bitmap of the second layer, the RBG value of each pixel can be reduced to 1 / 4 of the original value as a whole. When the mobile phone jumps from the first interface to the second interface, the brightness of the first layer can be increased from 100nit to 400nit, and the brightness of the second layer can remain unchanged at 100nit. In this way, the first layer is brightened and displayed, and the second layer is not brightened.
[0114] The mobile phone can add a layer identifier for the first layer and / or the second layer, and the layer identifier is used to identify whether the corresponding layer is the first layer. As an example, the mobile phone can create a layer identifier for the first layer, and the layer identifier can be, for example, "Layerflag=true", which is used to identify that the corresponding layer is the first layer. As another example, the mobile phone can create a layer identifier for the second layer, and the layer identifier can be, for example, "Layerflag=false", which is used to identify that the corresponding layer is not the first layer. When synthesizing the first layer and the second layer, the mobile phone can distinguish the first layer from the second layer based on the layer identifier.
[0115] The present application does not limit the timing when the mobile phone adds a layer identifier to the first layer and / or the second layer. As an example, the mobile phone can add a layer identifier to the first layer and / or the second layer after drawing the first layer and the second layer. For example, after the layer drawing is completed, the mobile phone distinguishes the first layer and the second layer according to the image data of the layer, and adds a layer identifier. Specifically, the mobile phone identifies the first layer according to whether the layer includes the first picture, and adds a layer identifier to the first layer. As another mobile phone, after creating the layer, it can also add a layer identifier to the layer to identify the layer as the first layer. The mobile phone instructs the gallery application to draw the image data of the first picture in the image buffer corresponding to the layer, and obtains the first layer including the first picture.
[0116] Among them, the method of the embodiment of the present application is used to improve the display brightness of the picture area in the large picture mode by "increasing the screen brightness" and "darkening the background area of the picture" to highlight the picture area in the large picture mode. It can be considered that the high dynamic range imaging (HDR) effect is achieved for the picture area in the large picture mode. In other words, by using this solution, the HDR effect of the mobile phone can be simulated to display pictures in the large picture mode.
[0117] Based on this, in some embodiments, in response to the first operation, the mobile phone can adopt the above-mentioned "increasing the screen brightness" and "darkening the background area of the picture" methods when the HDR function of the mobile phone is turned on, so as to achieve the purpose of targetedly improving the display brightness of the picture area in the large picture mode.
[0118] Specifically, the mobile phone may further include an HDR function switch button. When the HDR function switch button is turned on, the high dynamic range imaging HDR function of the mobile phone is turned on. When the HDR function button is turned off, the high dynamic range imaging HDR function of the mobile phone is turned off.
[0119] This application does not limit the location of the HDR function switch button in the mobile phone. Figure 7As shown in 7a in FIG. 1 , the HDR function switch button may be located on the first interface. Figure 7 As shown in 7b in FIG. 7 , the HDR function switch button can be set in the drop-down menu of the mobile phone.
[0120] In response to the first operation, if the HDR function of the mobile phone is turned on, the mobile phone can draw the first layer and the second layer, and perform a non-darkening synthesis process on the first layer, and perform a darkening synthesis process on the second layer. The mobile phone increases the screen brightness to a second brightness value and displays the second interface. In this way, when the HDR function of the mobile phone is turned on, the brightness of the first picture in the second interface is brighter and presents a more transparent effect.
[0121] In response to the first operation, if the HDR function of the mobile phone is turned off, the mobile phone displays the third interface, and the screen brightness of the mobile phone is the first brightness value, that is, the mobile phone jumps from the first interface to the third interface, and the mobile phone does not increase the screen brightness. The screen brightness of the mobile phone displaying the third interface is consistent with the screen brightness of the mobile phone displaying the first interface. The third interface includes a third layer, and the third layer includes Figure 1 or Figure 2 The first picture, background picture and interface elements of the gallery application are shown.
[0122] It should be noted that the screen brightness of the mobile phone displaying the third interface described in the embodiment of the present application is consistent with the screen brightness of the mobile phone displaying the first interface, which means that when the mobile phone switches from the first interface to display the third interface, the screen brightness of the mobile phone is not adjusted due to the switching of the interface. Of course, the mobile phone may adjust the screen brightness when switching from the first interface to display the third interface due to other factors (such as changes in ambient light). This situation is not included in the scope of the above-mentioned consistent screen brightness.
[0123] It should be noted that, by adopting this solution, the HDR effect of the mobile phone can be simulated to display pictures in the large picture mode. However, it is not required that the picture to be displayed (i.e., the first picture) must be shot in the HDR mode. Regardless of whether the first picture is a picture shot in the HDR mode or a picture shot in the non-HDR mode, this solution can be executed to simulate the HDR effect of the mobile phone in the large picture mode to display the first picture.
[0124] The HDR function may be enabled by the user manually setting the HDR function switch button, or it may be automatically enabled when the mobile phone is in a certain scene or meets certain conditions. This embodiment of the application does not limit this.
[0125] In this embodiment, if the HDR function of the mobile phone is turned on, it means that the user wants the mobile phone to capture and display images in HDR mode, or it means that the mobile phone is in a scene or condition that satisfies the HDR mode. In this case, regardless of whether the first picture is a picture taken in HDR mode, the first picture can be displayed in large picture mode by simulating the HDR effect of the mobile phone to optimize the display effect of the picture.
[0126] In the above embodiments, the method of the embodiment of the present application is introduced from the perspective of the mobile phone as the execution subject. The specific implementation of the method provided by the embodiment of the present application requires the support of various software and hardware modules in the mobile phone. In the following embodiments, the method of the embodiment of the present application is introduced through the interaction of various software and hardware modules in the mobile phone.
[0127] Exemplarily, the mobile phone may include a gallery brightness management module, a system brightness service module, a drawing module, a synthesis display module, and a large image layer management module. The synthesis display module may include SurfaceFlinger and HWC modules. Figure 8 As shown in the figure, the gallery brightness management module, drawing module and large image layer management module are included in the gallery application; the system brightness service module and SurfaceFlinger are included in the application framework layer of the mobile phone; the HWC module is included in the hardware abstraction layer. Figure 8 Take this as an example Fig. 9 This section describes the interaction process between the above modules.
[0128] In S1, in response to a first operation of a user on a thumbnail of a first picture on a first interface, for example, in response to a user Figure 1 When clicking on the thumbnail of the first picture in the first interface 101 of the gallery application shown, the gallery application can enter a brightened display mode and trigger the gallery brightness management module to send a first notification to the system brightness service module.
[0129] In S2, the gallery brightness management module sends a first notification to the system brightness service module. The first notification is used to notify the system brightness service module to enter a brightened display mode.
[0130] like Fig. 9 As shown, in S3, the system brightness service module receives the above-mentioned first notification, and in response to the first notification, obtains information such as the backlight brightness of the mobile phone, the ambient light brightness, and the temperature of the mobile phone, and obtains the first brightness value and the second brightness value based on the above-mentioned information obtained. Among them, the first brightness value is the brightness value of the screen brightness when the mobile phone displays the first interface, and the second brightness value is the brightness value of the screen brightness when the mobile phone displays the second interface, which is used to calculate the darkening coefficient during subsequent synthesis. The system brightness service module triggers the screen brightness of the mobile phone to be adjusted to the second brightness value.
[0131] In S4, the system brightness service module sends the first brightness value and the second brightness value to SurfaceFlinger and the hardware synthesis HWC.
[0132] Specifically, Fig. 9 As shown, S4 includes S401-S403. In S401, the system brightness service module sends the first brightness value and the second brightness value to SurfaceControl. In S402, SurfaceControl sends the received first brightness value and the second brightness value to SurfaceFlinger. In S403, the system brightness service module hardware synthesis HWC module sends the first brightness value and the second brightness value. In some embodiments, the system brightness service module can send the first brightness value and the second brightness value to SurfaceFlinger and the hardware synthesis HWC module respectively through the Android native channel.
[0133] like Fig. 9 As shown, in S5, the gallery brightness management module responds to the first operation and triggers the large image layer management module to set a brightened display mode for the first image in advance. The gallery brightness management module responds to the first operation and triggers the large image layer management module to create a surface, SurfaceControl, image buffer and Layer for the first layer.
[0134] like Fig. 9 As shown, in S6, the large image layer management module creates a surface, SurfaceControl, image buffer and Layer for the first layer.
[0135] In S7, the large image layer management module creates a layer identifier for the first layer in SurfaceControl through the SurfaceView interface. As an example, the large image layer management module sends the layer identifier "Layerflag = true" of the first layer to SurfaceControl through the SurfaceView interface. SurfaceControl receives the layer identifier and adds a layer identifier to the first layer. As another example, the large image layer management module sets the layer identifier of the first layer in SurfaceControl to "Layerflag = true" through the SurfaceView interface.
[0136] In S8, the gallery application analyzes the first image. After the analysis of the first image is completed, the gallery application updates the bitmap of the first image and triggers the drawing module to draw the first layer. Fig. 9As shown, S8 includes S801-S803. In S801, in response to a drawing instruction, such as "diapchDraw", the large image layer management module applies to SurfaceFlinger for a canvas (Canvas) and locks the canvas, which can be an image buffer. In S802, the drawing module renders the drawing of the first layer to the canvas. In S803, when the drawing is completed, the large image layer management module releases the canvas and unlocks it.
[0137] In S9 , when a new synthesis rendering cycle arrives, for example, in response to a VSync Refresh message, the synthesis display module obtains the first layer and the second layer that have been drawn from the canvas and performs synthesis processing on the first layer and the second layer.
[0138] Specifically, Fig. 9 As shown, S9 includes S901-S907. In S901, SurfaceFlinger calculates the dimming ratio (dimmingRatio) of the second layer according to the received first brightness value and the second brightness value, dimmingRatio = first brightness value / second brightness value. In S902, SurfaceFlinger obtains the image data of the layer that needs GPU synthesis. In S903, the first layer is identified according to the layer identifier, and the first layer is synthesized without dimming. In S904, SurfaceFlinger obtains the image data of the layer that needs GPU synthesis, identifies the second layer according to the layer identifier, and performs dimming synthesis on the second layer. In S905, SurfaceFlinger marks the synthesis method of each layer and submits the non-GPU synthesized layer to the hardware synthesis HWC module. In S906, the hardware synthesis HWC module calculates the dimming ratio of the second layer according to the received first brightness value and the second brightness value. In S907, the hardware synthesis HWC module identifies the first layer and performs non-darkening synthesis on the first layer. In S908, the hardware synthesis HWC module identifies the second layer and performs darkening synthesis processing on the second layer.
[0139] The synthesized first layer and second layer can be submitted to the display driver (not shown in the figure) by SurfaceFlinger and HWC module respectively. The mobile phone increases the driving voltage of the display screen, increases the screen brightness of the mobile phone screen from the first brightness value to the second brightness value, and displays the second interface.
[0140] The present application embodiment provides an electronic device, which includes: a memory, one or more processors. The memory is coupled to the processor, and the memory is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute the various functions or steps executed by the mobile phone in the above method embodiment. The structure of the electronic device can refer to Figure 3 The structure of the electronic device 300 is shown.
[0141] The present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are in the above electronic device (such as Figure 3 When the method is executed on the electronic device 300 shown in the figure, the electronic device executes each function or step in the above method embodiment.
[0142] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step in the above method embodiment.
[0143] The embodiment of the present application also provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected by lines. For example, the interface circuit can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (such as a processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instruction is executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
[0144] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0145] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0146] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0147] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0148] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0149] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for displaying a picture, characterized in that: Applied to electronic equipment, the method comprises: Displaying a first interface including a thumbnail of a first picture, and receiving a first operation of a user on the thumbnail of the first picture; wherein the first operation is used to trigger the electronic device to display the first picture in a large picture mode; In response to the first operation, a first layer and a second layer are drawn, and the first layer is composited without being dimmed, and the second layer is composited with being dimmed, to display a second interface; wherein the screen brightness of the electronic device when displaying the second interface is higher than the screen brightness of the electronic device when displaying the first interface; the first layer includes the first picture, and the second interface is formed by superimposing the first layer and the second layer, and the first layer is superimposed on the second layer.
2. The method according to claim 1, characterized in that The method further comprises: Acquire the backlight brightness of the electronic device when the first interface is displayed, the environmental parameters of the electronic device, and the device temperature of the electronic device when the first interface is displayed, wherein the environmental parameters include the ambient light brightness; Acquire a first brightness value and a second brightness value according to the backlight brightness when the electronic device displays the first interface and the environmental parameters; wherein the first brightness value is equal to the screen brightness when the electronic device displays the first interface, and the second brightness value is higher than the first brightness value; Calculating a ratio of the first brightness value to the second brightness value to obtain a darkening ratio of the second layer; The step of performing darkening synthesis processing on the second layer includes: The second layer is subjected to a darkening synthesis process based on the darkening ratio.
3. The method according to claim 1 or 2, characterized in that: After drawing the second layer and the first layer including the first picture, the method further includes: Adding a layer identifier to the first layer and / or the second layer; wherein the layer identifier is used to mark whether the corresponding layer is a layer including the first image; The step of performing a darkening synthesis process on the second layer and performing a non-darkening synthesis process on the first layer includes: According to the layer identifier, it is identified that the second layer is a layer that does not include the first image, and a synthesis process of darkening is performed on the second layer; according to the layer identifier, it is identified that the first layer is a layer that includes the first image, and a synthesis process of not darkening is performed on the first layer.
4. The method according to any one of claims 1 to 3, characterized in that The first interface is a picture list interface of a gallery application in the electronic device, the picture list interface includes thumbnails of one or more pictures, and the one or more pictures include the first picture; or The first interface is a shooting preview interface of the electronic device, and the shooting preview interface includes a thumbnail of the first picture.
5. The method according to any one of claims 1 to 4, characterized in that In response to the first operation, drawing the first layer and the second layer, performing a non-darkening synthesis process on the first layer, performing a darkening synthesis process on the second layer, and displaying a second interface, includes: In response to the first operation, if the high dynamic range imaging HDR function of the electronic device is turned on, the first layer and the second layer are drawn, and the first layer is synthesized without being dimmed, and the second layer is synthesized with being dimmed, and the second interface is displayed.
6. The method according to claim 5, characterized in that The method further comprises: If the high dynamic range imaging HDR function of the electronic device is turned off, a third interface is displayed; wherein the screen brightness of the electronic device when displaying the third interface is equal to the screen brightness of the electronic device when displaying the first interface, and the third interface includes a third layer.
7. The method according to any one of claims 1 to 6, characterized in that The electronic device comprises: a gallery brightness management module, a system brightness service module, a drawing module and a synthesis display module, wherein the synthesis display module comprises a SurfaceFlinger and a hardware synthesis HWC module; The step of drawing the first layer and the second layer in response to the first operation, performing a non-darkening synthesis process on the first layer, and performing a darkening synthesis process on the second layer includes: In response to the first operation, the gallery brightness management module sends a first notification to the system brightness service module, where the first notification is used to indicate entering a brightened display mode; In response to the first notification, the system brightness service module acquires a first brightness value and a second brightness value according to the backlight brightness when the electronic device displays the first interface, the environmental parameters, and the device temperature; wherein the first brightness value is equal to the screen brightness when the electronic device displays the first interface, and the second brightness value is higher than the first brightness value; The system brightness service module notifies the synthesis display module of the first brightness value and the second brightness value; The drawing module draws the first layer and the second layer; The synthesis display module calculates the ratio of the first brightness value to the second brightness value to obtain a darkening ratio of the second layer, performs darkening synthesis processing on the second layer based on the darkening ratio, and performs non-darkening synthesis processing on the first layer.
8. The method according to claim 7, characterized in that The method further comprises: The system brightness service module triggers the screen brightness of the electronic device to be adjusted to the second brightness value.
9. The method according to claim 7 or 8, characterized in that: The electronic device further comprises: a large image layer management module; The image library brightness management module triggers the large image layer management module to create a first layer for the first image in response to the first operation; In response to the completion of creation of the first layer, the large image layer management module adds a layer identifier to the first layer and / or the second layer; wherein the layer identifier is used to mark whether the corresponding layer is a layer including the first image.
10. The method according to claim 9, characterized in that The synthesis display module performs a synthesis process of darkening the second layer and performs a synthesis process of not darkening the first layer, including: The synthesis display module identifies, according to the layer identifier, that the second layer is a layer that does not include the first image, and performs a darkening synthesis process on the second layer; The synthesis display module identifies, according to the layer identifier, that the first layer is a layer including the first image, and performs synthesis processing on the first layer without darkening.
11. An electronic device, characterized in that: The electronic device comprises: a memory and one or more processors; the memory is coupled to the processor; wherein the memory is used to store computer program code, and the computer program code comprises computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 10.
