Wallpaper display method, electronic device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]本申请实施例公开了一种壁纸显示方法、电子设备及存储介质,可以解决部分场景无法播放转场动画的技术问题
[0037] It should be understood that the electronic device described in the second aspect and the computer-readable storage medium described in the third aspect above correspond to the method in the first aspect above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
Smart Images

Figure CN122554569A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a wallpaper display method, electronic device and storage medium. Background Technology
[0002] In current electronic device usage scenarios, to enhance the user's visual experience, devices typically play transition animations associated with the wallpaper during status changes. However, when the user-set wallpaper size is smaller than the screen size, related technologies generally enlarge the user-set wallpaper according to the screen size to achieve full-screen display, generating lock screen and always-on wallpapers that are the same size as the screen. This method results in the inability to play transition animations during status changes, causing a monotonous visual presentation, which not only affects the overall display effect but also degrades the user experience. Summary of the Invention
[0003] This application discloses a wallpaper display method, electronic device, and storage medium, which can solve the technical problem that transition animations cannot be played in some scenarios.
[0004] The first aspect of this application discloses a wallpaper display method applied to an electronic device, the electronic device including a display screen, the method comprising: generating a transition animation based on a configuration image when the electronic device enters a preset state, the configuration image being obtained by preprocessing a wallpaper set by a user, the size of the configuration image being equal to a preset multiple of the size of the display screen; and playing the transition animation on the display screen.
[0005] The above technical solution allows for the preprocessing of a configuration image based on the user-defined wallpaper. This ensures the size of the preprocessed configuration image is a preset multiple of the display screen size, avoiding inappropriate operations due to size mismatches and effectively resolving the issue of discrepancies between the displayed wallpaper and the user-defined wallpaper. Furthermore, when an electronic device is detected entering a preset state, a transition animation can be generated and played based on the configuration image, addressing the problem of transition animations not playing in certain scenarios and diversifying the visual presentation.
[0006] In one possible implementation, the method further includes: after the transition animation finishes playing, displaying the last image frame of the transition animation, wherein the last image frame is a lock screen wallpaper or an always-on wallpaper determined based on the wallpaper.
[0007] With the above technical solution, after the transition animation is completed, the electronic device displays the lock screen wallpaper or the off-screen wallpaper. Since there is no need to re-render the wallpaper set by the user, the resources of the electronic device can be saved.
[0008] In one possible implementation, the method further includes: in response to a user operation, preprocessing the wallpaper according to the wallpaper size and a preset size to obtain the configuration image, wherein the preset size is a preset multiple of the screen size; and storing the configuration image in the cache of the electronic device.
[0009] By preprocessing the wallpaper using its original size and preset dimensions, the technical solution described above ensures that the configured image size is a preset multiple of the display screen size. Furthermore, since the wallpaper displayed on the screen is determined based on the configured image, the visual discrepancy between the displayed wallpaper and the user-set wallpaper is resolved. Additionally, storing the configured image in a cache reduces the need for wallpaper loading to some extent.
[0010] In one possible implementation, the user operation includes any one of the following: power-on operation, wallpaper setting operation, and wallpaper changing operation.
[0011] In one possible implementation, the preprocessing of the wallpaper includes: if the size of the wallpaper is greater than or equal to the preset size, cropping the configuration image from the wallpaper according to the preset size.
[0012] By using the above technical solution, when the size of the wallpaper is greater than or equal to the preset size, the configuration image can be obtained by cropping it to the preset size, thus ensuring that the size of the configuration image is equal to the preset size.
[0013] In one possible implementation, the step of cropping the configuration image from the wallpaper according to the preset size includes: using a specified pixel point of the wallpaper as the reference pixel point of the configuration image, cropping an image with the preset size from the wallpaper as the configuration image.
[0014] By using the above technical solution, the configuration image can be cropped from the wallpaper by using the specified pixel points as the reference pixels.
[0015] In one possible implementation, the designated pixel point includes the midpoint of the lower boundary of the wallpaper, or the midpoint of the upper boundary of the wallpaper, or the center point of the wallpaper.
[0016] The above technical solutions can be used to crop configuration images in various ways to meet different user needs.
[0017] In one possible implementation, the preprocessing of the wallpaper includes: when the size of the wallpaper is smaller than the preset size but greater than or equal to the size of the display screen, performing image enlargement processing on the wallpaper to obtain the configuration image.
[0018] By employing the above technical solution, when the size of the wallpaper is smaller than the preset size but greater than or equal to the size of the display screen, by enlarging the wallpaper image, it is possible not only to ensure that the size of the configured image is equal to the preset size, but also to improve the viewing effect of the configured image.
[0019] In one possible implementation, the image enlargement process of the wallpaper includes: enlarging the wallpaper based on a first region to obtain a first image; enlarging the first image based on a second region to obtain a second image; and adjusting the clarity of a third region of the second image to obtain the configuration image.
[0020] The above technical solution allows for the expansion of the wallpaper using the first area and the first image using the second area, ensuring that the size of the second image equals the preset size. Simultaneously, by adjusting the clarity of the third area of the second image, splicing and mirroring artifacts in the configuration image can be avoided, improving the imaging effect of the configuration image.
[0021] In one possible implementation, adjusting the sharpness of the third region of the second image to obtain the configuration image includes: blurring the third region of the second image and adjusting the transparency of the third region to obtain the configuration image.
[0022] By using the above technical solution, after blurring the third region, adjusting the transparency of the third region can improve the overall blending effect of the configuration image.
[0023] In one possible implementation, the preprocessing of the wallpaper includes: when the size of the wallpaper is smaller than the size of the display screen, enlarging the wallpaper based on the size of the display screen to obtain an enlarged image; and expanding the enlarged image to obtain the configuration image.
[0024] By employing the above technical solution, when the wallpaper size is smaller than the display screen size, the wallpaper can be enlarged using the display screen size, avoiding the inability to properly enlarge the image due to its small size. Simultaneously, by enlarging the enlarged image, the realism of the configured image can be improved.
[0025] In one possible implementation, the magnification process of the wallpaper includes: determining a first ratio based on the width of the wallpaper and the width of the display screen, and determining a second ratio based on the height of the wallpaper and the height of the display screen; determining the smaller ratio from the first ratio and the second ratio as a target ratio, and determining a magnification factor based on the target ratio; and magnifying the wallpaper using the magnification factor to obtain the magnified image.
[0026] Through the above technical solution, based on the first ratio of the width of the wallpaper to the width of the display screen and the second ratio of the height of the wallpaper to the height of the display screen, a smaller ratio is determined as the target ratio. Then, based on the target ratio, a reasonable magnification factor can be determined. By magnifying the wallpaper with the magnification factor, the rationality of the magnified image can be improved.
[0027] In one possible implementation, generating the transition animation based on the configuration image includes: scaling down the configuration image based on multiple scaling ratios in a first preset range to obtain a third image corresponding to each scaling ratio; cropping each third image according to the size of the display screen to obtain multiple image frames; and generating the transition animation based on the multiple image frames according to the sorting of the multiple scaling ratios.
[0028] The above technical solution allows for the acquisition of a third image corresponding to each scaling factor. Cropping this third image to the screen size ensures that the dimensions of multiple image frames are equal to the screen size. Sequencing these image frames according to the scaling factor order improves the smoothness of transition animations.
[0029] In one possible implementation, cropping each third image includes: using a preset pixel point of each third image as the reference pixel point of the corresponding image frame, determining a cropping area from each third image based on the size of the display screen; and cropping an image containing the corresponding cropping area from each third image to obtain the plurality of image frames.
[0030] Using the above technical solution, the preset pixel point of each third image can be used as the reference pixel point of the corresponding image frame, and the corresponding image frame can be cropped from each third image, which can ensure that the reference pixel point in each image frame is the same pixel point.
[0031] In one possible implementation, if the preset state is a screen-off state, generating the transition animation based on the plurality of image frames includes: generating the transition animation corresponding to the screen-off state based on the plurality of image frames in ascending order of the plurality of scaling ratios.
[0032] The above technical solution allows for the generation of transition animations based on multiple image frames, ensuring that transition animations can be played even when the electronic device is in a screen-off state. Furthermore, generating transition animations according to the ascending order of the multiple scaling ratios improves the smoothness of the transition animations.
[0033] In one possible implementation, if the preset state is a locked screen state, generating the transition animation based on the plurality of image frames includes: generating the transition animation corresponding to the locked screen state based on the plurality of image frames in descending order of the plurality of scaling ratios.
[0034] The above technical solution allows for the generation of transition animations based on multiple image frames, ensuring that transition animations can be played when the electronic device enters lock screen mode. Furthermore, generating transition animations according to the order of the multiple reduction ratios from largest to smallest improves the smoothness of the transition animations.
[0035] The second aspect of this application discloses an electronic device, which includes a processor and a memory, the memory being used to store instructions, and the processor being used to invoke the instructions in the memory to cause the electronic device to perform the wallpaper display method as described in the first aspect.
[0036] A third aspect of this application discloses a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the wallpaper display method as described in the first aspect.
[0037] It should be understood that the electronic device described in the second aspect and the computer-readable storage medium described in the third aspect above correspond to the method in the first aspect above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Attached Figure Description
[0038] Figure 1A This is a diagram illustrating how wallpapers are displayed.
[0039] Figure 1B This is another illustration of how wallpapers are displayed.
[0040] Figure 2A This is another illustration of how wallpapers are displayed.
[0041] Figure 2B This is another illustration of how wallpapers are displayed.
[0042] Figure 3 This is a software architecture diagram of an electronic device provided in an embodiment of this application.
[0043] Figure 4This is a flowchart of a wallpaper display method provided in one embodiment of this application.
[0044] Figure 5 This is a detailed flowchart of wallpaper preprocessing provided in one embodiment of this application.
[0045] Figure 6A This is an example diagram of wallpaper cropping provided in one embodiment of this application.
[0046] Figure 6B This is another example of wallpaper cropping provided in one embodiment of this application.
[0047] Figure 6C This is another example of wallpaper cropping provided in one embodiment of this application.
[0048] Figure 7 This is a detailed flowchart of wallpaper enlargement processing provided in one embodiment of this application.
[0049] Figure 8 This is an example image of a wallpaper magnified according to one embodiment of this application.
[0050] Figure 9A This is an example diagram illustrating the cropping of a third image according to one embodiment of this application.
[0051] Figure 9B This is yet another example of cropping a third image provided in one embodiment of this application.
[0052] Figure 9C This is another example diagram of cropping a third image provided in one embodiment of this application.
[0053] Figure 9D This is an example diagram of the configuration image and the always-on wallpaper provided in one embodiment of this application.
[0054] Figure 9E This is an example diagram of the configuration image and lock screen wallpaper provided in one embodiment of this application.
[0055] Figure 10 This is an example diagram illustrating the segmentation of wallpaper according to an embodiment of this application.
[0056] Figure 11 An example diagram illustrating the expansion of wallpaper according to an embodiment of this application.
[0057] Figure 12A This is an example diagram of segmenting a first image according to an embodiment of this application.
[0058] Figure 12BThis is another example diagram of segmenting a first image according to an embodiment of this application.
[0059] Figure 12C This is another example diagram of segmenting a first image according to an embodiment of this application.
[0060] Figure 13 This is an example diagram illustrating the augmentation of a first image according to an embodiment of this application.
[0061] Figure 14 This is an example diagram illustrating the sharpness adjustment of a second image according to an embodiment of this application.
[0062] Figure 15 This is yet another example diagram illustrating the sharpness adjustment of a second image, provided as an embodiment of this application.
[0063] Figure 16 This is another example diagram illustrating the sharpness adjustment of a second image according to an embodiment of this application.
[0064] Figure 17 This is a partial timing diagram with margin provided for an embodiment of this application.
[0065] Figure 18 This is a partial timing diagram with no margin provided for an embodiment of this application.
[0066] Figure 19 This is a partial timing diagram with no margin provided for another embodiment of this application.
[0067] Figure 20 A partial timing diagram of a wallpaper display method provided in another embodiment of this application.
[0068] Figure 21 This application provides a hardware architecture diagram of an electronic device according to an embodiment. Detailed Implementation
[0069] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, words such as "exemplary," "or," and "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary," "or," and "for example" is intended to present the relevant concepts in a concrete manner.
[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. "And / or" in this application 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 alone, A and B simultaneously, and B alone. "At least one" means one or more. "More than one" means two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c. It should be understood that the order of steps shown in the flowcharts herein can be changed, and some can be omitted.
[0071] When using electronic devices (such as mobile phones, tablets, smartwatches, computers, etc.), users can set or change wallpapers according to their needs. However, after setting a wallpaper, in order to achieve full-screen display and avoid black bars on the screen, the wallpaper is usually enlarged by a certain factor based on the screen size. But this processing method will cause the displayed content to differ from the user-set wallpaper, and in some scenes, transition animations based on size changes cannot be generated and played, thus seriously affecting the user experience.
[0072] In terms of differences in displayed content, display discrepancies can occur when the set wallpaper size does not match the screen size. For example... Figure 1A As shown, when the wallpaper size is smaller than the screen size, the user-set wallpaper displays the characters "AAABBB" 1cm from the top edge of the screen, while the always-on wallpaper displayed on the screen displays the same characters 0.5cm from the top edge. The lock screen wallpaper displayed on the screen can only show part of the characters "AAABBB". For example... Figure 1B As shown, when the wallpaper size is larger than the screen size, the user-set lock screen wallpaper displays a portion of the characters "AAABBB" at the top edge of the screen, but the always-on wallpaper only displays a smaller portion of the characters, and the lock screen wallpaper does not display the characters at all. Therefore, regardless of whether the wallpaper size is smaller or larger than the screen size, after processing (e.g., magnification), there is a significant discrepancy between the displayed lock screen and always-on wallpaper and the user-set wallpaper in terms of content display, greatly affecting the user's expected wallpaper effect and user experience.
[0073] From the perspective of transition animations, when electronic devices switch states, such as entering a locked screen or screen-off state, they usually play transition animations associated with the wallpaper. For example... Figure 2A As shown, when the wallpaper size is larger than the screen size, a transition animation can be generated and played based on the size difference between the wallpaper and the screen. During the animation playback, the wallpaper gradually scales from its initial state to a display state adapted to the screen, providing the user with a smooth visual transition effect.
[0074] However, with Figure 2B For example, when the wallpaper size set by the user is smaller than the screen size, in order to achieve full-screen display, the wallpaper is usually enlarged to match the screen size, resulting in a lock screen wallpaper and an always-on wallpaper that are the same size as the screen. Since transition animations typically rely on changes in the size, position, or angle of the wallpaper under different states, when the wallpaper is enlarged to match the screen size, there is no room for variation during state transitions. Therefore, it's impossible to generate and play size-based transition animations, leading to a monotonous visual presentation that not only affects the overall display effect but also reduces the user experience.
[0075] To address the aforementioned issues, this application provides a wallpaper display method that preprocesses the user-set wallpaper so that the size of the preprocessed configuration image is equal to a preset multiple of the display screen size. Therefore, this application eliminates the need to enlarge the user-set wallpaper by a certain factor to display it in full screen, effectively resolving the discrepancy between the displayed content and the user-set wallpaper. When the electronic device enters a preset state, a transition animation can be generated based on the configuration image, solving the problem that some scenarios cannot generate transition animations based on the set wallpaper. This diversifies the visual presentation and improves the user experience.
[0076] The wallpaper display method provided in this application embodiment is applied to electronic devices including a display screen. Exemplarily, the electronic device in this application embodiment 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 phones, personal digital assistants (PDAs), artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices, and / or smart city devices, etc. This application embodiment does not impose any special limitations on the specific form of the electronic device. The electronic device includes an application processor, which is used to run an operating system, as described below. Figure 3 The software structure of an electronic device is illustrated by example.
[0077] See Figure 3The diagram shown is a software architecture diagram of an electronic device provided in an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. For example, the Android system, from top to bottom, consists of the application layer 101, framework layer 102, Android runtime and system libraries 103, hardware abstraction layer 104, kernel layer 105, and hardware layer 106.
[0078] Application layer 101 may include a series of application packages. For example, application packages may include applications such as camera, gallery, calendar, calling, map, navigation, WLAN, Bluetooth, music, video, SMS, device control services, etc.
[0079] The application layer 101 may further include a control module 1011. The control module 1011 can preprocess the user-set wallpaper to obtain a configuration image. The control module 1011 can also store the configuration image in the electronic device's cache. Upon detecting that the electronic device has entered a preset state, the control module 1011 can retrieve the configuration image from the cache and generate a transition animation based on the configuration image. The control module 1011 can also send the transition animation to the view module. The control module 1011 can also release the transition animation after it has finished playing.
[0080] The application layer 101 may also include an image expansion module 1012. In this embodiment, the preset size can be a preset multiple of the display screen size, and the preset multiple can be set and adjusted according to user needs. When the wallpaper size is smaller than the preset size but greater than or equal to the display screen size, the image expansion module 1012 can expand the wallpaper to obtain a configuration image. When the wallpaper size is smaller than the display screen size, the image expansion module 1012 can enlarge the wallpaper based on the display screen size to obtain an enlarged image, and then expand the enlarged image to obtain a configuration image.
[0081] In this embodiment of the application, the image expansion module 1012 can specifically expand the wallpaper based on the first area of the wallpaper to obtain a first image, expand the first image based on the second area of the first image to obtain a second image, and adjust the clarity of the third area of the second image to obtain a configuration image.
[0082] The framework layer 102 provides an Application Programming Interface (API) and programming framework for applications in the application layer. The application framework layer includes predefined functions. For example, it may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0083] The window manager manages window programs. It can obtain the screen size, determine the presence of a status bar, lock the screen, and capture screenshots. The content provider stores and retrieves data, making this data accessible to applications. Data can include video, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text and images. The view system can be used to build applications. The view system may also include a view module 1021, which can play transition animations on the screen. The view module 1021 can also send a completion notification to the control module after the transition animation has finished playing.
[0084] The display interface can consist of one or more views. For example, a display interface including a text notification icon can include a view displaying text and a view displaying images. The phone manager provides communication functions for electronic devices, such as managing call status (including connection, hang-up, etc.). The resource manager provides applications with various resources, such as localized strings, icons, images, layout files, video files, etc. The notification manager allows applications to display notification information in the status bar, which can be used to convey informational messages and can disappear automatically after a short pause without user interaction. For example, the notification manager is used to notify of download completion, message alerts, etc. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications, or as dialog windows on the screen. For example, displaying text messages in the status bar, emitting alert sounds, vibrating electronic devices, flashing indicator lights, etc.
[0085] The Android Runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part contains the functionalities that the Java language needs to call, and the other part contains the core Android libraries.
[0086] Application layer 101 and framework layer 102 run in a virtual machine. The virtual machine executes the Java files of the application layer and 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.
[0087] System library 103 may include multiple functional modules. For example, a surface manager, media libraries, 3D graphics processing libraries (e.g., Open GLES), 2D graphics engines (e.g., SGL), etc.
[0088] The Surface Manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. 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. The 3D Graphics Processing Library implements 3D graphics drawing, image rendering, compositing, and layer processing. The 2D Graphics Engine is the drawing engine for 2D graphics.
[0089] Hardware Abstraction Layer 104 runs in user space, encapsulates kernel-level drivers, and provides calling interfaces to the upper layers.
[0090] Kernel layer 105 is the layer between hardware and software. Kernel layer 105 contains at least the display driver, touch driver, audio driver, and sensor driver.
[0091] The kernel layer (105) is the core of the operating system for electronic devices. It is the first layer of software extension based on the hardware, providing the most basic functions of the operating system. It is the foundation for the operation of the operating system, responsible for managing system processes, memory, device drivers, files, and network systems, and determining the system's performance and stability. For example, the kernel layer can determine the timing of an application's operation on a certain part of the hardware.
[0092] Kernel layer 105 includes hardware-dependent programs such as interrupt handlers and device drivers, as well as basic, common, and frequently running modules such as clock management and process scheduling modules, and critical data structures. The kernel layer can be located within the processor or embedded in internal memory.
[0093] Hardware layer 106 includes the hardware of electronic devices, such as displays, buttons, cameras, etc.
[0094] To better understand the embodiments of this application, the wallpaper display method provided by the embodiments of this application will be described below with reference to the accompanying drawings. The following embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0095] Figure 4 This is a flowchart illustrating a wallpaper display method provided in one embodiment of this application. The wallpaper display method is applied to an electronic device including a display screen. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted. For example... Figure 4 As shown, the wallpaper display method includes the following process.
[0096] S401, in response to user operation, the control module of the electronic device preprocesses the wallpaper set by the user to obtain the configured image.
[0097] In one embodiment of this application, user operations may include, but are not limited to, power-on operations, wallpaper setting operations, and wallpaper changing operations. In one example, in response to a user's power-on operation on the electronic device, the electronic device can load a user-set wallpaper from a preset directory. The preset directory may store user-set custom wallpapers. In another example, the user can set a wallpaper as needed; for example, the user-set wallpaper may be a lock screen wallpaper and / or an always-on wallpaper. In response to a user's wallpaper setting or wallpaper changing operation on the electronic device, the electronic device can obtain the currently set wallpaper as the user-set wallpaper.
[0098] In one embodiment of this application, in response to a user operation, the control module in the electronic device (e.g., Figure 3 The control module 1011 shown can preprocess the user-set wallpaper based on the wallpaper size and a preset size to obtain a configuration image. The size of the configuration image can be equal to a preset multiple of the display screen size. The preset size can be a preset multiple of the display screen size, which can be set and adjusted according to user needs. For example, the preset multiple can be 1.12, 1.13, etc., and the display screen size can be represented by W1 and H1, where W1 represents the size of the display screen in the first dimension (e.g., width) and H1 represents the size of the display screen in the second dimension (e.g., height). Therefore, the preset size can be expressed as 1.12W1 and 1.12H1. This embodiment of the application, by preprocessing the wallpaper based on the wallpaper size and a preset size, ensures that the size of the configuration image is equal to a preset multiple of the display screen size. Furthermore, since the wallpaper displayed on the screen is determined based on the configuration image, it solves the problem of visual differences between the wallpaper displayed on the screen and the user-set wallpaper.
[0099] In one embodiment of this application, the method by which the electronic device preprocesses the wallpaper can be found in [reference needed]. Figure 5 The process is shown below. The following text combines... Figure 5 The process shown is explained below.
[0100] S4011, determine whether the wallpaper size is greater than or equal to the preset size.
[0101] In one embodiment of this application, if the width of the wallpaper is greater than or equal to a preset multiple of the width of the display screen, and the height of the wallpaper is greater than or equal to a preset multiple of the height of the display screen, the electronic device determines that the size of the wallpaper is greater than or equal to a preset size. If the width of the wallpaper is less than a preset multiple of the width of the display screen, or the height of the wallpaper is less than a preset multiple of the height of the display screen, the electronic device determines that the size of the wallpaper is less than a preset size.
[0102] In one embodiment of this application, if the size of the wallpaper is greater than or equal to a preset size, step S4012 is executed; if the size of the wallpaper is less than the preset size, step S4013 is executed.
[0103] S4012, based on the preset size, cuts out the configuration image from the wallpaper.
[0104] In one embodiment of this application, to meet different user needs, the midpoint of the bottom edge, the midpoint of the top edge, or the center point of the wallpaper can be used as a designated pixel point of the wallpaper. The electronic device uses the designated pixel point of the wallpaper as the reference pixel point for the configuration image, and crops an image with a preset size from the wallpaper as the configuration image. In this embodiment, when the size of the wallpaper is greater than or equal to the preset size, the configuration image is obtained by cropping to the preset size, ensuring that the size of the configuration image is equal to the preset size. Furthermore, by using the designated pixel point of the wallpaper as the reference pixel point for the configuration image, this embodiment can crop a configuration image from the wallpaper based on the designated pixel point.
[0105] In one example, the wallpaper dimensions are represented by W2 and H2, where W2 represents the wallpaper's dimensions in the first dimension (e.g., width), and H2 represents the wallpaper's dimensions in the second dimension (e.g., height). For example, combining... Figure 6A , Figure 6B and Figure 6C The diagram shows that if W1 = 5cm, H1 = 10cm, W2 = 6cm, H2 = 13cm, and the preset multiplier k is 1.12, calculations show that W2 / W1 = 1.2 > 1.12 and H2 / H1 = 1.3 > 1.12. Figure 6A As shown, an electronic device can use the midpoint of the bottom edge of the wallpaper as the reference pixel point for the configuration image. The width and height of the configuration image cropped from the wallpaper are represented as: W3 = 5.6cm, H3 = 11.2cm, where W3 represents the size of the configuration image in the first dimension (e.g., width), and H3 represents the size of the configuration image in the second dimension (e.g., height). For example... Figure 6B As shown, an electronic device can use the midpoint of the top boundary of the wallpaper as the reference pixel point for the configuration image, and crop the configuration image from the wallpaper to obtain a configuration image with the aforementioned dimensions. For example... Figure 6C As shown, the electronic device can use the center point of the wallpaper as the reference pixel point for the configuration image and crop the configuration image from the wallpaper to obtain the configuration image with the above-mentioned size.
[0106] S4013 determines whether the wallpaper size is greater than or equal to the screen size.
[0107] In one embodiment of this application, the size of the display screen can be the size of the full screen, or it can represent the size of the display area used to display various interfaces, images, videos and other objects.
[0108] In one embodiment of this application, if the width of the wallpaper is greater than or equal to the width of the display screen and the height of the wallpaper is greater than or equal to the height of the display screen, the electronic device determines that the size of the wallpaper is greater than or equal to the size of the display screen. If the width of the wallpaper is less than the width of the display screen or the height of the wallpaper is less than the height of the display screen, the electronic device determines that the size of the wallpaper is less than the size of the display screen.
[0109] In one embodiment of this application, if the size of the wallpaper is greater than or equal to the size of the display screen, step S4014 is executed; if the size of the lock screen wallpaper is smaller than the size of the display screen, step S4015 is executed.
[0110] S4014, perform image enlargement processing on the wallpaper to obtain the configuration image.
[0111] In one embodiment of this application, to address the issue of the wallpaper displayed on the screen differing from the wallpaper set by the user, the electronic device can perform image enlargement processing on the wallpaper to obtain a configuration image. The size of the configuration image is equal to a preset multiple of the screen size. The method by which the electronic device performs image enlargement processing on the wallpaper is described below. Figure 7 The process is illustrated. In another embodiment, the electronic device can also use AI image expansion to expand the wallpaper to obtain a configuration image.
[0112] In one example, when the width of the wallpaper is less than a preset multiple of the width of the display screen and the height of the wallpaper is greater than or equal to a preset multiple of the height of the display screen, the wallpaper is enlarged based on a first region to obtain a configuration image. The first region may include the area of the wallpaper in a first direction (e.g., from left to right according to the width of the wallpaper) and a second direction (e.g., the opposite direction of the first direction, from right to left according to the width of the wallpaper).
[0113] In another example, when the width of the wallpaper is greater than or equal to a preset multiple of the width of the display screen and the height of the wallpaper is less than a preset multiple of the height of the display screen, the wallpaper is expanded based on the second region of the wallpaper to obtain a configuration image. The second region may include the area of the wallpaper in the third direction of the second dimension (e.g., the direction from top to bottom according to the height of the wallpaper) and / or the fourth direction (e.g., the opposite direction of the third direction, the direction from bottom to top according to the height of the wallpaper).
[0114] In another example, when the width of the wallpaper is less than a preset multiple of the width of the display screen and the height of the wallpaper is less than a preset multiple of the height of the display screen, the electronic device expands the wallpaper based on a first area to obtain a first image, and expands the first image based on a second area to obtain a second image. The electronic device then adjusts the sharpness of a third area of the second image to obtain a configuration image. The third area may include the first area and its corresponding expanded area, and the second area and its corresponding expanded area.
[0115] S4015 enlarges the wallpaper based on the screen size to obtain an enlarged image, and then performs image expansion processing on the enlarged image to obtain a configuration image.
[0116] In one embodiment of this application, the electronic device determines a first ratio based on the width of the wallpaper and the width of the display screen, and a second ratio based on the height of the wallpaper and the height of the display screen. The electronic device then selects the smaller ratio from the first and second ratios as a target ratio, determines a magnification factor based on the target ratio, and uses this magnification factor to enlarge the wallpaper, obtaining an enlarged image. The magnification factor can be the reciprocal of the target ratio. This embodiment of the application determines the smaller ratio as the target ratio based on the first ratio of the wallpaper width to the display screen width and the second ratio of the wallpaper height to the display screen height. Based on the target ratio, a reasonable magnification factor can be determined, and by enlarging the wallpaper using this factor, the reasonableness of the enlarged image can be improved.
[0117] Figure 8 It shows the size relationship between the wallpaper, the screen, and the enlarged image. For example... Figure 8 As shown, if the screen size is W1 = 5cm and H1 = 10cm, and the wallpaper size is W2 = 4cm and H2 = 9cm, the first ratio is calculated to be W2 / W1 = 0.8 and the second ratio is H2 / H1 = 0.9. Taking the first ratio of 0.8 as the target ratio, the magnification factor is 1 / 0.8 = 1.25. By magnifying the wallpaper with a magnification factor of 1.2, the size of the magnified image is obtained as W = 5cm and H = 11.25cm.
[0118] In one embodiment of this application, the method by which the electronic device performs image enlargement processing on the magnified image can be referred to below. Figure 7 The process is shown below.
[0119] S402, the control module stores the configuration image in the cache of the electronic device.
[0120] In one embodiment of this application, to reduce the number of wallpaper loading operations and quickly generate transition animations, the electronic device can store the configuration image in the device's cache. In response to a user's shutdown operation, or when the wallpaper is updated due to a wallpaper setting or change operation, the electronic device deletes the configuration image from the cache, thus avoiding excessive image space consumption on the electronic device.
[0121] S403, if the electronic device is detected to have entered a preset state, the control module retrieves the configuration image from the cache.
[0122] In one embodiment of this application, the preset state may include, but is not limited to, a screen-off state, a screen-locked state, and a screen-on state. In different states, the user can perform corresponding operations to control the electronic device to enter a screen-off state from a screen-locked state or a screen-on state, enter a screen-locked state from a screen-off state or a screen-on state, and enter a screen-on state from a screen-off state or a screen-locked state.
[0123] In one embodiment of this application, the electronic device can enter a screen-off state in response to receiving a screen-off command. The screen-off command can be a command generated by the electronic device after receiving a user's screen-off operation while in a locked screen state. The screen-off operation may include, but is not limited to, a user's click operation on the power button, or a user's touch operation on the lock screen icon displayed on the screen. This embodiment of the application does not limit the screen-off operation. For example, the electronic device can enter a screen-off state when it receives a user's voice command for a screen-off operation, and / or detects that the brightness of the display screen is less than a brightness threshold, and / or does not receive a user operation within a preset time.
[0124] In one embodiment of this application, the electronic device can enter a locked screen state in response to receiving a lock screen command. The lock screen command can be a command generated by the electronic device after receiving a user's screen-on operation when the screen is off. The screen-on operation may include, but is not limited to, a user's click operation on the power button, or a user's touch operation on the lock screen icon displayed on the screen. This embodiment of the application does not limit the screen-on operation. For example, the electronic device can enter a locked screen state when it receives a user's voice command for screen-on operation while the screen is off, and / or when the electronic device is in a screen-on state and has not received a user operation within a preset time.
[0125] In one embodiment of this application, when the electronic device detects that it has entered a preset state, the electronic device can retrieve a configuration image from the cache. Since this embodiment does not require reloading the wallpaper or reprocessing, the configuration image can be retrieved quickly.
[0126] S404 generates transition animations based on configuration images.
[0127] In one embodiment of this application, to provide better visual effects, when the electronic device detects that it has entered a screen-off or screen-locked state, it can generate a transition animation based on a configured image. In one example, the electronic device can draw multiple image frames in a wallpaper display layer and obtain a transition animation based on the multiple image frames.
[0128] In one embodiment of this application, the method for generating a transition animation includes: scaling down a configuration image based on multiple scaling ratios in a first preset range to obtain a third image corresponding to each scaling ratio; cropping each third image according to the size of the display screen to obtain multiple image frames; and generating a transition animation based on the multiple image frames according to the sorting of the multiple scaling ratios.
[0129] In this embodiment, the first preset interval can be constructed based on the initial scaling ratio and the ending scaling ratio. Both the initial scaling ratio and the ending scaling ratio can be set to values greater than 1. The initial scaling ratio and the ending scaling ratio can be set and adjusted according to actual needs, and are not limited in practical applications. The initial scaling ratio can be greater than the ending scaling ratio. For example, the initial scaling ratio can be set to 1.12, and the ending scaling ratio can be set to 1.06. In one example, the electronic device can determine the first preset interval based on a third ratio of the initial scaling ratio to a preset multiple and a fourth ratio of the ending scaling ratio to a preset multiple. For example, if the initial scaling ratio is 1.12, the ending scaling ratio is 1.06, and the preset multiple is 1.12, the electronic device can determine the first preset interval as [1, 0.95] based on the third ratio 1.12 / 1.12 and the fourth ratio 1.06 / 1.12.
[0130] In this embodiment, the first preset interval includes multiple reduction ratios. The number of reduction ratios can be determined based on a preset frame rate and a preset duration. For example, if the frame rate of the transition animation is set to 120fps and the duration of the transition animation is set to 0.1s, then the number of reduction ratios is 12. In one example, the multiple reduction ratios can be any value within the first preset interval. In another example, the electronic device can determine the multiple reduction ratios based on the difference between the third ratio and the fourth ratio and the number of reduction ratios. The formula for the multiple reduction ratios can be: sN = K1 - N[(K1 - K2) / M], where sN can represent the Nth reduction ratio, K1 can represent the third ratio, K2 can represent the fourth ratio, and M can represent the number of reduction ratios. For example, if the third ratio is 1, the fourth ratio is 0.95, and the number of reduction ratios is 12, then the first reduction ratio can be s1 = 1 - 1 * [(1 - 0.95) / 120] = 0.9958. In this embodiment, the difference between the third ratio and the fourth ratio, and the number of multiple reduction ratios, can determine an ordered set of reduction ratios.
[0131] In this embodiment, the electronic device reduces the size of a configuration image according to multiple reduction ratios to obtain a third image corresponding to each reduction ratio. The size of each third image is greater than or equal to the size of the display screen. For example, the size of the configuration image is W3 = 5.6cm, H3 = 11.2cm, and the size of the display screen is W1 = 5cm, H1 = 10cm. The multiple reduction ratios include 0.98, 0.97, and 0.95. The electronic device reduces the size of the configuration image according to a reduction ratio of 0.98 to obtain a third image corresponding to a reduction ratio of 0.98, W4 = 5.488cm, H4 = 10.976cm. The electronic device reduces the size of the configuration image according to a reduction ratio of 0.97 to obtain a third image corresponding to a reduction ratio of 0.97, W4 = 5.488cm, H4 = 10.976cm. The electronic device reduces the size of the configuration image according to a reduction ratio of 0.95 to obtain a third image corresponding to a reduction ratio of 0.95, W4 = 5.488cm, H4 = 10.976cm.
[0132] In this embodiment, the preset pixel can be the midpoint of the lower boundary, the midpoint of the upper boundary, or the center point of a pixel in each third image. The electronic device can use the preset pixel of each third image as the reference pixel of the corresponding image frame, and determine a cropping region from each third image based on the size of the display screen. The size of the cropping region is equal to the size of the display screen. The electronic device crops an image containing the corresponding cropping region from each third image, obtaining multiple image frames. This embodiment, by using the preset pixel of each third image as the reference pixel of the corresponding image frame, can ensure that the reference pixel in each image frame is the same pixel.
[0133] In one example, if the second region of the first image only includes the region of the first image in a third direction (e.g., from top to bottom according to the image height) of the second dimension (e.g., the image height of the first image), the electronic device can use the midpoint of the lower boundary of each third image as the reference pixel point of the corresponding image frame to crop multiple image frames from each third image. For example Figure 9A As shown, if W1 = 5cm, H1 = 10cm, and the image corresponding to a reduction ratio of 0.97 is W4 = 5.488cm, H4 = 10.976cm, we can obtain the following: Figure 9A The image frame shown.
[0134] In another example, if the second region of the first image only includes the region of the first image in the fourth direction of the second dimension (e.g., the opposite direction of the third direction, the direction from bottom to top according to the image height), the electronic device can use the midpoint of the upper boundary of each third image as the reference pixel point of the corresponding image frame to crop multiple image frames from each third image. For example Figure 9B As shown, if W1 = 5cm, H1 = 10cm, and the image corresponding to a reduction ratio of 0.97 is W4 = 5.488cm, H4 = 10.976cm, we can obtain the following: Figure 9B The image frame shown.
[0135] In another example, if the second region of the first image includes the regions of the first image in the third and fourth directions, the electronic device can use the center point of each third image as the reference pixel point for the corresponding image frame to crop multiple image frames from each third image. For example Figure 9C As shown, if W1 = 5cm, H1 = 10cm, and the image corresponding to a reduction ratio of 0.97 is W4 = 5.488cm, H4 = 10.976cm, we can obtain the following: Figure 9C The image frame shown.
[0136] This application embodiment reduces the size of the configuration image by multiple reduction ratios within a first preset range, resulting in multiple corresponding third images. By cropping the third images according to the display screen size, multiple image frames with the same size as the display screen can be obtained. Based on a preset order of the multiple reduction ratios, a smooth transition animation can be generated.
[0137] In one embodiment of this application, the transition animation may include a transition animation corresponding to the screen-off state and a transition animation corresponding to the screen-locked state. In one example, if the preset state is the screen-off state, a transition animation corresponding to the screen-off state is generated based on multiple image frames in ascending order of scaling ratio. The last image frame of the transition animation corresponding to the screen-off state can be the screen-off wallpaper. For example... Figure 9D As shown, the configuration image obtained by the control module from the cache is 1.12 times the display screen size. After the view module loads the configuration image, the control module can reduce the size of the configuration image to 1 times the display screen size. When the screen is off, the control module can adjust the size of the configuration image to 1.06 times the display screen size before displaying it. At this time, the size of the off-screen wallpaper displayed in the off-screen state is 0.95 times the size of the configuration image in the cache. This embodiment can generate transition animations based on multiple image frames, ensuring that transition animations can be played when the electronic device enters the off-screen state. Furthermore, generating transition animations according to multiple scaling ratios from smallest to largest can improve the smoothness of the transition animations.
[0138] In another example, if the preset state is a lock screen, a transition animation corresponding to the lock screen state is generated based on multiple image frames, arranged in descending order of scaling ratio. The last image frame of the transition animation corresponding to the lock screen state is the lock screen wallpaper. For example... Figure 9EAs shown, the configuration image obtained by the control module from the cache is 1.12 times the display screen size. After the view module loads the configuration image, the control module can reduce the size of the configuration image to 1 times the display screen size. When the screen is locked, the control module can adjust the size of the configuration image to 1.12 times the display screen size before displaying it. At this time, the size of the lock screen wallpaper displayed in the lock screen state is the size of the configuration image in the cache. This embodiment can generate transition animations based on multiple image frames to ensure that the transition animation can be played when the electronic device enters the lock screen state. Furthermore, generating transition animations according to multiple reduction ratios from largest to smallest can improve the smoothness of the transition animations.
[0139] S405 sends the transition animation to the view module.
[0140] In one embodiment of this application, the control module can send transition animations to the view module for display.
[0141] S406, the view module plays transition animations on the display screen.
[0142] In one embodiment of this application, after the transition animation finishes playing, the last image frame of the transition animation is displayed. This last image frame is a lock screen wallpaper or an always-on wallpaper determined based on the wallpaper. For example, when the electronic device is in a lock screen state, it plays a transition animation corresponding to the lock screen state; after the transition animation finishes playing, the electronic device displays the lock screen wallpaper. Similarly, when the electronic device is in a always-on state, it plays a transition animation corresponding to the always-on state; after the transition animation finishes playing, the electronic device displays the always-on wallpaper. This embodiment of the application displays the lock screen wallpaper or always-on wallpaper after the transition animation finishes playing. Since it eliminates the need to re-render the user-set wallpaper, it saves the resources of the electronic device.
[0143] S407, the view module sends a notification message indicating that playback has been completed to the control module.
[0144] In one embodiment of this application, after the view module finishes playing the transition animation, it sends a notification message to the control module indicating that playback has been completed.
[0145] S408, control module releases transition animation.
[0146] In one embodiment of this application, after receiving a notification that playback has been completed, the control module can release the transition animation. For example, the control module can delete the transition animation to avoid the transition animation occupying the resources of the electronic device.
[0147] In the wallpaper display method of this application embodiment, a configuration image can be obtained by preprocessing the wallpaper set by the user, such that the size of the preprocessed configuration image is equal to a preset multiple of the screen size. This avoids inappropriate operations due to size mismatch and effectively solves the problem of differences between the wallpaper displayed on the screen and the wallpaper set by the user. Furthermore, when the electronic device is detected to have entered a preset state, a transition animation can be generated and played based on the configuration image, solving the problem of transition animations not being playable in some scenarios and diversifying the visual presentation methods.
[0148] See Figure 7 The diagram shown is a detailed flowchart of wallpaper enlargement processing provided in one embodiment of this application.
[0149] S701, based on the first area of the wallpaper, expand the wallpaper to obtain the first image.
[0150] The first region may include the region of the wallpaper in the first direction of the first dimension (e.g., the direction from left to right according to the width of the wallpaper) (hereinafter referred to as the "left sub-region") and the region of the wallpaper in the second direction of the first dimension (e.g., the opposite direction of the first direction, the direction from right to left according to the width of the wallpaper) (hereinafter referred to as the "right sub-region").
[0151] In one embodiment of this application, the electronic device can determine a first region based on a first direction and a second direction of a first dimension. In one example, the electronic device can determine a first dividing line parallel to the boundary of the wallpaper along the first direction and the second direction of the first dimension of the wallpaper, according to the dividing size of the first dimension, and cut the first region from the wallpaper according to the first dividing line. The dividing size of the first dimension can be determined based on a preset multiple, for example, [(k-1) / 2]W2, where k represents the preset multiple and W2 represents the size of the wallpaper in the first dimension (e.g., width). For example, the preset multiple is 1.12 times, and the dividing size of the first dimension is 0.06W2. Figure 10 As shown, the electronic device can determine two first dividing lines based on the boundary line at the top position in the first direction and the division dimension in the first dimension, and the boundary line at the top position in the second direction and the division dimension in the first dimension. The wallpaper can then be divided according to these first dividing lines to obtain the desired result. Figure 10 The first region shown.
[0152] In one embodiment of this application, the electronic device can mirror a first area of the wallpaper to obtain an expanded area. In this embodiment, the electronic device can mirror the expanded area corresponding to each first area based on the pixel values of the pixels within each first area. The pixels in the expanded area correspond to the pixels in the corresponding first area; for example, the pixel values of the pixels in the expanded area are equal to the pixel values of the pixels in the corresponding first area.
[0153] See Figure 11 The image shown is an example diagram illustrating wallpaper expansion processing according to an embodiment of this application. For example... Figure 11 As shown, the number of each pixel in the wallpaper can be determined. The pixels in the wallpaper can include pixels 1, 2, 3, ..., 48. The area formed by pixels 1, 2, 7, 8, 13, 14, 19, 20, 25, 26, 31, 32, 37, 38, 43, and 44 (e.g.) Figure 11 The area shown by the solid red line in the middle) is taken as the first region, and the region formed by pixels 5, 6, 11, 12, 17, 18, 23, 24, 29, 30, 35, 36, 41, 42, 47, and 48 (for example) Figure 11 The area shown by the red dashed line in the middle) is considered as another first region. Based on the pixel values of the pixels in the first region, the pixels outside the wallpaper boundary can be mirrored to obtain the expanded area corresponding to the first region (e.g., Figure 11 (The area shown in the purple box). For example, using pixels 1, 7, 13, 19, 25, 31, 37, and 43 at the edge of the wallpaper as reflection axes, the expanded area corresponding to the first area shown by the red solid line can be determined as the area shown in the purple solid box (for example, the area formed by pixels 2, 1, 8, 7, 14, 13, 20, 19, 26, 25, 32, 31, 38, 37, 44, and 43). Similarly, using pixels 6, 12, 18, 24, 30, 36, 42, and 48 at the edge of the wallpaper as reflection axes, the expanded area corresponding to the first area shown by the red dashed line can be determined as the area shown in the purple dashed box (for example, the area formed by pixels 6, 5, 12, 11, 18, 17, 24, 23, 30, 29, 36, 35, 42, 41, 48, and 47).
[0154] In one embodiment of this application, the electronic device stitches the wallpaper with the expanded area corresponding to the first area to obtain a first image, for example... Figure 11 The first image shown.
[0155] S702, based on the second region of the first image, the first image is expanded to obtain the second image.
[0156] The second region may include the region of the first image in a third direction of the second dimension (e.g., the direction from top to bottom according to the height of the first image) (hereinafter referred to as the "top sub-region") and / or the region of the first image in a fourth direction of the second dimension (e.g., the opposite direction of the third direction, the direction from bottom to top according to the height of the first image) (hereinafter referred to as the "bottom sub-region").
[0157] In one embodiment of this application, the electronic device can determine a second region based on a third direction in the second dimension and / or a fourth direction. In one example, the electronic device can determine a second dividing line parallel to the boundary of the first image along a third direction in the second dimension, according to a dividing size in the second dimension. The region of the first image in the third direction is then cut from the first image according to the second dividing line as the second region. The dividing size in the second dimension can be determined based on a preset multiple, for example, [(k-1) / 2]H2, where k represents the preset multiple and H2 represents the size (e.g., height) of the first image in the second dimension. For example, a preset multiple of 1.12 results in a dividing size of 0.06H2 in the second dimension. Figure 12A As shown, the electronic device can determine a second segmentation line based on the boundary line at the top position of the third dimension and the segmentation size of the second dimension, and then segment the first image according to the second segmentation line to obtain the following: Figure 12A The second region shown.
[0158] In another example, the electronic device can determine a third dividing line parallel to the boundary of the first image along the fourth direction of the second dimension, according to the segmentation size of the second dimension, and cut out the region of the first image in the fourth direction based on the third dividing line as the second region. For example... Figure 12B As shown, the electronic device can determine a third segmentation line based on the boundary point at the top position in the fourth direction and the segmentation size in the second dimension, and then segment the first image according to the third segmentation line to obtain the following: Figure 12B The second region shown.
[0159] In another example, the electronic device can define the area of the first image in the third direction and the area in the fourth direction as the second region, for example... Figure 12C The second region shown.
[0160] In one embodiment of this application, the electronic device can mirror a second region of a first image to obtain an expanded region corresponding to the second region. In this embodiment, the electronic device can mirror the expanded region corresponding to the second region based on the pixel values of the pixels within the second region. The pixels within the expanded region correspond to the pixels within the corresponding second region; for example, the pixel value of a pixel within the expanded region is the pixel value of the corresponding pixel within the second region.
[0161] For example Figure 13 The image shown is an example of an augmentation of a first image provided in an embodiment of this application. For example... Figure 13 As shown, the number of each pixel in the first image can be determined. The pixels in the first image may include pixels 2, 1, 1, 2, 3, 4, 5, 6, 6, 5, ..., 48, 48, 47. The region formed by pixels 2, 1, 1, 2, 3, 4, 5, 6, 6, 5 (e.g., ...) can be defined as... Figure 13 The area shown by the solid orange line in the middle is designated as the second region. Based on the pixel values of the pixels in the second region, the pixels outside the boundary of the first image can be mirrored to obtain the expanded region corresponding to the second region. For example, using pixels 2, 1, 1, 2, 3, 4, 5, 6, 6, 5 at the boundary of the first image as the reflection axis for mirror mapping, the expanded region corresponding to the second region can be determined as the area shown by the solid blue line.
[0162] In one embodiment of this application, the electronic device stitches together the first image and the corresponding extended region of the second region to obtain the second image, for example... Figure 13 The second image C is shown.
[0163] In another embodiment, the execution order of steps S702 and S701 can be reversed. For example, the electronic device can first determine a second region along a third direction (e.g., from top to bottom according to the height of the wallpaper) and / or a fourth direction of the second dimension of the wallpaper, and then mirror the wallpaper based on the second region to obtain a first image. The electronic device determines a first region along the first image in the first and second directions of the first dimension, and then mirrors the first image based on the first region to obtain a second image.
[0164] S703, the sharpness of the third region of the second image is adjusted to obtain the configuration image.
[0165] The third region includes the first region and its corresponding extended region, the second region and its corresponding extended region, the first region includes the left sub-region and the right sub-region, and the second region includes the top sub-region and / or the bottom sub-region.
[0166] In one embodiment of this application, the electronic device blurs the third region and adjusts the transparency of the third region to obtain a configuration image.
[0167] In the embodiments of this application, the method of blurring is not specifically limited. For example, the third region can be blurred by mean filtering or Gaussian filtering, or the third region can be blurred by a preset model. The preset model can be used to blur the image.
[0168] In this embodiment, when the third region includes the extended region corresponding to the left sub-region, the extended region corresponding to the right sub-region, and the extended region corresponding to the top sub-region, the electronic device can adjust the transparency of the extended region corresponding to the left sub-region to the left sub-region along a first direction of the first dimension of the third image (e.g., from left to right according to the image width) based on a first transparency range. The first transparency range can be set to 100%-0%. The electronic device can adjust the transparency of the extended region corresponding to the right sub-region to the right sub-region along a second direction of the first dimension of the third image (e.g., from right to left according to the image width) based on a second transparency range. The second transparency range can be set to 0%-100%. The electronic device can adjust the transparency of the extended region corresponding to the top sub-region to the top sub-region along a third direction of the second dimension of the third image (e.g., from top to bottom according to the image height) based on the first transparency range to obtain a configured image. For example... Figure 14 As shown, the third region includes the extended area corresponding to the left sub-region extending to the left sub-region, the extended area corresponding to the right sub-region extending to the right sub-region, and the extended area corresponding to the top sub-region extending to the top sub-region. By adjusting the sharpness of the third region, the following can be obtained: Figure 14 The configuration image shown.
[0169] When the third region includes the extended regions corresponding to the left sub-region, the extended regions corresponding to the right sub-region, and the extended regions corresponding to the bottom sub-region, the electronic device can adjust the transparency of the extended regions corresponding to the left sub-region to the left sub-region along a first direction of the third image, based on a first transparency range. The electronic device can adjust the transparency of the extended regions corresponding to the right sub-region to the right sub-region along a second direction of the third image, based on a second transparency range. The electronic device can also adjust the transparency of the extended regions corresponding to the bottom sub-region to the bottom sub-region along a fourth direction of the second dimension of the third image (e.g., from bottom to top of the image height) based on the first transparency range to obtain a configured image. For example... Figure 15 As shown, the third region includes the extended area corresponding to the left sub-region extending to the left sub-region, the extended area corresponding to the right sub-region extending to the right sub-region, and the extended area corresponding to the bottom sub-region extending to the bottom sub-region. By adjusting the sharpness of the third region, the following can be obtained: Figure 15 The configuration image shown.
[0170] When the third region includes the extended regions corresponding to the left and right sub-regions, the extended regions corresponding to the right and right sub-regions, the extended regions corresponding to the top and top sub-regions, and the extended regions corresponding to the bottom and bottom sub-regions, the electronic device can adjust the transparency of the extended regions corresponding to the left sub-regions to the left sub-regions along a first direction of the third image, based on a first transparency range. The electronic device can adjust the transparency of the extended regions corresponding to the right sub-regions to the right sub-regions along a second direction of the third image, based on a second transparency range. The electronic device can adjust the transparency of the extended regions corresponding to the top sub-regions to the top sub-regions along a third direction of the third image, based on the first transparency range. The electronic device can also adjust the transparency of the extended regions corresponding to the bottom sub-regions to the bottom sub-regions along a fourth direction of the third image, based on the first transparency range, to obtain a configured image. For example... Figure 16 As shown, the third region includes the extended area from the left sub-region to the left sub-region, the extended area from the right sub-region to the right sub-region, the extended area from the top sub-region to the top sub-region, and the extended area from the bottom sub-region to the bottom sub-region. By adjusting the sharpness of the third region, the following can be obtained: Figure 16 The configuration image shown.
[0171] This embodiment of the application expands the wallpaper by using a first area and the first image by using a second area, ensuring that the size of the second image is equal to a preset size. Simultaneously, by adjusting the clarity of a third area of the second image, splicing and mirroring artifacts in the configuration image are avoided, improving the imaging effect of the configuration image.
[0172] See Figure 17 The diagram shown is a partial timing illustration of a scenario with sufficient margin, provided in one embodiment of this application. In this embodiment, a scenario with sufficient margin can mean that the height of the image is greater than the height of the display screen, and the width of the image is greater than the width of the display screen. To avoid black borders appearing on the wallpaper displayed when the electronic device is in a screen-off state, in this embodiment, a scenario with sufficient margin can mean that the size of the wallpaper is greater than or equal to a preset size.
[0173] S1701, in response to a user's action to change the lock screen wallpaper, the control module in the electronic device adjusts the wallpaper size to a preset size.
[0174] In one embodiment of this application, to personalize wallpaper presentation, the electronic device can provide a wallpaper settings interface where users can perform user operations. For example, in the lock screen state, pinching the wallpaper with two fingers enters the wallpaper settings interface, which displays a lock screen wallpaper display area and related functional controls for editing the lock screen wallpaper. These functional controls may include application controls and image change controls. Application controls can be used to apply the editing operations already performed in the wallpaper settings interface. Image change controls can be used to change the current wallpaper to another image. Alternatively, users can also enter the wallpaper settings interface using any of the following operations: double-tap, long-press, swipe along a set trajectory, single-tap, or triple-tap.
[0175] In another embodiment, in response to a user's setting operation for the lock screen wallpaper, the control module in the electronic device can adjust the size of the wallpaper to a preset size.
[0176] In one embodiment of this application, the preset size can represent a preset multiple of the display screen size. The preset multiple can be set and adjusted according to actual needs; for example, the preset multiple can be set to 1.12. When the wallpaper size is greater than or equal to the preset size, the control module can crop an image with the preset size from the wallpaper as a configuration image. The method by which the control module obtains the configuration image from the wallpaper can be found in [reference needed]. Figure 5 Description of step S4012.
[0177] S1702, Get the changed wallpaper.
[0178] S1703, Construct image display resources.
[0179] In one embodiment of this application, in order for the view module to accurately display the wallpaper, the control module can call the ImageView component to adjust the display attributes of the changed wallpaper when constructing the image display resource. These display attributes may include, but are not limited to, the scaleType attribute and the alpha attribute. The scaleType attribute is used to set the scaling and cropping methods of the wallpaper, and the alpha attribute is used to set the transparency. When constructing the image display resource, the control module can also set the format of the changed wallpaper to a preset format. The preset format can be a non-bitmap format, for example, including but not limited to: Joint Photographic Experts Group (JPEG), Portable Network Graphics (PNG), or TagImage File Format (TIFF).
[0180] S1704, temporarily save the image to the cache.
[0181] In one embodiment of this application, the image in step S1704 can be... Figure 4 To reduce the number of image loading operations, the control module can send images to a cache for storage. When sending an image to the cache, the control module can also send the corresponding bitmap to the cache for storage.
[0182] S1705, Send a notification to the view module of the electronic device.
[0183] In one embodiment of this application, after an image is successfully stored in the cache, the control module can send a notification to the view module, which indicates that the image has been successfully stored in the cache.
[0184] See Figure 18 The image shown is a partial timing diagram of a zero-margin scene according to an embodiment of this application. In this embodiment, a zero-margin scene can mean that the height of the image is less than or equal to the height of the display screen, or the width of the image is less than or equal to the width of the display screen.
[0185] S1801, in response to a user operation to change the lock screen wallpaper, the control module in the electronic device obtains the changed wallpaper.
[0186] In one embodiment of this application, to personalize the wallpaper, the electronic device can provide a wallpaper settings interface, where the user can change and / or set the lock screen wallpaper. When the control module detects that the user has changed the lock screen wallpaper, it can obtain the changed wallpaper.
[0187] S1802, Construct image display resources.
[0188] In one embodiment of this application, the method by which the control module constructs image display resources can refer to... Figure 17 Description of step S1703.
[0189] S1803, construct map expansion resources and initialize map expansion nodes.
[0190] In one embodiment of this application, when constructing expanded image resources, the control module can convert images into bitmaps and set parameters required for expanded image creation based on user needs, such as expansion ratio and orientation.
[0191] In one embodiment of this application, the image expansion node encapsulates an algorithm for image expansion processing. Before calling the image expansion node to perform image expansion processing, the control module can initialize the image expansion node.
[0192] S1804 transmits data and callbacks to the mapping module in the electronic device.
[0193] In one embodiment of this application, when the control module transmits data to the image expansion module, it can send the storage path of the changed wallpaper and the parameters required for image expansion to the image expansion module.
[0194] In one embodiment of this application, after the control module generates a callback function, the callback function can be transmitted to the image expansion module, and the callback function can be registered in the image expansion module. The callback function of the image expansion module can execute a callback operation and enter the callback process. During the callback, the image obtained by the image expansion module can be sent back to the control module through callback data. Each callback can be considered as a consumption behavior in the producer-consumer model.
[0195] A producer-consumer pattern can be established between the control module and the image expansion module. The control module first initiates production by inputting the image's storage address into the image expansion module. This causes the expansion nodes in the expansion module to execute production asynchronously, starting an asynchronous, engineered image expansion process. After the expansion nodes complete their corresponding production operations (image processing operations), the generated images are then consumed (i.e., a callback occurs). This decouples the producer and consumer, resolving the issue of an overly close relationship between them and mitigating data blocking under high concurrency.
[0196] S1805, the image expansion module performs mirror image supplementation based on the first and second regions of the image.
[0197] In one embodiment of this application, the first region may include a left sub-region and a right sub-region of the image. The method by which the image expansion module performs mirroring based on the first region of the image can be referred to... Figure 7 The relevant description of step S701 is provided below. The second region may include the top sub-region of the image and / or the bottom sub-region of the image. The method by which the image expansion module performs mirroring based on the second region of the image can be found in [reference needed]. Figure 7 Description of step S702.
[0198] S1806, blur the third region of the image.
[0199] In one embodiment of this application, the third region includes a first region and its corresponding extended region, and a second region and its corresponding extended region. The method by which the image expansion module blurs the third region of the image can be referred to... Figure 7 Description of step S703.
[0200] S1807, Adjust the transparency of the third area.
[0201] In one embodiment of this application, the method by which the image expansion module adjusts the transparency of the third region can be referred to Figure 7 Description of step S703.
[0202] S1808, temporarily save the image to the cache in the electronic device.
[0203] In one embodiment of this application, the image in step S1808 can be... Figure 4 The configuration image is set to a size that is a preset multiple of the display screen size. To avoid repeatedly performing image expansion operations, the control module can send the bitmap corresponding to the image to a cache for storage.
[0204] S1809, return a notification to the control module that the map expansion is complete.
[0205] In one embodiment of this application, after the mapping expansion module completes the mapping expansion operation, the mapping expansion module can send a notification to the control module that the mapping expansion is complete.
[0206] S1810, the control module reads the image from the cache.
[0207] In one embodiment of this application, the control module can read an image from the cache based on the image's storage address.
[0208] S1811, Send a notification to the view module of the electronic device.
[0209] In one embodiment of this application, after successfully reading the configuration image, the control module can send a notification to the view module, which indicates that the image has been successfully stored in the cache.
[0210] See Figure 19 The figure shown is a partial timing diagram of a zero margin scenario provided in another embodiment of this application.
[0211] S1901, in response to the user's power-on operation, the control module in the electronic device loads the wallpaper.
[0212] In one embodiment of this application, in response to a user's power-on operation, the control module can load wallpapers from a preset directory, wherein the preset directory can store user-set custom wallpapers.
[0213] S1902, Construct image display resources.
[0214] S1903, construct map expansion resources and initialize map expansion nodes.
[0215] S1904 transmits data and callbacks to the mapping module in the electronic device.
[0216] S1905, the image expansion module performs mirror image supplementation based on the first and second regions of the image.
[0217] S1906, blur the third region of the image.
[0218] S1907, Adjust the transparency of the third area.
[0219] S1908, temporarily save the image to the cache in the electronic device.
[0220] S1909, return a notification to the control module that the map expansion is complete.
[0221] S1910, the control module reads the image from the cache.
[0222] S1911, Send a notification to the view module of the electronic device.
[0223] For details on steps S1902-S1911, please refer to the above text. Figure 18 The detailed description of steps S1802-S1811 is not repeated here.
[0224] See Figure 20 The diagram shown is a partial timing diagram of a wallpaper display method provided in another embodiment of this application.
[0225] S2001, in response to a trigger operation that causes the electronic device to enter a preset state, the control module in the electronic device acquires the wallpaper display layer.
[0226] In one embodiment of this application, the triggering operation may include, but is not limited to, a user pressing the power button, a user voice command responding to the power button press, etc. When the electronic device is detected to have entered a preset state, the control module can acquire the wallpaper display layer, which can be used to display the wallpaper. The wallpaper display layer is typically at the bottom layer of all visible elements and can provide a background image for the entire interface.
[0227] S2002: Retrieve the current wallpaper from the electronic device's cache.
[0228] In one embodiment of this application, the current wallpaper obtained by the control module can be... Figure 4 The configuration image in the file.
[0229] S2003, the control module sets the initial scaling ratio and the end scaling ratio.
[0230] In one embodiment of this application, both the initial scaling ratio and the final scaling ratio are values greater than 1. The initial scaling ratio and the final scaling ratio can be set and adjusted according to actual needs. The initial scaling ratio can be greater than the final scaling ratio. For example, the initial scaling ratio can be set to 1.12 and the final scaling ratio can be set to 1.06.
[0231] S2004 generates transition animations.
[0232] In one embodiment of this application, when the electronic device is detected to have entered a screen-off state, the control module generates a transition animation corresponding to the screen-off state based on a configuration image. When the electronic device is detected to have entered a screen-locked state, the control module generates a transition animation corresponding to the screen-locked state based on a configuration image.
[0233] For details of step S2004, please refer to the above text. Figure 4 The detailed description of step S404 is provided in the previous section and will not be repeated here.
[0234] S2005, View module for sending transition animations to electronic devices.
[0235] In one embodiment of this application, in order to play a transition animation on the display screen, the control module can send the transition animation to the view module for display.
[0236] S2006, the view module sends a notification message to the control module indicating that playback has been completed.
[0237] In one embodiment of this application, after the transition animation has finished playing, the view module sends a notification message to the control module indicating that the playback has been completed, so as to prompt the control module that the transition animation can be released.
[0238] S2007, control module releases transition animation.
[0239] In one embodiment of this application, in order to avoid the transition animation occupying the storage space of the electronic device, the control module can release the transition animation, for example, the control module deletes the transition animation.
[0240] Figure 21 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application. (Reference) Figure 21The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a 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.
[0241] It is understood that the structures illustrated in the embodiments of the present invention 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.
[0242] The processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU).
[0243] 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.
[0244] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I1C) 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.
[0245] The I1C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). The I2S interface can be used for audio communication. The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality.
[0246] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0247] The GPIO interface is configurable via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I1C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0248] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices 100, such as AR devices.
[0249] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention 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.
[0250] The charging management module 140 receives charging input from a charger, which can be either a wireless or wired charger. 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, display screen 194, camera 193, and wireless communication module 160, among other components. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance).
[0251] 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.
[0252] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
[0253] 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.
[0254] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR).
[0255] Electronic device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor that provides error alerts and connects 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.
[0256] 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), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0257] In some embodiments, the electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. The electronic device 100 may implement the shooting function through an ISP, a camera 193, a video codec, a GPU, displays 194, and an application processor, etc.
[0258] Camera 193 is used to capture still images or videos. An object passes through the lens to generate an optical image that is projected onto a photosensitive element.
[0259] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0260] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0261] 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.
[0262] 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. Audio module 170 can also be used for encoding and decoding audio signals.
[0263] Speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music or make hands-free calls through speaker 170A. Receiver 170B, also known as a "handpiece," is used to convert audio electrical signals into sound signals. When electronic device 100 answers a phone call or voice message, the receiver 170B can be brought close to the user's ear to hear the voice. Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 can have at least one microphone 170C. In some embodiments, electronic device 100 can have two microphones 170C, which, in addition to collecting sound signals, can also achieve noise reduction. In other embodiments, electronic device 100 can also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and achieve directional recording functions, etc.
[0264] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0265] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. Gyroscope sensor 180B can be used to determine the motion posture of electronic device 100. Barometric pressure sensor 180C is used to measure air pressure. Magnetic sensor 180D includes a Hall sensor. Electronic device 100 can use magnetic sensor 180D to detect the opening and closing of the flip cover. Accelerometer sensor 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes). Distance sensor 180F is used to measure distance. Proximity sensor 180G may include, for example, a light-emitting diode (LED) and a photodetector, such as a photodiode. Ambient light sensor 180L is used to sense ambient light intensity. Fingerprint sensor 180H is used to collect fingerprints. Temperature sensor 180J is used to detect temperature. Touch sensor 180K, also called a "touch device". Touch sensor 180K can be set on display screen 194, and touch sensor 180K and display screen 194 form a touch screen, also called a "touchscreen". The bone conduction sensor 180M can acquire vibration signals.
[0266] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Motor 191 can generate vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, and also to indicate messages, missed calls, notifications, etc.
[0267] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple SIM cards can be inserted into the same SIM card interface 195 simultaneously. The types of multiple SIM cards can be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0268] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on the electronic device 100, the electronic device 100 performs the aforementioned related method steps to implement the wallpaper display method in the above embodiment.
[0269] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the wallpaper display method in the above embodiment.
[0270] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the wallpaper display method in the above-described method embodiments.
[0271] In this embodiment, the electronic device, computer storage medium, computer program product, or chip are all used to execute the corresponding methods described above. Therefore, the beneficial effects they achieve can be referred to the beneficial effects in the corresponding methods described above, and will not be repeated here. Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above 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.
[0272] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may be one physical unit or multiple physical units, i.e., they may be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0273] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as 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 embodiments of this application, in essence, 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. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0274] Finally, it should be noted that the above 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A wallpaper display method, applied to an electronic device, characterized in that, The electronic device includes a display screen, and the method includes: When the electronic device enters a preset state, a transition animation is generated based on a configuration image. The configuration image is obtained by preprocessing the wallpaper set by the user, and the size of the configuration image is equal to a preset multiple of the size of the display screen. The transition animation is played on the display screen.
2. The method of claim 1, wherein, The method further includes: After the transition animation finishes playing, the last image frame of the transition animation is displayed in a freeze frame. The last image frame is the lock screen wallpaper or the always-on wallpaper determined based on the wallpaper.
3. The method of claim 1, wherein, The method further includes: In response to user operation, the wallpaper is preprocessed according to its size and a preset size to obtain the configured image, wherein the preset size is a preset multiple of the screen size; The configuration image is stored in the cache of the electronic device.
4. The method of claim 3, wherein, The user operations include any one of the following: powering on, setting wallpaper, and changing wallpaper.
5. The method of claim 3, wherein, The preprocessing of the wallpaper includes: If the size of the wallpaper is greater than or equal to the preset size, the configuration image is cropped from the wallpaper according to the preset size.
6. The method of claim 5, wherein, The step of cropping the configuration image from the wallpaper according to the preset size includes: Using a specified pixel point of the wallpaper as the reference pixel point of the configuration image, an image with the preset size is cropped from the wallpaper as the configuration image.
7. The method of claim 6, wherein, The specified pixel point includes the midpoint of the lower boundary of the wallpaper, or the midpoint of the upper boundary of the wallpaper, or the center point of the wallpaper.
8. The method of claim 3, wherein, The preprocessing of the wallpaper includes: If the size of the wallpaper is smaller than the preset size but greater than or equal to the size of the display screen, the wallpaper is enlarged to obtain the configured image.
9. The method of claim 8, wherein, The image enlargement process performed on the wallpaper includes: Based on the first area of the wallpaper, the wallpaper is expanded to obtain a first image; Based on the second region of the first image, the first image is augmented to obtain the second image; The clarity of the third region of the second image is adjusted to obtain the configured image.
10. The method of claim 9, wherein, The step of adjusting the sharpness of the third region of the second image to obtain the configured image includes: The third region of the second image is blurred, and the transparency of the third region is adjusted to obtain the configuration image.
11. The method of claim 3, wherein, The preprocessing of the wallpaper includes: When the size of the wallpaper is smaller than the size of the display screen, the wallpaper is enlarged based on the size of the display screen to obtain an enlarged image; The magnified image is subjected to image enlargement processing to obtain the configuration image.
12. The method of claim 11, wherein, The enlargement process performed on the wallpaper includes: A first ratio is determined based on the width of the wallpaper and the width of the display screen, and a second ratio is determined based on the height of the wallpaper and the height of the display screen; The smaller ratio between the first ratio and the second ratio is determined as the target ratio, and the magnification is determined based on the target ratio; The wallpaper is magnified using the magnification factor to obtain the magnified image.
13. The method of claim 1, wherein, The generation of transition animations based on configuration images includes: Based on multiple reduction ratios in the first preset interval, the configured image is reduced in size to obtain a third image corresponding to each reduction ratio; Based on the size of the display screen, each third image is cropped to obtain multiple image frames; The transition animation is generated based on the sorting of the multiple reduction ratios and the multiple image frames.
14. The method according to claim 13, characterized in that, The cropping performed on each third image includes: Using a preset pixel point of each third image as the reference pixel point of the corresponding image frame, and based on the size of the display screen, the cropping area is determined from each third image; The image containing the corresponding cropped area is cropped from each third image to obtain the plurality of image frames.
15. The method of claim 13, wherein, If the preset state is a screen-off state, generating the transition animation based on the plurality of image frames includes: Based on the multiple image frames in ascending order of the scaling ratio, a transition animation corresponding to the screen-off state is generated.
16. The method of claim 13, wherein, If the preset state is a locked screen state, generating the transition animation based on the plurality of image frames includes: Based on the plurality of image frames in descending order of scaling ratio, a transition animation corresponding to the lock screen state is generated.
17. An electronic device, comprising: include: Memory, which stores computer-readable instructions; A processor that executes the computer-readable instructions to implement the wallpaper display method as described in any one of claims 1 to 16.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions that are executed by a processor in an electronic device to implement the wallpaper display method as described in any one of claims 1 to 16.