CN117762545A - Wallpaper processing method and device, storage medium and electronic equipment - Google Patents

Wallpaper processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117762545A
CN117762545A CN202311786854.2A CN202311786854A CN117762545A CN 117762545 A CN117762545 A CN 117762545A CN 202311786854 A CN202311786854 A CN 202311786854A CN 117762545 A CN117762545 A CN 117762545A
Authority
CN
China
Prior art keywords
wallpaper
bit depth
target
bitmap
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311786854.2A
Other languages
Chinese (zh)
Inventor
顾益双
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202311786854.2A priority Critical patent/CN117762545A/en
Publication of CN117762545A publication Critical patent/CN117762545A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the application discloses a wallpaper processing method, a wallpaper processing device, a storage medium and electronic equipment, wherein the method comprises the following steps: in response to wallpaper setting operation aiming at a target picture, determining a target image bit depth parameter corresponding to the target picture, wherein the target image bit depth parameter is larger than a default wallpaper bit depth parameter, acquiring equipment image bit depth processing parameters, determining a wallpaper bitmap setting mode aiming at the target picture based on the target image bit depth parameter and the equipment image bit depth processing parameters, acquiring target bitmap data of the target picture based on the wallpaper bitmap setting mode, and performing wallpaper setting processing based on the target bitmap data.

Description

Wallpaper processing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a wallpaper processing method, a wallpaper processing device, a storage medium, and an electronic device.
Background
Along with the rapid popularization of the terminal, a user can switch the wallpaper of the terminal according to personal preference, when the wallpaper is switched, the user selects a proper picture, then a certain picture is used as the wallpaper in the wallpaper management application, generally, the user can select the picture to set the wallpaper, and after the setting is completed, the terminal displays the wallpaper so as to meet the practical wallpaper use requirement of the user.
Disclosure of Invention
The embodiment of the application provides a wallpaper processing method, a wallpaper processing device, a storage medium and electronic equipment, wherein the technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a wallpaper processing method, where the method includes:
determining a target image bit depth parameter corresponding to a target picture in response to wallpaper setting operation for the target picture, wherein the target image bit depth parameter is greater than a default wallpaper bit depth parameter;
acquiring a device image bit depth processing parameter, and determining a wallpaper bitmap setting mode aiming at the target picture based on the target image bit depth parameter and the device image bit depth processing parameter;
and acquiring target bitmap data of the target picture based on the wallpaper bitmap setting mode, and performing wallpaper setting processing based on the target bitmap data.
In a second aspect, embodiments of the present application provide a wallpaper processing device, the device including:
the parameter determining module is used for determining a target image bit depth parameter corresponding to a target picture in response to wallpaper setting operation aiming at the target picture, wherein the target image bit depth parameter is larger than a default wallpaper bit depth parameter;
the bitmap setting module is used for acquiring the device image depth processing parameters and determining a wallpaper bitmap setting mode aiming at the target picture based on the target image depth processing parameters and the device image depth processing parameters;
And the wallpaper setting module is used for acquiring target bitmap data of the target picture based on the wallpaper bitmap setting mode and performing wallpaper setting processing based on the target bitmap data.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a fourth aspect, embodiments of the present application provide an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by some embodiments of the present application has the beneficial effects that at least includes:
in one or more embodiments of the present disclosure, a terminal determines, in response to a wallpaper setting operation of a user for a target picture, a target image bit depth parameter corresponding to the target picture, where the target image bit depth parameter is greater than a default wallpaper bit depth parameter, and is not directly set by a default wallpaper bit depth parameter corresponding to wallpaper management in a related technology, but further determines, by acquiring an apparatus image bit depth processing parameter, a wallpaper bitmap setting mode for the target picture based on the target image bit depth parameter and the apparatus image bit depth processing parameter, an image bit depth processing capability of terminal hardware can be determined by the apparatus image bit depth processing parameter, and then the wallpaper bitmap setting mode of the target picture can be reasonably determined, and then target bitmap data of the target picture is acquired, and wallpaper setting processing is performed based on the target bitmap data, so that an image accuracy of wallpaper is set in combination with an actual image bit depth supporting capability of terminal equipment is achieved, and an image accuracy of wallpaper is dynamically selected under a condition that the terminal equipment supports high bit depth image processing capability is ensured, and an image display effect is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a wallpaper processing method according to an embodiment of the present application;
fig. 2 is a schematic view of a wallpaper setting according to an embodiment of the present application;
FIG. 3 is a flow chart of another wallpaper processing method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a wallpaper processing device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a bitmap setting module provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a wallpaper setting module 13 according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an operating system and user space provided by an embodiment of the present application;
FIG. 9 is an architecture diagram of the android operating system of FIG. 8;
FIG. 10 is an architecture diagram of the IOS operating system of FIG. 8.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is to be understood that the terms "comprise" and "have," and any variations thereof, are intended to cover non-exclusive inclusions, unless otherwise specifically defined and defined. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art in a specific context. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The present application is described in detail with reference to specific examples.
In one embodiment, as shown in fig. 1, a wallpaper processing method is proposed, which may be implemented in dependence on a computer program, and may be run on a wallpaper processing device based on von neumann system. The computer program may be integrated in the application or may run as a stand-alone tool class application. The wallpaper handling device may be a terminal device including, but not limited to: personal computers, tablet computers, handheld devices, vehicle mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and the like. Terminal devices in different networks may be called different names, for example: a user equipment, an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent or user equipment, a cellular telephone, a cordless telephone, a terminal device in a 5G network or a future evolution network, etc.
Specifically, the wallpaper processing method comprises the following steps:
s102: determining a target image bit depth parameter corresponding to a target picture in response to wallpaper setting operation for the target picture, wherein the target image bit depth parameter is greater than a default wallpaper bit depth parameter;
The user of the terminal can change the wallpaper of the terminal according to the preference of the user, and the wallpaper comprises screen locking wallpaper, desktop wallpaper and the like;
in practical application, the user can select the reference wallpaper in the wallpaper library as the wallpaper of the terminal, the user can also use the daily interest picture as the wallpaper of the terminal, the source of the interest picture can be other than the wallpaper library, and the source of the interest picture can be a network, an album and the like. For example, the terminal may support the user to capture a deep map interest picture via the camera and may support setting the interest picture as wallpaper.
Further, for the terminal, the terminal wallpaper management application (or wallpaper management service) corresponds to a default wallpaper bit depth parameter, that is, supports setting a picture with the default wallpaper bit depth parameter as the terminal wallpaper. For example, the default wallpaper bit depth parameter (also referred to as wallpaper bit depth 0) may be 8 bits, and the target image bit depth parameter (e.g. 10 bits) of the target picture selected by the user may be greater than the default wallpaper bit depth parameter, when the user selects to set the target picture as the wallpaper, according to the related art, the target picture of the target image bit depth parameter is subjected to picture format conversion, the target picture is converted into the wallpaper picture of the default wallpaper bit depth parameter to perform wallpaper setting, e.g. the target picture of the target image bit depth parameter in 10 bits heif format is converted into the default wallpaper bit depth parameter in 8 bits of other image formats (e.g. 8 bits of PNG or jpeg format), which does not consider the actual image bit depth supporting capability of the terminal device, and adopting such a single wallpaper setting with the default wallpaper bit depth parameter may affect image accuracy, so as to reduce the image display effect.
Specifically, the user can enter a wallpaper management application in the terminal to select a target picture to input wallpaper setting operation, the terminal is instructed to set the target picture as terminal wallpaper of the terminal, the wallpaper management application can display all wallpapers in a wallpaper database and can support the user to upload custom pictures, and the target picture can be the wallpaper in the wallpaper database or the custom picture uploaded by the user.
Specifically, the user can select a target picture to be set as the wallpaper of the terminal by adopting wallpaper setting operations such as double click, long press, voice command and the like, and after the terminal detects the wallpaper setting operation for the target picture, the terminal responds to the wallpaper setting operation to determine the target image bit depth parameter of the target picture selected by the user.
As shown in fig. 2, fig. 2 is an exemplary scenario diagram of a wallpaper setting, in fig. 2, a user may enter a wallpaper management application in a terminal to select a target picture as a wallpaper for wallpaper preview, start decoding target picture data through the wallpaper management application, create a format decoder by the wallpaper management application, for example, the target picture is a target picture in a target picture bit depth parameter 10bit heif format, create the heif format decoder, decode the target picture data using the heif format decoder, and return the decoded target picture data to the wallpaper management application, the wallpaper management application displays the target picture wallpaper effect to the user on a terminal screen, and the user may input a wallpaper setting operation for the target picture in the wallpaper management application in the terminal to instruct the terminal to confirm that the target picture is set as the terminal wallpaper of the terminal.
S104: acquiring a device image bit depth processing parameter, and determining a wallpaper bitmap setting mode aiming at the target picture based on the target image bit depth parameter and the device image bit depth processing parameter;
the bit depth parameter of an image object may also be referred to as the (pixel) bit depth (bit depth), the color depth, referring to the number of bits used to store each pixel of the image object. The larger the bit depth of an image object, the more colors it uses, and the wider the color range. For example, a 1-bit image has only 2 colors (black and white), a 3-bit image has 2^3 =8 colors, an 8-bit image has 2^8 =256 colors, a 16-bit image has 2≡16=65536 colors, and so on.
For the wallpaper management application of the terminal, the wallpaper management application corresponds to a default wallpaper bit depth parameter, and generally, the wallpaper management application performs wallpaper setting on a picture to be set in a wallpaper bit depth setting format smaller than or equal to the default wallpaper bit depth parameter; in the specification, in order to ensure the wallpaper effect of picture setting, a terminal obtains a device image bit depth processing parameter, and in a scene that a target image bit depth parameter is larger than a default wallpaper bit depth parameter, whether the device image bit depth processing parameter supports or is compatible with the target image bit depth parameter is compared, so that a wallpaper bitmap setting mode aiming at the target picture is determined;
The device image depth processing parameter may be a screen display depth processing parameter (may be referred to as a maximum bit depth supported by a screen display or a default bit depth of a screen), and may be a processor rendering depth processing parameter (may be referred to as a maximum bit depth supported by a processor image rendering or a default bit depth of a processor);
optionally, if the device image bit depth processing parameter supports or is compatible with the target image bit depth parameter (e.g. 10 bit), the wallpaper bitmap setting mode corresponding to the target image bit depth parameter (e.g. 10 bit) may be directly determined, so as to set the wallpaper of the target image based on the target image bit depth parameter, and after the wallpaper corresponding to the target image is set, the displayed wallpaper is the target image bit depth parameter (e.g. 10 bit);
optionally, if the device image bit depth processing parameter does not support or is not compatible with the target image bit depth parameter (e.g. 10 bit), determining a wallpaper bitmap setting mode corresponding to a default wallpaper bit depth parameter (e.g. 8 bit) to set wallpaper of the target image based on the default wallpaper bit depth parameter, and after the wallpaper corresponding to the target image is set, displaying wallpaper as the default wallpaper bit depth parameter (e.g. 8 bit);
s106: and acquiring target bitmap data of the target picture based on the wallpaper bitmap setting mode, and performing wallpaper setting processing based on the target bitmap data.
Specifically, after determining a wallpaper bitmap setting mode, the terminal acquires target bitmap data corresponding to the target picture, wherein the target bitmap data is obtained after encoding the target picture according to the determined current image bit depth parameters (indicated by the wallpaper bitmap setting mode) according to the wallpaper bitmap setting mode, and then the terminal uses the target bitmap data to perform wallpaper setting processing on terminal wallpapers (screen locking wallpapers, desktop wallpapers, application window wallpapers and the like).
In one or more embodiments of the present disclosure, a terminal determines, in response to a wallpaper setting operation of a user for a target picture, a target image bit depth parameter corresponding to the target picture, where the target image bit depth parameter is greater than a default wallpaper bit depth parameter, and is not directly set by a default wallpaper bit depth parameter corresponding to wallpaper management in a related technology, but further determines, by acquiring an apparatus image bit depth processing parameter, a wallpaper bitmap setting mode for the target picture based on the target image bit depth parameter and the apparatus image bit depth processing parameter, an image bit depth processing capability of terminal hardware can be determined by the apparatus image bit depth processing parameter, and then the wallpaper bitmap setting mode of the target picture can be reasonably determined, and then target bitmap data of the target picture is acquired, and wallpaper setting processing is performed based on the target bitmap data, so that an image accuracy of wallpaper is set in combination with an actual image bit depth supporting capability of terminal equipment is achieved, and an image accuracy of wallpaper is dynamically selected under a condition that the terminal equipment supports high bit depth image processing capability is ensured, and an image display effect is ensured.
Referring to fig. 3, fig. 3 is a schematic diagram of a wallpaper process according to the present application. The specific reference is as follows:
s1000: determining a target image bit depth parameter corresponding to a target picture in response to wallpaper setting operation aiming at the target picture, and acquiring an equipment image bit depth parameter; the target image bit depth parameter is larger than the default wallpaper bit depth parameter;
reference may be made specifically to the method steps of other embodiments of the present disclosure, and details are not repeated here.
S1002: performing equipment bit depth compatibility detection on the target image bit depth parameter and the equipment image bit depth processing parameter to obtain a bit depth compatibility detection result;
according to some embodiments, the device image depth processing parameter may be a screen display depth processing parameter (which may be referred to as a maximum bit depth supported by a screen display or a screen default bit depth), and may be a processor rendering depth processing parameter (which may be referred to as a maximum bit depth supported by a processor image rendering or a processor default bit depth);
in a possible implementation, the terminal may compare the on-screen display bit depth processing parameter with the target image bit depth parameter as follows:
specifically: acquiring screen display bit depth processing parameters in the equipment image bit depth processing parameters;
If the bit depth parameter of the target image is smaller than or equal to the screen display bit depth processing parameter, generating a bit depth compatibility detection result of the equipment compatibility type;
if the target image bit depth parameter is larger than the screen display bit depth processing parameter, generating a bit depth compatibility detection result of an equipment incompatibility type;
in one possible implementation, the terminal may compare the processor rendering bit depth processing parameter with the target image bit depth parameter as follows:
specifically: the terminal acquires processor rendering deep processing parameters in the equipment image deep processing parameters;
if the bit depth parameter of the target image is smaller than or equal to the rendering bit depth processing parameter of the processor, generating a bit depth compatibility detection result of the equipment compatibility type;
if the bit depth parameter of the target image is larger than the rendering bit depth processing parameter of the processor, generating a bit depth compatibility detection result of an equipment incompatibility type;
in one possible implementation, the terminal may compare the processor rendering bit depth processing parameter with the target image bit depth parameter, and compare the screen display bit depth processing parameter with the target image bit depth parameter as follows:
specifically: acquiring screen display bit depth processing parameters and processor rendering bit depth processing parameters in the equipment image bit depth processing parameters;
If the target image bit depth parameter is smaller than or equal to the screen display bit depth processing parameter and the target image bit depth parameter is smaller than or equal to the processor rendering bit depth processing parameter, generating a bit depth compatibility detection result of the equipment compatibility type;
and if the target image bit depth parameter is greater than the screen display bit depth processing parameter and/or the target image bit depth parameter is greater than the processor rendering bit depth processing parameter, generating a bit depth compatibility detection result of an equipment incompatibility type.
S1004: if the bit depth compatibility detection result is of a device compatibility type, acquiring a first wallpaper bitmap setting mode corresponding to the target image bit depth parameter, and taking the first wallpaper bitmap setting mode as a wallpaper bitmap setting mode for the target image;
if the bit depth compatibility detection result is of a device compatibility type, at the moment, terminal device hardware can support a target picture displaying high image bit depth parameters, a first wallpaper bitmap setting mode corresponding to the target image bit depth parameters is obtained, and the first wallpaper bitmap setting mode is used as a wallpaper bitmap setting mode for the target picture;
the first wallpaper bitmap setting mode is used for indicating the terminal to process the target picture by the target image bit depth parameter, and then generating corresponding format bitmap data corresponding to the target image bit depth parameter (if the target image bit depth parameter is 10 bits, the first wallpaper bitmap setting mode can be used for indicating to generate a corresponding 10-bit heic coding format file);
S1006: and if the bit depth compatibility detection result is a device incompatibility type, acquiring a second wallpaper bitmap setting mode corresponding to the default wallpaper bit depth parameter, and taking the second wallpaper bitmap setting mode as a wallpaper bitmap setting mode aiming at the target picture.
If the bit depth compatibility detection result is of an equipment incompatibility type, at the moment, terminal equipment hardware does not support a target picture displaying high image bit depth parameters, a second wallpaper bitmap setting mode corresponding to default wallpaper bit depth parameters is obtained, and the second wallpaper bitmap setting mode is used as a wallpaper bitmap setting mode for the target picture;
the second wallpaper bitmap setting mode is used for indicating the terminal to process the target picture by using the default wallpaper bit depth parameter, and then generating corresponding format bitmap data corresponding to the default wallpaper bit depth parameter (if the target image bit depth parameter is 8 bits, the second wallpaper bitmap setting mode can be used for indicating to generate PNG or JPEG coding format files corresponding to 8 bits);
s1008: if the wallpaper bitmap setting mode is a first wallpaper bitmap setting mode corresponding to the target image bit depth parameter, performing bitmap encoding processing on the target image based on the target image bit depth parameter to obtain a first bitmap format file, and controlling a wallpaper service to decode the first bitmap format file to obtain first target bitmap data;
For example, if the wallpaper bitmap setting mode is a heic wallpaper bitmap setting mode corresponding to the target image bit depth parameter 10bit, using a heic encoding format corresponding to the target image bit depth parameter 10bit, and performing bitmap encoding processing on the target image by the wallpaper management application to obtain a first bitmap format file, where the first bitmap format file may be a heic bitmap format file; and subsequently, in the wallpaper service for performing bottom wallpaper treatment, the terminal controls the wallpaper service to perform bitmap decoding on the heic bitmap format file to obtain first target bitmap data, so that the wallpaper service can conveniently read the first target bitmap data to perform wallpaper display.
In a possible implementation manner, the terminal performs bitmap encoding processing on the target picture based on the target image bit depth parameter to obtain the first bitmap format file, which may be as follows:
creating a target bit depth image encoder corresponding to the target image bit depth parameter, performing bitmap encoding processing on the target picture by adopting the target bit depth image encoder to obtain a first bitmap format file, and writing the first bitmap format file into a wallpaper file handle;
illustratively, for wallpaper management application of the terminal, image coding of default image bit depth parameters is supported, for example, 8 bits, and at the moment, a target bit depth image encoder (for example, 10 bits) is larger than the default image bit depth parameters, the terminal can create a target bit depth image encoder corresponding to the target image bit depth parameters, and the target bit depth image encoder is adopted to perform bitmap coding processing on a target picture to obtain a first bitmap format file, and the first bitmap format file is written into a wallpaper file handle associated with wallpaper service; for example, the target bit depth image encoder is a 10bit-heif encoder, and the 10bit-heif encoder is used for encoding the target picture in RGBA_1010102 format to obtain a first bitmap format file, and the first bitmap format file is written into a wallpaper file handle fd_wallpaper of the wallpaper service cache file;
The wallpaper file handle may be understood as a digital identifier for identifying the wallpaper file returned to the wallpaper service by the operating system after the first bitmap format file is obtained by calling the operating system function when the wallpaper is set. This handle is unique for identifying and manipulating a particular wallpaper file in the wallpaper service. By using the handle, the wallpaper management application can control wallpaper service (such as static wallpaper service) to read, write, modify and the like on the wallpaper file, thereby realizing the wallpaper setting and management functions.
In one possible implementation, the following is a definition of the wallpaper service bitmap decoding process based on the wallpaper file handle, specifically: the wallpaper service is controlled to decode the first bitmap format file to obtain first target bitmap data, and the following manner can be implemented:
the terminal controls the wallpaper service to acquire a bitmap format file from the wallpaper file handle, and performs file format identification on a file header field corresponding to the bitmap format file;
if the file header field is of a first bitmap format file type, a target bit depth image decoder corresponding to the target image bit depth parameter is created;
Calling a target bit depth image decoder to perform bitmap decoding processing on the first bitmap format file to obtain first target bitmap data;
schematic representation:
the first bitmap format file type is namely a map format file type corresponding to the target image bit depth parameter, if the target image bit depth parameter is 10 bits, the first bitmap format file type is a heic coding format corresponding to 10 bits;
for example, the wallpaper service is controlled to read a bitmap format file from the wallpaper file handle, read the ftyp field of the file header, determine whether the ftyp field is a heic identifier, that is, whether the file header field is a first bitmap format file type, and determine that the file header field is the first bitmap format file type; if the ftyp field of the file header is the heic identifier, a heif decoder corresponding to 10bit depth is created, and the first target bitmap data in RGBA_1010102 format is decoded and sent to a hardware processor for rendering processing so as to display the wallpaper fold.
S1010: and if the wallpaper bitmap setting mode is a second wallpaper bitmap setting mode corresponding to the default wallpaper bit depth parameter, performing bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and controlling a wallpaper service to decode the second bitmap format file to obtain second target bitmap data.
For example, if the wallpaper bitmap setting mode is a wallpaper bitmap setting mode corresponding to a default wallpaper bit depth parameter 8bit, using a PNG or JPEG encoding format corresponding to the default wallpaper bit depth parameter 8bit, performing bitmap encoding processing on the target picture by the wallpaper management application to obtain a second bitmap format file (at this time, bitmap compression encoding processing is required to be performed on the target picture), where the second bitmap format file may be a PNG or JPEG encoding format file; and subsequently, in the wallpaper service for performing the bottom wallpaper treatment, the terminal controls the wallpaper service to perform bitmap decoding on the PNG or JPEG bitmap format file to obtain second target bitmap data, so that the wallpaper service can read the second target bitmap data to perform wallpaper display.
In a possible implementation manner, the terminal executes the bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain the second bitmap format file, and may execute the following manner:
and carrying out bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and writing the second bitmap format file into a wallpaper file handle.
Illustratively, for wallpaper management application of the terminal, image coding of default image bit depth parameters is supported, for example, 8 bits, and at the moment, the target bit depth image encoder (for example, 10 bits) is larger than the default image bit depth parameters, the hardware capability of the terminal does not support the target bit depth image encoder (for example, 10 bits), then the default image bit depth parameters are adopted to perform bitmap coding processing on the target picture to obtain a second bitmap format file, and the second bitmap format file is written into a wallpaper file handle associated with wallpaper service;
In a possible implementation manner, the following process of performing bitmap decoding on the basis of the wallpaper file handle by the wallpaper service is interpreted, and the control wallpaper service decodes the second bitmap format file to obtain second target bitmap data, which may be implemented in the following manner:
the terminal controls the wallpaper service to acquire a bitmap format file from the wallpaper file handle, and performs file format identification on a file header field corresponding to the bitmap format file;
and if the file header field is of the second bitmap format file type, calling a system picture processing service to decode the second bitmap format file to obtain second target bitmap data.
It can be understood that if the field of the read file header is the second bitmap format file type, the obtained data in the file handle fd_wallpaper is still sent to the picture processing program to decode the bitmap of the default image bit depth parameter according to the original procedure of the wallpaper management application for displaying.
S1012: in the wallpaper setting process, carrying out preloading processing on the target bitmap data;
s1014: wallpaper setting processing is carried out based on the target bitmap data;
in practical applications, based on the characteristic that the decoding of the first bitmap format file types (such as heif format) with the same size takes longer time than the decoding of the second bitmap format file types (such as jpeg and PNG pictures), in one or more embodiments of the present disclosure, preloading is performed during the wallpaper setting process and the startup process, so as to increase the speed of wallpaper display.
Specifically, for the wallpaper setting process, the preload process may take the following form:
a2: controlling a wallpaper service to monitor whether the target bitmap data is written into a wallpaper file handle;
optionally, the wallpaper service may be controlled to monitor whether the target bitmap data of the first bitmap format file type or the second bitmap format file type is written into the wallpaper file handle;
a4: determining that a bitmap data writing operation of a specific wallpaper file handle is monitored, acquiring the target bitmap data in the wallpaper file handle, and caching the target bitmap data into a target memory space of the wallpaper service;
it can be understood that, when it is determined that the bitmap data writing operation of the aimed wallpaper file handle is monitored, the target bitmap data in the wallpaper file handle is obtained, and the target bitmap data is cached to the target memory space of the wallpaper service.
In a possible implementation manner, after the wallpaper setting processing based on the target bitmap data, the method further includes:
and determining the screen display interface as a desktop display interface, acquiring the target bitmap data cache from the target memory space, and displaying wallpaper based on the target bitmap data.
For example, in the wallpaper setting process of the still picture, when the wallpaper service monitors that the file handle fd_wallpaper has written data, the bitmap decoding process is actively triggered, and the decoded bitmap data is cached in a memory corresponding to the wallpaper service. And after the user enters the terminal desktop, directly controlling the wallpaper service to acquire cached wallpaper data for display.
In a possible implementation manner, a terminal responds to a device starting operation or a device restarting operation, determines to start a wallpaper service, controls the wallpaper service to acquire the target bitmap data cache from a target memory space corresponding to the wallpaper service, and performs wallpaper display based on the target bitmap data.
In the device starting-up flow or the device restarting flow, the bitmap cache data acquisition flow is actively triggered immediately after the wallpaper service is started.
In one or more embodiments of the present disclosure, a terminal determines, in response to a wallpaper setting operation of a user for a target picture, a target image bit depth parameter corresponding to the target picture, where the target image bit depth parameter is greater than a default wallpaper bit depth parameter, and is not directly set by a default wallpaper bit depth parameter corresponding to wallpaper management in a related technology, but further determines, by acquiring an apparatus image bit depth processing parameter, a wallpaper bitmap setting mode for the target picture based on the target image bit depth parameter and the apparatus image bit depth processing parameter, an image bit depth processing capability of terminal hardware can be determined by the apparatus image bit depth processing parameter, and then the wallpaper bitmap setting mode of the target picture can be reasonably determined, and then target bitmap data of the target picture is acquired, and wallpaper setting processing is performed based on the target bitmap data, so that an image accuracy of wallpaper is set in combination with an actual image bit depth supporting capability of terminal equipment is achieved, and an image accuracy of wallpaper is dynamically selected under a condition that the terminal equipment supports high bit depth image processing capability is ensured, and an image display effect is ensured.
The wallpaper processing device according to the embodiment of the present application will be described in detail with reference to fig. 4. Note that, the wallpaper processing device shown in fig. 4 is used to execute the method of the embodiment shown in fig. 1 to 3, and for convenience of explanation, only the relevant parts of the embodiment of the present application are shown, and specific technical details are not disclosed, please refer to the embodiment shown in fig. 1 to 3 of the present application.
Fig. 4 is a schematic structural diagram of a wallpaper processing device according to an embodiment of the present application. The wallpaper handling device 1 may be implemented as all or part of a terminal by software, hardware or a combination of both. According to some embodiments, the wallpaper processing device 1 comprises a parameter determination module 11, a bitmap setting module 12 and a wallpaper setting module 13, in particular for:
a parameter determining module 11, configured to determine a target image bit depth parameter corresponding to a target picture in response to a wallpaper setting operation for the target picture, where the target image bit depth parameter is greater than a default wallpaper bit depth parameter;
a bitmap setting module 12, configured to acquire a device image bit depth processing parameter, and determine a wallpaper bitmap setting mode for the target picture based on the target image bit depth parameter and the device image bit depth processing parameter;
And a wallpaper setting module 13, configured to acquire target bitmap data of the target picture based on the wallpaper bitmap setting mode, and perform wallpaper setting processing based on the target bitmap data.
Optionally, as shown in fig. 5, the bitmap setting module 12 includes:
a compatibility detection unit 121, configured to perform device bit depth compatibility detection on the target image bit depth parameter and the device image bit depth processing parameter, to obtain a bit depth compatibility detection result;
a mode setting unit 122, configured to obtain a first wallpaper bitmap setting mode corresponding to the target image bit depth parameter if the bit depth compatibility detection result is of a device compatibility type, and use the first wallpaper bitmap setting mode as a wallpaper bitmap setting mode for the target image;
the mode setting unit 122 is configured to obtain a second wallpaper bitmap setting mode corresponding to the default wallpaper bit depth parameter if the bit depth compatibility detection result is of a device incompatible type, and take the second wallpaper bitmap setting mode as a wallpaper bitmap setting mode for the target picture.
Optionally, the compatibility detecting unit 121 is configured to:
acquiring a screen display bit depth processing parameter in the device image bit depth processing parameters, if the target image bit depth parameter is smaller than or equal to the screen display bit depth processing parameter, generating a bit depth compatibility detection result of a device compatibility type, and if the target image bit depth parameter is larger than the screen display bit depth processing parameter, generating a bit depth compatibility detection result of a device incompatibility type; or alternatively, the first and second heat exchangers may be,
Obtaining a processor rendering bit depth processing parameter in the device image bit depth processing parameters, generating a bit depth compatibility detection result of a device compatibility type if the target image bit depth parameter is smaller than or equal to the processor rendering bit depth processing parameter, and generating a bit depth compatibility detection result of a device incompatibility type if the target image bit depth parameter is larger than the processor rendering bit depth processing parameter; or alternatively, the first and second heat exchangers may be,
and acquiring a screen display bit depth processing parameter and a processor rendering bit depth processing parameter in the equipment image bit depth processing parameters, generating a bit depth compatibility detection result of an equipment compatibility type if the target image bit depth parameter is smaller than or equal to the screen display bit depth processing parameter and the target image bit depth parameter is smaller than or equal to the processor rendering bit depth processing parameter, and generating a bit depth compatibility detection result of an equipment incompatibility type if the target image bit depth parameter is larger than the screen display bit depth processing parameter and/or the target image bit depth parameter is larger than the processor rendering bit depth processing parameter.
Optionally, the wallpaper setting module 13 is configured to:
if the wallpaper bitmap setting mode is a first wallpaper bitmap setting mode corresponding to the target image bit depth parameter, performing bitmap encoding processing on the target image based on the target image bit depth parameter to obtain a first bitmap format file, and controlling a wallpaper service to decode the first bitmap format file to obtain first target bitmap data;
And if the wallpaper bitmap setting mode is a second wallpaper bitmap setting mode corresponding to the default wallpaper bit depth parameter, performing bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and controlling a wallpaper service to decode the second bitmap format file to obtain second target bitmap data.
Optionally, the wallpaper setting module 13 is configured to:
creating a target bit depth image encoder corresponding to the target image bit depth parameter, performing bitmap encoding processing on the target picture by adopting the target bit depth image encoder to obtain a first bitmap format file, and writing the first bitmap format file into a wallpaper file handle;
optionally, the wallpaper setting module 13 is configured to:
and carrying out bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and writing the second bitmap format file into a wallpaper file handle.
Optionally, as shown in fig. 6, the wallpaper setting module 13 includes:
a format identifying unit 131, configured to control the wallpaper service to obtain a bitmap format file from the wallpaper file handle, and identify a file format for a file header field corresponding to the bitmap format file;
A bitmap decoding unit 132, configured to create a target bit depth image decoder corresponding to the target image bit depth parameter if the file header field is the first bitmap format file type; calling a target bit depth image decoder to perform bitmap decoding processing on the first bitmap format file to obtain first target bitmap data;
optionally, the format identifying unit 131 is configured to: controlling wallpaper service to acquire bitmap format files from the wallpaper file handles, and identifying file formats of file header fields corresponding to the bitmap format files;
and the bitmap decoding unit 132 is configured to invoke a system picture processing service to decode the second bitmap format file to obtain second target bitmap data if the header field of the file is of the second bitmap format file type.
Optionally, the device 1 is further configured to:
and in the wallpaper setting process, carrying out preloading processing on the target bitmap data.
Optionally, the device 1 is further configured to:
controlling a wallpaper service to monitor whether the target bitmap data is written into a wallpaper file handle;
determining that a bitmap data writing operation of a specific wallpaper file handle is monitored, acquiring the target bitmap data in the wallpaper file handle, and caching the target bitmap data into a target memory space of the wallpaper service;
After the wallpaper setting processing based on the target bitmap data, the method further comprises the following steps:
and determining the screen display interface as a desktop display interface, acquiring the target bitmap data cache from the target memory space, and displaying wallpaper based on the target bitmap data.
Optionally, the device 1 is further configured to:
and responding to the equipment starting operation or equipment restarting operation, determining to start the wallpaper service, controlling the wallpaper service to acquire the target bitmap data cache from a target memory space corresponding to the wallpaper service, and displaying wallpaper based on the target bitmap data.
It should be noted that, in the wallpaper processing device provided in the above embodiment, only the division of the above functional modules is used for illustration when executing the wallpaper processing method, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the wallpaper processing device and the wallpaper processing method provided in the foregoing embodiments belong to the same concept, which embody detailed implementation procedures in the method embodiments, and are not described herein again.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
In one or more embodiments of the present disclosure, a terminal determines, in response to a wallpaper setting operation of a user for a target picture, a target image bit depth parameter corresponding to the target picture, where the target image bit depth parameter is greater than a default wallpaper bit depth parameter, and is not directly set by a default wallpaper bit depth parameter corresponding to wallpaper management in a related technology, but further determines, by acquiring an apparatus image bit depth processing parameter, a wallpaper bitmap setting mode for the target picture based on the target image bit depth parameter and the apparatus image bit depth processing parameter, an image bit depth processing capability of terminal hardware can be determined by the apparatus image bit depth processing parameter, and then the wallpaper bitmap setting mode of the target picture can be reasonably determined, and then target bitmap data of the target picture is acquired, and wallpaper setting processing is performed based on the target bitmap data, so that an image accuracy of wallpaper is set in combination with an actual image bit depth supporting capability of terminal equipment is achieved, and an image accuracy of wallpaper is dynamically selected under a condition that the terminal equipment supports high bit depth image processing capability is ensured, and an image display effect is ensured.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executed by the wallpaper processing method according to the embodiment shown in fig. 1 to 3, and the specific execution process may refer to the specific description of the embodiment shown in fig. 1 to 3, which is not repeated herein.
The present application further provides a computer program product, where at least one instruction is stored, where the at least one instruction is loaded by the processor and executed by the processor, where a specific execution process may refer to a specific description of the embodiment shown in fig. 1 to 3, and a detailed description is omitted herein.
Referring to fig. 7, a block diagram of an electronic device according to an exemplary embodiment of the present application is shown. An electronic device in the present application may include one or more of the following components: processor 110, memory 120, input device 130, output device 140, and bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected by a bus 150.
Processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and lines to connect various portions of the overall electronic device, perform various functions of the electronic device 100, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in at least one hardware form of digital signal processing (digital signal processing, DSP), field-programmable gate array (field-programmable gate array, FPGA), programmable logic array (programmable logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (central processing unit, CPU), an image processor (graphics processing unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
The memory 120 may include a random access memory (random Access Memory, RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, which may be an Android (Android) system, including an Android system-based deep development system, an IOS system developed by apple corporation, including an IOS system-based deep development system, or other systems, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the electronic device in use, such as phonebooks, audiovisual data, chat log data, and the like.
Referring to FIG. 8, the memory 120 may be divided into an operating system space in which the operating system is running and a user space in which native and third party applications are running. In order to ensure that different third party application programs can achieve better operation effects, the operating system allocates corresponding system resources for the different third party application programs. However, the requirements of different application scenarios in the same third party application program on system resources are different, for example, under the local resource loading scenario, the third party application program has higher requirement on the disk reading speed; in the animation rendering scene, the third party application program has higher requirements on the GPU performance. The operating system and the third party application program are mutually independent, and the operating system often cannot timely sense the current application scene of the third party application program, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third party application program.
In order to enable the operating system to distinguish specific application scenes of the third-party application program, data communication between the third-party application program and the operating system needs to be communicated, so that the operating system can acquire current scene information of the third-party application program at any time, and targeted system resource adaptation is performed based on the current scene.
Taking an operating system as an Android system as an example, as shown in fig. 9, a program and data stored in the memory 120 may be stored in the memory 120 with a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, where the Linux kernel layer 320, the system runtime library layer 340 and the application framework layer 360 belong to an operating system space, and the application layer 380 belongs to a user space. The Linux kernel layer 320 provides the underlying drivers for various hardware of the electronic device, such as display drivers, audio drivers, camera drivers, bluetooth drivers, wi-Fi drivers, power management, and the like. The system runtime layer 340 provides the main feature support for the Android system through some C/c++ libraries. For example, the SQLite library provides support for databases, the OpenGL/ES library provides support for 3D graphics, the Webkit library provides support for browser kernels, and the like. Also provided in the system runtime library layer 340 is a An Zhuoyun runtime library (Android run) which provides mainly some core libraries that can allow developers to write Android applications using the Java language. The application framework layer 360 provides various APIs that may be used in building applications, which developers can also build their own applications by using, for example, campaign management, window management, view management, notification management, content provider, package management, call management, resource management, location management. At least one application program is running in the application layer 380, and these application programs may be native application programs of the operating system, such as a contact program, a short message program, a clock program, a camera application, etc.; and may also be a third party application developed by a third party developer, such as a game-like application, instant messaging program, photo beautification program, etc.
Taking an operating system as an IOS system as an example, the programs and data stored in the memory 120 are shown in fig. 10, the IOS system includes: core operating system layer 420 (Core OS layer), core service layer 440 (Core Services layer), media layer 460 (Media layer), and touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes an operating system kernel, drivers, and underlying program frameworks that provide more hardware-like functionality for use by the program frameworks at the core services layer 440. The core services layer 440 provides system services and/or program frameworks required by the application, such as a Foundation (Foundation) framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a sports framework, and the like. The media layer 460 provides an interface for applications related to audiovisual aspects, such as a graphics-image related interface, an audio technology related interface, a video technology related interface, an audio video transmission technology wireless play (AirPlay) interface, and so forth. The touchable layer 480 provides various commonly used interface-related frameworks for application development, with the touchable layer 480 being responsible for user touch interactions on the electronic device. Such as a local notification service, a remote push service, an advertisement framework, a game tool framework, a message User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
Among the frameworks illustrated in fig. 10, frameworks related to most applications include, but are not limited to: the infrastructure in core services layer 440 and the UIKit framework in touchable layer 480. The infrastructure provides many basic object classes and data types, providing the most basic system services for all applications, independent of the UI. While the class provided by the UIKit framework is a basic UI class library for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides the infrastructure for applications to build user interfaces, draw, process and user interaction events, respond to gestures, and so on.
The manner and principle of implementing data communication between the third party application program and the operating system in the IOS system may refer to the Android system, which is not described herein.
The input device 130 is configured to receive input instructions or data, and the input device 130 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output instructions or data, and the output device 140 includes, but is not limited to, a display device, a speaker, and the like. In one example, the input device 130 and the output device 140 may be combined, and the input device 130 and the output device 140 are a touch display screen for receiving a touch operation thereon or thereabout by a user using a finger, a touch pen, or any other suitable object, and displaying a user interface of each application program. Touch display screens are typically provided on the front panel of an electronic device. The touch display screen may be designed as a full screen, a curved screen, or a contoured screen. The touch display screen can also be designed to be a combination of a full screen and a curved screen, and a combination of a special-shaped screen and a curved screen, which is not limited in the embodiment of the application.
In addition, those skilled in the art will appreciate that the configuration of the electronic device shown in the above-described figures does not constitute a limitation of the electronic device, and the electronic device may include more or less components than illustrated, or may combine certain components, or may have a different arrangement of components. For example, the electronic device further includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (wireless fidelity, wiFi) module, a power supply, and a bluetooth module, which are not described herein.
In the embodiment of the present application, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is an operating system of the electronic device. The operating system may be an android system, an IOS system, or other operating systems, which embodiments of the present application do not limit.
The electronic device of the embodiment of the application may further be provided with a display device, where the display device may be various devices capable of implementing a display function, for example: cathode ray tube displays (cathode ray tubedisplay, CR), light-emitting diode displays (light-emitting diode display, LED), electronic ink screens, liquid crystal displays (liquid crystal display, LCD), plasma display panels (plasma display panel, PDP), and the like. A user may utilize a display device on electronic device 101 to view displayed text, images, video, etc. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality ) device, an automobile, a data storage device, an audio playing device, a video playing device, a notebook, a desktop computing device, a wearable device such as an electronic watch, electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic article of clothing, etc.
In the electronic device shown in fig. 7, where the electronic device may be a terminal, the processor 110 may be configured to invoke an application program stored in the memory 120 and specifically perform the following operations:
determining a target image bit depth parameter corresponding to a target picture in response to wallpaper setting operation for the target picture, wherein the target image bit depth parameter is greater than a default wallpaper bit depth parameter;
acquiring a device image bit depth processing parameter, and determining a wallpaper bitmap setting mode aiming at the target picture based on the target image bit depth parameter and the device image bit depth processing parameter;
and acquiring target bitmap data of the target picture based on the wallpaper bitmap setting mode, and performing wallpaper setting processing based on the target bitmap data.
In one embodiment, the processor 110, when executing the wallpaper bitmap setting mode for the target picture based on the target image bit depth parameter and the device image bit depth parameter, performs the following operations:
performing equipment bit depth compatibility detection on the target image bit depth parameter and the equipment image bit depth processing parameter to obtain a bit depth compatibility detection result;
If the bit depth compatibility detection result is of a device compatibility type, acquiring a first wallpaper bitmap setting mode corresponding to the target image bit depth parameter, and taking the first wallpaper bitmap setting mode as a wallpaper bitmap setting mode for the target image;
and if the bit depth compatibility detection result is a device incompatibility type, acquiring a second wallpaper bitmap setting mode corresponding to the default wallpaper bit depth parameter, and taking the second wallpaper bitmap setting mode as a wallpaper bitmap setting mode aiming at the target picture.
In one embodiment, when performing the device bit depth compatibility detection on the target image bit depth parameter and the device image bit depth processing parameter, the processor 110 specifically performs the following operations:
acquiring a screen display bit depth processing parameter in the device image bit depth processing parameters, if the target image bit depth parameter is smaller than or equal to the screen display bit depth processing parameter, generating a bit depth compatibility detection result of a device compatibility type, and if the target image bit depth parameter is larger than the screen display bit depth processing parameter, generating a bit depth compatibility detection result of a device incompatibility type; or alternatively, the first and second heat exchangers may be,
Obtaining a processor rendering bit depth processing parameter in the device image bit depth processing parameters, generating a bit depth compatibility detection result of a device compatibility type if the target image bit depth parameter is smaller than or equal to the processor rendering bit depth processing parameter, and generating a bit depth compatibility detection result of a device incompatibility type if the target image bit depth parameter is larger than the processor rendering bit depth processing parameter; or alternatively, the first and second heat exchangers may be,
and acquiring a screen display bit depth processing parameter and a processor rendering bit depth processing parameter in the equipment image bit depth processing parameters, generating a bit depth compatibility detection result of an equipment compatibility type if the target image bit depth parameter is smaller than or equal to the screen display bit depth processing parameter and the target image bit depth parameter is smaller than or equal to the processor rendering bit depth processing parameter, and generating a bit depth compatibility detection result of an equipment incompatibility type if the target image bit depth parameter is larger than the screen display bit depth processing parameter and/or the target image bit depth parameter is larger than the processor rendering bit depth processing parameter.
In one embodiment, the processor 110, when executing the obtaining the target bitmap data of the target picture based on the wallpaper bitmap setting mode, performs wallpaper setting processing based on the target bitmap data, including:
If the wallpaper bitmap setting mode is a first wallpaper bitmap setting mode corresponding to the target image bit depth parameter, performing bitmap encoding processing on the target image based on the target image bit depth parameter to obtain a first bitmap format file, and controlling a wallpaper service to decode the first bitmap format file to obtain first target bitmap data;
and if the wallpaper bitmap setting mode is a second wallpaper bitmap setting mode corresponding to the default wallpaper bit depth parameter, performing bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and controlling a wallpaper service to decode the second bitmap format file to obtain second target bitmap data.
In one embodiment, the processor 110 performs the bitmap encoding processing on the target picture based on the target image bit depth parameter to obtain a first bitmap format file, and performs the following steps:
creating a target bit depth image encoder corresponding to the target image bit depth parameter, performing bitmap encoding processing on the target picture by adopting the target bit depth image encoder to obtain a first bitmap format file, and writing the first bitmap format file into a wallpaper file handle;
And performing bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and executing the following steps:
and carrying out bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and writing the second bitmap format file into a wallpaper file handle.
In one embodiment, the processor 110 performs the following steps when executing the control wallpaper service to decode the first bitmap format file to obtain first target bitmap data:
controlling wallpaper service to acquire bitmap format files from the wallpaper file handles, and identifying file formats of file header fields corresponding to the bitmap format files;
if the file header field is of a first bitmap format file type, a target bit depth image decoder corresponding to the target image bit depth parameter is created;
calling a target bit depth image decoder to perform bitmap decoding processing on the first bitmap format file to obtain first target bitmap data;
the control wallpaper service decodes the second bitmap format file to obtain second target bitmap data, and performs the following steps:
Controlling wallpaper service to acquire bitmap format files from the wallpaper file handles, and identifying file formats of file header fields corresponding to the bitmap format files;
and if the file header field is of the second bitmap format file type, calling a system picture processing service to decode the second bitmap format file to obtain second target bitmap data.
In one embodiment, after performing the bitmap decoding process on the target picture based on the target image bit depth parameter, the processor 110 further performs the following steps:
and in the wallpaper setting process, carrying out preloading processing on the target bitmap data.
In one embodiment, the processor 110 performs the pre-loading process on the target bitmap data in the wallpaper setting process, and performs the following steps:
controlling a wallpaper service to monitor whether the target bitmap data is written into a wallpaper file handle;
determining that a bitmap data writing operation of a specific wallpaper file handle is monitored, acquiring the target bitmap data in the wallpaper file handle, and caching the target bitmap data into a target memory space of the wallpaper service;
After the wallpaper setting processing is performed based on the target bitmap data, the following steps are further executed:
and determining the screen display interface as a desktop display interface, acquiring the target bitmap data cache from the target memory space, and displaying wallpaper based on the target bitmap data.
In one embodiment, the processor 110, when executing the method, further performs the steps of:
and responding to the equipment starting operation or equipment restarting operation, determining to start the wallpaper service, controlling the wallpaper service to acquire the target bitmap data cache from a target memory space corresponding to the wallpaper service, and displaying wallpaper based on the target bitmap data.
In the embodiment of the application, the terminal responds to the wallpaper setting operation of a user aiming at a target picture, determines a target image bit depth parameter corresponding to the target picture, wherein the target image bit depth parameter is larger than a default wallpaper bit depth parameter, the default wallpaper bit depth parameter corresponding to wallpaper management in the related technology is not directly set, the wallpaper bitmap setting mode aiming at the target picture is further determined based on the target image bit depth parameter and the equipment image bit depth parameter by acquiring the equipment image bit depth parameter, the image bit depth processing capability of the terminal hardware can be determined by the equipment image bit depth processing parameter, the wallpaper bitmap setting mode of the target picture can be reasonably determined, then the target bitmap data of the target picture is acquired, the wallpaper setting processing is carried out based on the target bitmap data, the actual image bit depth supporting capability of the terminal equipment is combined, the wallpaper bitmap setting mode is dynamically selected, the image precision of the wallpaper is ensured under the condition that the terminal equipment supports high bit depth image processing capability, and the image display effect is ensured.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
The foregoing disclosure is only illustrative of the preferred embodiments of the present application and is not intended to limit the scope of the claims herein, as the equivalent of the claims herein shall be construed to fall within the scope of the claims herein.

Claims (12)

1. A wallpaper processing method, characterized by being applied to the method comprising:
determining a target image bit depth parameter corresponding to a target picture in response to wallpaper setting operation for the target picture, wherein the target image bit depth parameter is greater than a default wallpaper bit depth parameter;
acquiring a device image bit depth processing parameter, and determining a wallpaper bitmap setting mode aiming at the target picture based on the target image bit depth parameter and the device image bit depth processing parameter;
And acquiring target bitmap data of the target picture based on the wallpaper bitmap setting mode, and performing wallpaper setting processing based on the target bitmap data.
2. The method of claim 1, wherein the determining a wallpaper bitmap setting mode for the target picture based on the target image bit depth parameter and the device image bit depth parameter comprises:
performing equipment bit depth compatibility detection on the target image bit depth parameter and the equipment image bit depth processing parameter to obtain a bit depth compatibility detection result;
if the bit depth compatibility detection result is of a device compatibility type, acquiring a first wallpaper bitmap setting mode corresponding to the target image bit depth parameter, and taking the first wallpaper bitmap setting mode as a wallpaper bitmap setting mode for the target image;
and if the bit depth compatibility detection result is a device incompatibility type, acquiring a second wallpaper bitmap setting mode corresponding to the default wallpaper bit depth parameter, and taking the second wallpaper bitmap setting mode as a wallpaper bitmap setting mode aiming at the target picture.
3. The method according to claim 2, wherein performing device bit depth compatibility detection on the target image bit depth parameter and the device image bit depth processing parameter to obtain a bit depth compatibility detection result includes:
Acquiring a screen display bit depth processing parameter in the device image bit depth processing parameters, if the target image bit depth parameter is smaller than or equal to the screen display bit depth processing parameter, generating a bit depth compatibility detection result of a device compatibility type, and if the target image bit depth parameter is larger than the screen display bit depth processing parameter, generating a bit depth compatibility detection result of a device incompatibility type; or alternatively, the first and second heat exchangers may be,
obtaining a processor rendering bit depth processing parameter in the device image bit depth processing parameters, generating a bit depth compatibility detection result of a device compatibility type if the target image bit depth parameter is smaller than or equal to the processor rendering bit depth processing parameter, and generating a bit depth compatibility detection result of a device incompatibility type if the target image bit depth parameter is larger than the processor rendering bit depth processing parameter; or alternatively, the first and second heat exchangers may be,
and acquiring a screen display bit depth processing parameter and a processor rendering bit depth processing parameter in the equipment image bit depth processing parameters, generating a bit depth compatibility detection result of an equipment compatibility type if the target image bit depth parameter is smaller than or equal to the screen display bit depth processing parameter and the target image bit depth parameter is smaller than or equal to the processor rendering bit depth processing parameter, and generating a bit depth compatibility detection result of an equipment incompatibility type if the target image bit depth parameter is larger than the screen display bit depth processing parameter and/or the target image bit depth parameter is larger than the processor rendering bit depth processing parameter.
4. The method according to claim 1, wherein the acquiring the target bitmap data of the target picture based on the wallpaper bitmap setting mode includes:
if the wallpaper bitmap setting mode is a first wallpaper bitmap setting mode corresponding to the target image bit depth parameter, performing bitmap encoding processing on the target image based on the target image bit depth parameter to obtain a first bitmap format file, and controlling a wallpaper service to decode the first bitmap format file to obtain first target bitmap data;
and if the wallpaper bitmap setting mode is a second wallpaper bitmap setting mode corresponding to the default wallpaper bit depth parameter, performing bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and controlling a wallpaper service to decode the second bitmap format file to obtain second target bitmap data.
5. The method of claim 4, wherein performing bitmap encoding processing on the target picture based on the target image bit depth parameter to obtain a first bitmap format file, comprises:
creating a target bit depth image encoder corresponding to the target image bit depth parameter, performing bitmap encoding processing on the target picture by adopting the target bit depth image encoder to obtain a first bitmap format file, and writing the first bitmap format file into a wallpaper file handle;
The bitmap compression processing is performed on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, which comprises the following steps:
and carrying out bitmap compression processing on the target picture based on the default wallpaper bit depth parameter to obtain a second bitmap format file, and writing the second bitmap format file into a wallpaper file handle.
6. The method of claim 4, wherein the controlling the wallpaper service to decode the first bitmap format file to obtain first target bitmap data comprises:
controlling wallpaper service to acquire bitmap format files from the wallpaper file handles, and identifying file formats of file header fields corresponding to the bitmap format files;
if the file header field is of a first bitmap format file type, a target bit depth image decoder corresponding to the target image bit depth parameter is created;
calling a target bit depth image decoder to perform bitmap decoding processing on the first bitmap format file to obtain first target bitmap data;
the wallpaper control service decodes the second bitmap format file to obtain second target bitmap data, and the method comprises the following steps:
controlling wallpaper service to acquire bitmap format files from the wallpaper file handles, and identifying file formats of file header fields corresponding to the bitmap format files;
And if the file header field is of the second bitmap format file type, calling a system picture processing service to decode the second bitmap format file to obtain second target bitmap data.
7. The method according to claim 4, wherein after performing bitmap decoding processing on the target picture based on the target image bit depth parameter to obtain target bitmap data, further comprising:
and in the wallpaper setting process, carrying out preloading processing on the target bitmap data.
8. The method of claim 7, wherein the preloading the target bitmap data during wallpaper setting comprises:
controlling a wallpaper service to monitor whether the target bitmap data is written into a wallpaper file handle;
determining that a bitmap data writing operation of a specific wallpaper file handle is monitored, acquiring the target bitmap data in the wallpaper file handle, and caching the target bitmap data into a target memory space of the wallpaper service;
after the wallpaper setting processing based on the target bitmap data, the method further comprises the following steps:
and determining the screen display interface as a desktop display interface, acquiring the target bitmap data cache from the target memory space, and displaying wallpaper based on the target bitmap data.
9. The method according to any one of claims 1-8, further comprising:
and responding to the equipment starting operation or equipment restarting operation, determining to start the wallpaper service, controlling the wallpaper service to acquire the target bitmap data cache from a target memory space corresponding to the wallpaper service, and displaying wallpaper based on the target bitmap data.
10. A wallpaper handling device, the device comprising:
the parameter determining module is used for determining a target image bit depth parameter corresponding to a target picture in response to wallpaper setting operation aiming at the target picture, wherein the target image bit depth parameter is larger than a default wallpaper bit depth parameter;
the bitmap setting module is used for acquiring the device image depth processing parameters and determining a wallpaper bitmap setting mode aiming at the target picture based on the target image depth processing parameters and the device image depth processing parameters;
and the wallpaper setting module is used for acquiring target bitmap data of the target picture based on the wallpaper bitmap setting mode and performing wallpaper setting processing based on the target bitmap data.
11. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 9.
12. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-9.
CN202311786854.2A 2023-12-22 2023-12-22 Wallpaper processing method and device, storage medium and electronic equipment Pending CN117762545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311786854.2A CN117762545A (en) 2023-12-22 2023-12-22 Wallpaper processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311786854.2A CN117762545A (en) 2023-12-22 2023-12-22 Wallpaper processing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117762545A true CN117762545A (en) 2024-03-26

Family

ID=90311968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311786854.2A Pending CN117762545A (en) 2023-12-22 2023-12-22 Wallpaper processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117762545A (en)

Similar Documents

Publication Publication Date Title
EP3754490B1 (en) User interface rendering method and apparatus, and terminal
US20200396419A1 (en) Method and apparatus for generating video file, and storage medium
CN107770618B (en) Image processing method, device and storage medium
US12019942B2 (en) Multi-screen collaboration method and system, and electronic device
CN111459586B (en) Remote assistance method, device, storage medium and terminal
CN110874217A (en) Interface display method and device for fast application and storage medium
WO2022078295A1 (en) Device recommendation method and electronic device
CN110990075A (en) Starting method, device and equipment of fast application and storage medium
CN113313804B (en) Image rendering method and device, electronic equipment and storage medium
CN112184595B (en) Mobile terminal and image display method thereof
CN111127469A (en) Thumbnail display method, device, storage medium and terminal
CN110865863B (en) Interface display method and device for fast application and storage medium
CN111913614B (en) Multi-picture display control method and device, storage medium and display
CN113038141B (en) Video frame processing method and electronic equipment
CN117555459A (en) Application group processing method and device, storage medium and electronic equipment
CN111949150B (en) Method and device for controlling peripheral switching, storage medium and electronic equipment
CN113286349B (en) Personal hot spot connection method, device, terminal and storage medium
CN113595662B (en) Signal prompting method, device, terminal equipment and storage medium
CN113450762B (en) Text reading method, text reading device, terminal and storage medium
CN113950043B (en) Communication method, device, storage medium and terminal
CN117762545A (en) Wallpaper processing method and device, storage medium and electronic equipment
CN113419650A (en) Data moving method and device, storage medium and electronic equipment
CN115314588B (en) Background synchronization method, device, terminal, equipment, system and storage medium
WO2023273936A1 (en) Wallpaper setting method and apparatus, and storage medium and electronic device
CN107800618B (en) Picture recommendation method and device, terminal and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination