CN108595239B - Picture processing method, device, terminal and computer readable storage medium - Google Patents

Picture processing method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN108595239B
CN108595239B CN201810348881.4A CN201810348881A CN108595239B CN 108595239 B CN108595239 B CN 108595239B CN 201810348881 A CN201810348881 A CN 201810348881A CN 108595239 B CN108595239 B CN 108595239B
Authority
CN
China
Prior art keywords
picture
desktop background
target
background picture
model information
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.)
Active
Application number
CN201810348881.4A
Other languages
Chinese (zh)
Other versions
CN108595239A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810348881.4A priority Critical patent/CN108595239B/en
Publication of CN108595239A publication Critical patent/CN108595239A/en
Application granted granted Critical
Publication of CN108595239B publication Critical patent/CN108595239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention discloses a picture processing method, a picture processing device, a terminal and a computer readable storage medium, and belongs to the technical field of terminals. The method comprises the following steps: acquiring a picture processing instruction corresponding to a first desktop background picture; acquiring a preset picture corresponding to the target model information according to the picture processing instruction, wherein pixel points of the preset picture are black pixel points; synthesizing a preset picture to a connecting area above the first desktop background picture to obtain a second desktop background picture; and zooming the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same size as the screen. When the new picture obtained by processing is set as the desktop background, the periphery of the non-display area of the screen corresponding to the target model information is also displayed with black, and the color of the non-display area is the same as that of the target model information, then the desktop background can present a regular shape instead of an irregular special shape, and the picture quality and the display effect of the new picture cannot be changed due to the stretching problem.

Description

Picture processing method, device, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a method and an apparatus for processing an image, a terminal, and a computer-readable storage medium.
Background
With the development of terminal and software technology, the full-screen technology is gradually applied to electronic terminals such as mobile phones, notebooks, flat panels, televisions, computers and the like. When using these electronic terminals, users usually prefer to set the display desktop background of the electronic terminal to a favorite picture. This picture selected as the desktop background is called wallpaper. Since these full-screen screens usually adopt irregular rectangular or rounded rectangle screens, when the conventional rectangular or rounded rectangle-shaped picture is applied and set as a desktop background, a partial area of the picture is blocked, compressed, stretched, etc., and takes on irregular shapes. In addition, when a user sets a picture as the special-shaped screen wallpaper, the picture cannot highly restore the original image quality and display effect of the wallpaper due to the stretching problem, and the later use of the picture is seriously influenced.
Disclosure of Invention
The embodiment of the invention provides a picture processing method, a picture processing device, a terminal and a computer readable storage medium, which can solve the problems that a picture is shielded, compressed and stretched when being set as a desktop background and is in a special shape and the original image quality and the display effect of wallpaper cannot be highly restored due to the stretching problem in the related art. The technical scheme is as follows:
in one aspect, a method for processing a picture is provided, where the method includes:
acquiring a picture processing instruction corresponding to a first desktop background picture, wherein the picture processing instruction carries target model information;
acquiring a preset picture corresponding to the target model information according to the picture processing instruction, wherein pixel points of the preset picture are black pixel points, and the shape of the preset picture corresponds to the target model information;
synthesizing the preset picture to a connecting area above the first desktop background picture to obtain a second desktop background picture, wherein the aspect ratio of the second desktop background picture is the same as the aspect ratio of the screen corresponding to the target model information;
and zooming the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same size as the screen size.
In one aspect, a picture processing apparatus is provided, the apparatus including:
the acquisition module is used for acquiring a picture processing instruction corresponding to a first desktop background picture, wherein the picture processing instruction carries target model information;
the acquisition module is further configured to acquire a preset picture corresponding to the target model information according to the picture processing instruction, wherein pixel points of the preset picture are black pixel points, and the shape of the preset picture corresponds to the target model information;
the synthesis module is used for synthesizing the preset picture to a connection area above the first desktop background picture to obtain a second desktop background picture, and the aspect ratio of the second desktop background picture is the same as the aspect ratio of the screen corresponding to the target model information;
and the processing module is used for zooming the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same size as the screen size.
In one aspect, a terminal is provided, and the terminal includes a processor and a memory, where the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement an operation performed by the picture processing method.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement operations performed by the picture processing method.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
according to the method and the device, when the corresponding picture processing instruction is acquired for the picture of the desktop background of the screen corresponding to the target model information, the picture and the black picture are synthesized into the new picture, the black picture is arranged above the picture, and the new picture is zoomed to the size of the screen corresponding to the target model information, so that when the new picture obtained through processing is set as the desktop background, the periphery of the non-display area of the screen corresponding to the target model information is also displayed with black, the color of the non-display area is the same as that of the non-display area, the desktop background can be in a regular shape instead of an irregular special shape, and the picture quality and the display effect of the new picture cannot be changed due to the stretching problem.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a network system according to an embodiment of the present invention;
fig. 2 is a flowchart of a picture processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a first terminal interface according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a second terminal interface according to an embodiment of the present invention;
FIG. 5 is a diagram of a picture selection interface according to an embodiment of the present invention;
FIG. 6 is a diagram of an actual interface of a picture selection interface according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a picture preview interface according to an embodiment of the present invention;
FIG. 8 is a diagram of an actual interface of a picture preview interface according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a picture preview interface according to an embodiment of the present invention;
FIG. 10 is a diagram of an actual interface of a picture preview interface according to an embodiment of the present invention;
FIG. 11 is a diagram illustrating a picture preview interface according to an embodiment of the present invention;
FIG. 12 is a diagram of an actual interface of a picture preview interface according to an embodiment of the present invention;
FIG. 13 is a diagram illustrating a background picture of a second desktop according to an embodiment of the invention;
FIG. 14 is a diagram illustrating a picture processing completion interface according to an embodiment of the present invention;
FIG. 15 is a diagram of an actual interface of a picture processing completion interface according to an embodiment of the present invention;
fig. 16 is a schematic diagram of a third desktop background picture according to an embodiment of the present invention;
FIG. 17 is a diagram illustrating a background picture of a third desktop according to an embodiment of the invention;
FIG. 18 is a schematic diagram illustrating a display effect of a target background picture according to an embodiment of the present invention;
fig. 19 is a schematic diagram of a preview effect when a target background picture is set as a desktop background according to an embodiment of the present invention;
fig. 20 is a schematic diagram illustrating a display effect of a background picture of a third desktop according to an embodiment of the present invention;
fig. 21 is a schematic diagram of a preview effect when a third desktop background picture is set as a desktop background according to an embodiment of the present invention;
fig. 22 is an actual preview interface diagram when a third desktop background picture is set as a desktop background according to the embodiment of the present invention;
FIG. 23 is a schematic diagram of a desktop background display provided by an embodiment of the present invention;
FIG. 24 is a diagram of an actual interface of a desktop background display provided by an embodiment of the present invention;
fig. 25 is a flowchart of a method for generating a picture according to an embodiment of the present invention;
fig. 26 is a flowchart of a picture generation method according to an embodiment of the present invention;
FIG. 27 is a block diagram of an image processing apparatus according to an embodiment of the present invention;
fig. 28 is a block diagram of a terminal according to an embodiment of the present invention;
fig. 29 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a network system according to an embodiment of the present invention, and referring to fig. 1, the network system includes a terminal and a server, where the terminal and the server may perform data interaction through a network to provide a network data service for a user. The user can perform touch operation on the terminal, the terminal sends a network data request to the server, and the server provides corresponding network data for the terminal according to the network data request. For example, the terminal may obtain corresponding picture data from the server based on operations such as downloading or saving pictures of the user, and save the picture data in the local album, and may further process the pictures according to the touch operation of the user, or directly display the pictures, or set the pictures as a desktop background.
Fig. 2 is a flowchart of an image processing method according to an embodiment of the present invention, where the image processing method is applied to a terminal, and referring to fig. 2, the method includes the following steps:
201. and when the acquired picture selection instruction is received, the terminal acquires an original picture to be processed.
The picture selection instruction can be triggered by picture selection operation performed by a user on the terminal. The terminal can be a terminal of a target model, the terminal of the target model has a non-display area when a screen of the terminal is bright, hardware such as a camera and a sensor can be arranged below the screen of the non-display area, and the hardware such as the camera and the sensor cannot be used as a display screen to display the display content of the screen when the screen of the terminal is bright, so that the area is in a non-display state. Of course, the terminal may also be a terminal of any model, and the terminal of any model may process the original picture and send the processed picture to the terminal of the target model. The following description will be given by taking only the terminal of the target model as an example. The original picture may be a picture in a terminal local album, and the picture in the terminal local album may be a picture downloaded or stored by a user in each application client, or may be a picture acquired by the terminal from a cloud album.
When a user wants to set a picture as a desktop background of the terminal, the picture can be processed first, and then the processed picture is set as the desktop background of the terminal, so that the processed picture can be completely displayed when being displayed on the terminal. Specifically, a user can operate on the terminal, the terminal starts a picture processing function after acquiring an instruction triggered by the user operation, the terminal displays a picture processing interface, so that the user can perform a picture importing operation in the picture processing interface, the terminal acquires the picture importing instruction triggered by the picture importing operation, the interface can jump into an album, the user performs a picture selecting operation on the picture in the album to select an original picture which is desired to be set as a desktop background of the terminal, and when the terminal acquires the picture selecting instruction, the original picture can be acquired and a subsequent picture processing process is performed based on the original picture.
For example, a user may perform a start operation to trigger a terminal to start a related application, and display an interface of the related application, fig. 3 is a schematic diagram of a first terminal interface provided in an embodiment of the present invention, as shown in fig. 3, the first terminal interface may include an interface skip button, after the user clicks the interface skip button, the terminal may jump from the first terminal interface to a second terminal interface, the second terminal interface includes a picture processing function entry, fig. 4 is a schematic diagram of a second terminal interface provided in an embodiment of the present invention, as shown in fig. 4, the picture processing function entry may be one item in a function list, and the user may perform a touch operation on the picture processing function entry to trigger the terminal to start a picture processing function. The user can click a picture importing button in a picture processing interface displayed by the terminal, when the terminal obtains a picture importing instruction, the interface can jump to a picture selecting interface, pictures in the photo album can be displayed in the picture selecting interface, and the original picture to be processed is obtained based on the picture selecting instruction triggered by the picture selecting operation of the user. Fig. 5 is a schematic diagram of a picture selection interface according to an embodiment of the present invention, where the picture selection interface may include a picture in an album, and may also include a photo button, and a user may select the picture in the album as an original picture, and may also click the photo button, and take the picture obtained by shooting as an original picture to be processed. For example, the picture processing function may be a built-in application pre-installed and running on the electronic terminal or a third-party application installed and running on the electronic device independently or a sub-function of the application. As shown in fig. 6, the image selection interface may include a prompt message, which may be a wallpaper for selecting bang to cut, wherein bang is an anthropomorphic and visualized name of the non-display area of the terminal screen of the target model. When a user selects any picture in the picture selection interface, the terminal can acquire the picture as an original picture to be processed when acquiring the picture selection instruction.
202. When a preview display instruction of the original picture is acquired, the terminal zooms the original picture and displays the zoomed original picture in a screen template corresponding to the target model information.
After the terminal acquires the original picture to be processed, the step 202 may be further executed to preview and display the original picture to inform the user of the display effect of the original picture set as the desktop background, so that the user may acquire the display effect of the picture in advance, and the situation that the user repeats the desktop background setting operation because the user does not know the display effect of the picture set as the desktop background is avoided.
The preview display instruction carries the size of a screen template corresponding to the target model information, the screen template is obtained by scaling a screen corresponding to the target model information according to a preset scaling ratio, the screen corresponding to the target model information can be a screen with an undisplayed area when the screen is lighted, and the target model information is information of a terminal of a target model.
Similarly to step 201, the target model may be the same as the model of the terminal, or may be another model, and the target model may also be selected by the user according to which model the user wants to perform the picture processing for the terminal before performing the picture processing, which is not specifically limited in the embodiment of the present invention. The preview display instruction may be triggered by a preview display operation performed on the original picture by the user, or may be obtained by the terminal after executing step 201 according to the setting, which is not limited in the embodiment of the present invention.
The preset scaling is a ratio of the size of the screen template to the size of the screen corresponding to the target model information, and the ratio may be a ratio of the height of the screen template to the height of the screen corresponding to the target model information, or a ratio of the width of the screen template to the width of the screen corresponding to the target model information. It should be noted that the preset scaling is inversely related to the size of the current terminal screen. When the screen of the terminal is the screen corresponding to the target model information, the preset scaling may be preset by a technician, and when the screen of the terminal is not the screen corresponding to the target model information, but the aspect ratio of the terminal screen is the same as the aspect ratio of the screen corresponding to the target model information, the preset scaling may be a product of the ratio of the size of the terminal screen to the size of the screen corresponding to the target model information and the scaling preset by the technician.
It should be noted that, when the terminal performs preview display on the original picture, the original picture is zoomed so as to completely display the original picture in the screen template, and the step 202 may specifically include: the terminal determines a first scaling of the original picture according to the size of the original picture and the size of a screen template corresponding to the target model information, wherein the first scaling of the original picture is used for scaling the original picture to the size capable of being completely displayed in the screen template; the terminal zooms the original picture according to the first zooming proportion of the original picture; the terminal completely displays the zoomed original picture in the screen template, so that the original picture can be previewed and displayed, and a user can freely adjust the original picture according to the current display effect to obtain the display effect desired by the user.
Since the aspect ratio of the original picture may be different from the aspect ratio of the picture display area below the non-display area, the process of the terminal determining the first scaling of the original picture may be: when the aspect ratio of the original picture is larger than that of a picture display area, determining that the ratio of the width of the picture display area to the width of the original picture is a first scaling ratio; when the aspect ratio of the original picture is smaller than the aspect ratio of the picture display area, determining that the ratio of the height of the picture display area to the height of the original picture is a first scaling ratio.
After the terminal zooms the original picture, when the original picture is displayed in the picture display area, the zoomed original picture may be displayed at a center position of the picture display area, and of course, the terminal may also display the zoomed original picture at a top, a bottom, or other areas of the picture display area, which is not limited in this embodiment of the present invention. When the terminal previews and displays the original picture, the initial display position of the original picture can be recorded.
The above-mentioned picture preview effect can be seen in fig. 7, where fig. 7 is a schematic diagram of a picture preview interface provided in an embodiment of the present invention, a terminal displays a screen template obtained by scaling a screen corresponding to target model information according to a preset scaling in the picture preview interface, non-display areas in the screen template are all adjusted to be black in a horizontal direction, and an original picture is displayed below the non-display areas. The terminal can also display prompt information in the picture preview interface, and the prompt information can be used for prompting a user to perform user-defined adjustment on the original picture. The picture preview interface may further include a target button, where the target button is used to take a current picture preview effect as a display effect of the processed picture. Fig. 8 is a practical interface diagram of a picture preview interface according to an embodiment of the present invention, and as shown in fig. 8, the shape of the screen may be a rounded rectangle, and the shape of the picture preview area may also be a rounded rectangle. The interface name of the image preview interface can be 'bang wallpaper removal', namely, the user is informed that the current step is the process of processing the original image and making bang wallpaper removal, and the wallpaper refers to the desktop background. The prompt information 'dragging or zooming wallpaper' is displayed below the screen template to prompt a user to perform dragging or zooming operation on the wallpaper (original picture) to be selected. The target button in the picture preview interface may be a "start generation" button, that is, a button informing the user that wallpaper can be generated based on the picture in the screen template corresponding to the current target model information.
203. When a picture setting instruction is acquired, zooming or translating the original picture by the terminal, and displaying a first desktop background picture to be acquired in the screen template, wherein the picture setting instruction is used for zooming or translating the original picture.
The picture setting instruction can be triggered by a picture setting operation of a user on an original picture displayed in a preview mode. After the terminal previews and displays the original picture, if the user feels that the currently previewed and displayed picture area is not the area which the user wants to set as the desktop background, the terminal can perform picture setting operation on the original picture to change the picture area which is finally set as the desktop background.
In practical application, a user can freely zoom or translate an original picture, and the terminal can adjust the picture preview display effect in real time based on the operation of the user, so that the picture preview display effect in the screen template can achieve the effect desired by the user. Specifically, when the terminal acquires a picture setting instruction triggered by a picture setting operation, the terminal may determine a second scaling or a position variation of the original picture based on the picture setting instruction, and in the screen template, the terminal scales the original picture according to the second scaling and displays the scaled original picture, or the terminal moves the position of the original picture according to the position variation. For example, as shown in fig. 9, a user may drag an original picture to move downward, and the terminal acquires a drag instruction triggered by the drag operation, and may adjust a display position of the original picture, and its actual interface diagram may refer to fig. 10. As shown in fig. 11, a user may perform a zoom operation on an original picture, and then the terminal acquires a zoom instruction triggered by the zoom operation, and may zoom the original picture, and a practical interface diagram of the terminal may refer to fig. 12.
204. When the image obtaining instruction is obtained, the terminal obtains a first desktop background image.
The picture obtaining instruction can be triggered by the picture obtaining operation of the user on the picture displayed by previewing. The first desktop background picture is a picture of a desktop background of a screen corresponding to the target model information to be set, that is, a picture in a screen template in the picture preview interface is a picture of the desktop background which a user wants to set as a target model terminal. In step 203, the user of the terminal zooms or translates the picture, so that the picture displayed in the screen template satisfies the desired display effect, and the user may perform a picture obtaining operation on the terminal, where the picture obtaining operation may be the above-mentioned touch operation on the target button in the picture preview interface.
When the terminal acquires a picture acquisition instruction triggered by touch operation on the target button shown in fig. 9, the terminal may acquire an area of the original picture in the screen template corresponding to the target model information based on the initial position of the original picture and the second scaling or position variation of the original picture, so that the terminal may use the picture in the area as the first desktop background picture, and the picture acquisition instruction is used to use the picture in the screen template as the first desktop background picture. In specific implementation, after the terminal acquires the region of the original picture in the screen template, the original picture can be cut based on the region to obtain a first desktop background picture. In this way, the original picture is cut to obtain the picture of the desktop background to be set as the screen corresponding to the target model information, and the original picture is not deformed, so that the similarity between the processed picture and the original picture is higher, and the original image quality and the display effect of the wallpaper can be highly restored.
The foregoing steps 201 to 204 are processes in which the terminal acquires an original picture, previews and displays the original picture, and processes the original picture based on a picture setting operation of the user on the original picture to obtain a first desktop background picture. In a possible implementation manner, the first desktop background picture may also be the original picture obtained in step 201. In this implementation two cases may be included:
in the first case: after the terminal performs step 202, after the terminal performs preview display on an original picture, the original picture is exactly the same as the size of the picture display area of the screen template, and the user wants to directly set the original picture as the desktop background of the screen corresponding to the target model information, so that the user does not perform picture setting operation on the original picture, but clicks the target button shown in fig. 9 or the "start generation" button shown in fig. 10, so that the terminal can determine that the original picture in the current screen template is the first desktop background picture without performing step 203.
In the second case: after the terminal performs step 201, step 202 and step 203 may not be performed, but the original picture is directly used as the first desktop background picture according to the setting.
It should be noted that, the embodiment of the present invention is not limited in particular to whether to provide the picture preview display function and what may happen in practical applications.
205. The terminal obtains a picture processing instruction corresponding to the first desktop background picture, wherein the picture processing instruction carries target model information.
It should be noted that the image processing instruction may include at least the following two triggering manners, and the embodiment of the present invention does not limit which triggering manner is specifically adopted in actual implementation.
The first trigger mode is as follows: the picture processing instruction may be triggered by the user's picture taking operation set forth in step 204 above.
In the first triggering mode, after a user performs a picture obtaining operation on the terminal, the terminal may obtain a picture obtaining instruction and a picture processing instruction, where the picture processing instruction is used to process a first desktop background picture obtained according to the picture obtaining instruction to obtain a target background picture.
The second triggering mode is as follows: the image processing instruction can be triggered by the image processing operation performed on the acquired image after the image acquisition operation is performed by the user.
In the second triggering mode, after the terminal acquires the first desktop background picture according to the picture acquisition instruction triggered by the picture acquisition operation of the user, the terminal can prompt the user whether to determine to process the first desktop background picture so as to acquire the target beijing background picture. If the user performs the picture processing operation on the first desktop background picture, the terminal may acquire the picture processing instruction triggered by the picture processing operation.
206. And the terminal acquires a preset picture corresponding to the target model information according to the picture processing instruction, wherein pixel points of the preset picture are black pixel points, and the shape of the preset picture corresponds to the target model information.
The terminal can process the first desktop background picture according to the picture processing instruction, and set pixel points in an area above the first desktop background picture as black pixel points. It should be noted that the purpose of synthesizing the preset picture above the first desktop background picture by the terminal is to make all the pixels near the non-display area in the screen corresponding to the target model information be black pixels, so that the picture cannot be irregular due to the non-display area when set as the desktop background. The terminal may first execute step 206 to obtain a preset picture with a shape corresponding to the target model information.
Specifically, the step 206 may specifically be: the terminal determines that the width ratio of the first desktop background picture is the first height of the screen width-height ratio corresponding to the target model information; obtaining a second height by using the difference between the first height and the height of the first desktop background picture; and acquiring a black picture with the width of the first desktop background picture and the height of the second desktop background picture. For example, the aspect ratio of the screen corresponding to the target model information is 9:19.5, and the width of the first desktop background picture acquired by the terminal is 240 pounds (pt), the first height is 520pt, and the height of the first desktop background picture is 500.8pt, the height of the black picture is 19.2pt, that is, the second height, and the size of the black picture is 19.2pt and the width is 240 pt.
207. And the terminal synthesizes the preset picture into a connecting area above the first desktop background picture to obtain a second desktop background picture, wherein the aspect ratio of the second desktop background picture is the same as the aspect ratio of the screen corresponding to the target model information.
After the terminal acquires the first desktop background picture and the preset picture of the desktop background of the screen corresponding to the target model information, the preset picture can be added above the first desktop background picture, that is, the preset picture is synthesized to a connection area above the first desktop background picture, and the upper edge of the first desktop background picture is connected with the lower edge of the preset picture.
Specifically, the terminal may determine a picture in a picture display area of the screen template as a first desktop background picture, and determine a black area of the screen template above the first desktop background picture as a connection area above the first desktop background picture, or may also be understood as an addition area of a preset picture. Wherein the connection region includes a non-display region.
After the terminal determines the connection area, a preset picture can be synthesized to the connection area to obtain a second desktop background picture. The aspect ratio of the second desktop background picture is the same as the screen aspect ratio corresponding to the target model information, that is, the shape of the second desktop background picture is the same as the shape of the screen template, and only a black area is above the first desktop background picture in the second desktop background picture, so that the system time, the signal connection condition, the network connection condition, the electric quantity condition and the like of the terminal cannot be displayed.
In a specific implementation, the first desktop background picture and the second desktop background picture may also be in the shape of rounded rectangles, and the lower edge of the preset picture is connected with the upper edge of the first desktop background picture, and the preset picture and the first desktop background picture may also be just spliced into a rounded rectangle of the second desktop background picture. For example, as shown in fig. 13, the bottom area of the second desktop background picture is a rounded rectangle, the bottom area is the first desktop background picture, the top area of the second desktop background picture is the preset picture, and the color of the preset picture is black.
In a possible implementation manner, the image preview display process is only to facilitate a user to preview a display effect after the image processing, based on the display effect, the position of the original image is adjusted or the original image is cut, and when the terminal acquires the first desktop background image, the acquired first desktop background image is acquired based on the original image with the original size, and is not acquired by the zoomed original image or by cutting on the zoomed original image. Accordingly, in step 207, the preset picture is synthesized to the connection area above the first desktop background picture to obtain a second desktop background picture, and the second desktop background picture is obtained in a process similar to the process of obtaining the first desktop background picture and also obtained on the basis of the first desktop background picture which is not scaled. In another possible implementation manner, the terminal may also obtain a zoomed original picture as a first desktop background picture or a first desktop background picture obtained by clipping the zoomed original picture, so as to synthesize a preset picture to a connection region above the first desktop background picture, and then zoom the first desktop background picture and the preset picture back together according to the first zoom ratio and the second zoom ratio of the previous original picture, so as to obtain a second desktop background picture which is not zoomed compared with the original picture.
208. And the terminal performs zooming processing on the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same size as the screen size.
After the terminal obtains the second desktop background picture, although the aspect ratio of the second desktop background picture is the same as the aspect ratio of the screen corresponding to the target model information, and the size of the second desktop background picture may not be the same as the size of the screen corresponding to the target model information, the terminal also needs to zoom the second desktop background picture, and adjust the size of the second desktop background picture to the size of the screen corresponding to the target model information, so as to obtain the target background picture, which is the picture to be set as the desktop background obtained by processing. Specifically, this step 204 may include the following steps (1) and (2):
(1) and the terminal determines the scaling of the second desktop background picture according to the screen size corresponding to the target model information, wherein the scaling of the second desktop background picture is used for scaling the second desktop background picture to the screen size corresponding to the target model information.
In the step (1), since the aspect ratio of the second desktop background picture is the same as the aspect ratio of the screen corresponding to the target model information, the terminal may use the ratio of the height of the screen corresponding to the target model information to the height of the second desktop background picture as the scaling ratio of the second desktop background picture, or use the ratio of the width of the screen corresponding to the target model information to the width of the second desktop background picture as the scaling ratio of the second desktop background picture.
(2) And the terminal zooms the second desktop background picture to a target background picture according to the zooming proportion of the second desktop background picture.
In this step (2), the terminal may scale the size of the second desktop background picture to the size of the screen corresponding to the target model information based on the scaling of the second desktop background picture determined in step (1). For example, as shown in fig. 14, after the terminal obtains the target background picture, the terminal interface jumps to the picture processing completion interface, the picture processing completion interface may include a picture preview area, a sharing function button, a desktop background setting button, and a desktop background setting help information entry, an actual interface diagram of the terminal is as shown in fig. 15, the picture preview area displays a screen template corresponding to the target model information, a picture that the user wants to set as the desktop background is displayed in the screen template, the sharing function button may be a "tell friend with X", which is described here by taking iPhone X as an example only. The desktop background setting button may be "go album setting", and if the user does not know how to set the desktop background, the user may click the desktop background below to set the help information entry, i.e., "how to set wallpaper".
In consideration of the fact that the terminal can zoom the picture to be set as the desktop background when the terminal sets the desktop background, the zooming is to magnify the picture, after the step 208, the terminal can also call a system function to draw the target background picture in a target area on a preset canvas to obtain a third desktop background picture, the size of the target area is the same as that of a screen corresponding to the target model information, and the size of the third desktop background picture is larger than that of the screen corresponding to the target model information. The parameters of the system function may be determined according to the screen granularity of the screen corresponding to the target model information, the color of the preset canvas may be black, for example, as shown in fig. 16, the third desktop background picture includes the target background picture, the actual picture is as shown in fig. 17, areas all black are around the target background picture as shown in fig. 14, 15, 16 and 17, the picture preview display effect of the third desktop background picture is as shown in fig. 14, the actual interface is as shown in fig. 15, and the actual picture of the third desktop background picture is as shown in fig. 16 or 17.
In practical application, the terminal can also calculate the corresponding position coordinates of the pixel points in the second desktop background picture in the target area on the preset canvas based on the scaling of the second desktop background picture, so that when a third desktop background picture is drawn, a system function is called, and the pixel points in the second desktop background picture are correspondingly drawn on the preset canvas according to the calculation result, so that the third desktop background picture is obtained.
It should be noted that, after obtaining the target background picture or the third desktop background picture, the terminal may automatically store the target background picture or the third desktop background picture in the local album, so as to perform operations such as display, sharing, or desktop background setting on the target background picture or the third desktop background picture in the following.
When the terminal displays the picture processing completion interface, the user can click the desktop background setting button and also can click the sharing function button. When the user clicks the desktop background setting button and the terminal detects the desktop background setting operation of the user, the interface may jump to the album, and the user may select the target background picture or the third desktop background picture obtained in step 208 and set the target background picture or the third desktop background picture as the desktop background.
It should be noted that, when the terminal displays the target background picture in the album, the display effect of the target background picture is as shown in fig. 18, and when the target background picture is set as the desktop background, the terminal may perform the zoom preview display on the target background picture, as shown in fig. 19, so that the preview display effect of the target background picture in the above step is not performed when the target background picture is set as the desktop background, and the user also needs to manually perform the zoom operation on the target background picture, so that the preview display effect of the target background picture is the same as the preview display effect in the above step.
Different from the setting of the target background picture as the desktop background, the size of the third desktop background picture is larger than the size of the screen corresponding to the target model information, when the desktop background setting instruction is obtained, the terminal can display the third desktop background picture, the target background picture is displayed in the screen corresponding to the target model information, and the desktop background setting instruction is used for setting the third desktop background picture as the desktop background of the screen corresponding to the target model information. The desktop background setting instruction may be triggered by a touch operation of a user on a desktop setting button, or may be directly obtained by a terminal according to a setting after a target background picture is obtained. When the terminal displays the third desktop background picture in the album, the display effect of the third desktop background picture is as shown in fig. 20, and when the terminal sets the desktop background to preview and display the third desktop background picture, as shown in fig. 21, the third desktop background picture can be zoomed, the terminal can just display the target background picture in the third desktop background picture in the screen corresponding to the target model information, so that the user can obtain the desktop background display effect which is the same as the preview display effect in the above steps without manually zooming the picture when setting the desktop background, thereby reducing the user's operation and improving the desktop background setting efficiency, and the actual preview interface when the third desktop background picture is set as the desktop background is as shown in fig. 22. When the user determines to set the desktop background, the display effect of the desktop background of the terminal is shown in fig. 23, and the actual interface thereof is shown in fig. 24.
When the terminal displays the picture processing completion interface, the user can click the sharing function button, namely, the sharing operation is performed on the target background picture, and when the sharing instruction is obtained, the target background picture is sent to the terminal where the target account is located through the target application, wherein the target application is the application indicated by the sharing instruction, and the target account is the account indicated by the sharing instruction. Correspondingly, when the terminal obtains the third desktop background picture in step 208, the terminal may also send the third desktop background picture to other terminals when obtaining the sharing instruction triggered by the sharing operation on the third desktop background picture.
In practical applications, the image processing method may also be configured to send an image processing request to the server after the terminal acquires an instruction triggered by a user operation, provide an image processing service for the terminal by the server, and return the processed image to the terminal, so that the terminal acquires the processed image.
According to the method and the device, when the corresponding picture processing instruction is acquired for the picture of the desktop background of the screen corresponding to the target model information, the picture and the black picture are synthesized into the new picture, the black picture is arranged above the picture, and the new picture is zoomed to the size of the screen corresponding to the target model information, so that when the new picture obtained through processing is set as the desktop background, the periphery of the non-display area of the screen corresponding to the target model information is also displayed with black, the color of the non-display area is the same as that of the non-display area, the desktop background can be in a regular shape instead of an irregular special shape, and the picture quality and the display effect of the new picture cannot be changed due to the stretching problem.
Furthermore, the embodiment of the invention also cuts the original picture to obtain the picture of the desktop background to be set as the screen corresponding to the target model information, and does not deform the original picture, so that the processed picture has higher similarity with the original picture, and the original image quality and the display effect of the wallpaper can be highly restored. Furthermore, the embodiment of the invention also draws the new picture added with the black picture on the preset canvas with the size larger than the screen size corresponding to the target model information after zooming, so that when the picture corresponding to the preset canvas is set as the desktop background, the display effect of the picture preview display can be obtained without manually adjusting the picture by a user, and the operation of the user is reduced.
Next, a flow in the above-mentioned picture processing method is described with reference to fig. 25, when the terminal detects a picture importing operation of a user, the terminal may zoom the picture, acquire a mobile phone model, and preview and display the zoomed picture in the mobile phone model, that is, the terminal acquires an original picture in step 201 and step 202 and previews and displays the original picture. The mobile phone model is a screen template corresponding to the target model information. When the terminal previews and displays the picture, the original position of the picture in the mobile phone model can be recorded, and subsequent users may be satisfied with the current previewing and displaying effect or may not be satisfied with the current previewing and displaying effect and may want to adjust the image, so that two situations may be included. If the user performs zooming operation or dragging operation on the picture, the terminal recalculates the intercepting position according to the zooming ratio and the moving position of the user, namely, which part of the original picture is used as the first desktop background picture, so that the terminal can cut the picture according to the final position, and adds the Liuhai map to the cut picture, namely, synthesizes the preset picture into a connecting area above the first desktop background picture, thereby obtaining the second desktop background picture. And if the user does not perform zooming operation or dragging operation on the picture, but directly determines to generate a background desktop background based on the currently previewed picture, the terminal takes the original picture as a first desktop background picture, and adds the Liuhai map above the original picture to obtain a second desktop background picture. After that, the terminal can determine the scaling required for scaling the current picture to the screen size corresponding to the target model according to the mobile phone model, and can also determine the picture position when the scaled picture is drawn on the canvas, and finally, the terminal redraws the scaled picture on the canvas by using the system function, and stores the canvas in the album, wherein the canvas is the third desktop background picture. This process also corresponds to the above step 208 and the process of obtaining the third desktop background picture in the step 208.
In the embodiment of the present invention, a specific flow of the user operation and the terminal responding to the user operation in the above-mentioned picture processing process is described in detail through the method flow shown in fig. 26, and in this flow, only an iPhone X is taken as an example of a terminal of a target model, that is, a terminal having an undisplayed area when the iPhone X is used as a screen and is lighted is taken as an example for description. Referring to fig. 26, a user performs a picture importing operation at a terminal, the terminal may record an original size of an imported picture, and perform scaling on the picture in an equal proportion according to the size of the mobile phone model of iPhone X and the original size of the picture, and place the scaled picture in the mobile phone model to simulate a real wallpaper setting effect, that is, step 201 and step 202. The user can stretch the zoomed picture or the custom moved picture in a custom manner based on the current preview effect, when the terminal detects the operation of the user, that is, when an instruction triggered by the operation of the user is obtained, the zoomed or moved picture can be displayed in the mobile phone model, until the user adjusts the display effect that the user wants, the user clicks a generation button, that is, the user wants to generate the picture to be set as the desktop background based on the current display effect, and the process corresponds to the step 203. When the terminal detects a click operation of a user on a generation button or acquires an instruction triggered by the click operation, a picture in a current mobile phone model can be used as a display effect picture when a desktop background is set, namely the picture in the current mobile phone model is used as a second desktop background picture, wherein the second desktop background picture comprises a first desktop background picture displayed by a display area preview of the mobile phone model and a black area in the mobile phone model, namely a preset picture. Specifically, the process may be divided into a process of acquiring a first desktop background picture, a process of acquiring a preset picture, and a process of synthesizing the preset picture and the first desktop background picture. This process corresponds to steps 205 through 207 described above. Then, the terminal calculates the system zoom ratio when directly setting the synthesized picture as the wallpaper, and generates a picture with a size larger than the screen size for fidelity, where the picture with the size larger than the screen size is the third desktop background picture, and the process may also include a process of obtaining the target desktop background picture and obtaining the third desktop background picture, that is, corresponding to step 208 above. The size of the third desktop background picture is larger than the size of the screen corresponding to the target model information, so that the third desktop background picture can be directly selected as the desktop background without manual adjustment of a user.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again.
Fig. 27 is a schematic structural diagram of a picture processing apparatus according to an embodiment of the present invention, and referring to fig. 27, the apparatus includes:
an obtaining module 2701, configured to obtain an image processing instruction corresponding to a first desktop background image, where the image processing instruction carries target model information;
the obtaining module 2701 is further configured to obtain a preset picture corresponding to the target model information according to the picture processing instruction, where pixel points of the preset picture are black pixel points, and the shape of the preset picture corresponds to the target model information;
a synthesizing module 2702, configured to synthesize the preset picture to a connection area above the first desktop background picture to obtain a second desktop background picture, where an aspect ratio of the second desktop background picture is the same as a screen aspect ratio corresponding to the target model information;
the processing module 2703 is configured to perform scaling processing on the second desktop background picture according to the screen size corresponding to the target model information, so as to obtain a target background picture with the same size as the screen size.
In one possible implementation, the obtaining module 2701 is further configured to:
determining that the width ratio of the first desktop background picture is a first height of the screen width-height ratio corresponding to the target model information;
obtaining a second height by using the difference between the first height and the height of the first desktop background picture;
and acquiring a black picture with the width of the first desktop background picture and the height of the second desktop background picture.
In one possible implementation, the processing module 2703 is configured to:
determining the scaling of the second desktop background picture according to the screen size corresponding to the target model information, wherein the scaling of the second desktop background picture is used for scaling the second desktop background picture to the screen size corresponding to the target model information;
and zooming the second desktop background picture to a target background picture according to the zooming proportion of the second desktop background picture.
In a possible implementation manner, the processing module 2703 is further configured to invoke a system function, and draw the target background picture in a target area on a preset canvas to obtain a third desktop background picture, where the size of the target area is the same as the size of the screen corresponding to the target model information, and the size of the third desktop background picture is larger than the size of the screen corresponding to the target model information.
In one possible implementation, the apparatus further includes:
and the display module is used for displaying the third desktop background picture when a desktop background setting instruction is acquired, displaying the target background picture in a screen corresponding to the target model information, and setting the third desktop background picture as the desktop background of the screen corresponding to the target model information by using the desktop background setting instruction.
In one possible implementation of the method according to the invention,
the obtaining module 2701 is further configured to obtain an original picture to be processed when the picture selection instruction is obtained;
the device also includes:
the preview display module is used for zooming the original picture and displaying the zoomed original picture in a screen template corresponding to target model information when a preview display instruction for the original picture is acquired, wherein the preview display instruction carries the size of the screen template corresponding to the target model information, and the screen template is a template obtained by zooming a screen corresponding to the target model information according to a preset zoom ratio;
the preview display module is further configured to, when a picture setting instruction is obtained, zoom or translate the original picture, and display a first desktop background picture to be obtained in the screen template, where the picture setting operation is used to zoom or translate the original picture.
In one possible implementation, the apparatus further includes:
and the sending module is used for sending the target background picture to a terminal where a target account is located through a target application when the sharing instruction is obtained, wherein the target application is the application indicated by the sharing instruction, and the target account is the account indicated by the sharing instruction.
According to the device provided by the embodiment of the invention, when the corresponding picture processing instruction is acquired for the picture of the desktop background of the screen corresponding to the target model information to be set, the picture and the black picture are synthesized into a new picture, the black picture is arranged above the picture, and the new picture is zoomed to the size of the screen corresponding to the target model information, so that when the new picture obtained by processing is set as the desktop background, black is displayed around the non-display area of the screen corresponding to the target model information, and the color of the non-display area is the same as that of the non-display area, the desktop background can be in a regular shape instead of a non-regular special shape, and the picture quality and the display effect of the new picture cannot be changed due to the stretching problem.
It should be noted that: in the image processing apparatus provided in the above embodiment, when processing an image, only the division of the above functional modules is exemplified, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above described functions. In addition, the image processing apparatus and the image processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Fig. 28 is a block diagram of a terminal according to an embodiment of the present invention. The terminal may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. A terminal may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
Generally, a terminal includes: a processor 2801 and a memory 2802.
Processor 2801 may include one or more processing cores such as 4-core processors, 8-core processors, and so forth. The processor 2801 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 2801 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 2801 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 2801 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
Memory 2802 may include one or more computer-readable storage media, which may be non-transitory. Memory 2802 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 2802 is used to store at least one instruction for execution by processor 2801 to implement a picture processing method provided by method embodiments of the present invention.
In some embodiments, the terminal may further include: a peripheral interface 2803 and at least one peripheral. The processor 2801, memory 2802, and peripheral interface 2803 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 2803 by buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of a radio frequency circuit 2804, a touch display screen 2805, a camera 2806, an audio circuit 2807, a positioning component 2808, and a power supply 2809.
The peripheral interface 2803 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 2801 and the memory 2802. In some embodiments, processor 2801, memory 2802, and peripheral interface 2803 are integrated on the same chip or circuit board; in some other embodiments, any one or both of the processor 2801, the memory 2802, and the peripheral interface 2803 may be implemented on separate chips or circuit boards, which are not limited in this embodiment.
The Radio Frequency circuit 2804 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 2804 communicates with a communication network and other communication devices by electromagnetic signals. The radio frequency circuit 2804 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 2804 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 2804 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 2804 may also include NFC (Near Field Communication) related circuits, which are not limited by the present invention.
The display screen 2805 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When display screen 2805 is a touch display screen, display screen 2805 also has the ability to capture touch signals on or over the surface of display screen 2805. The touch signal may be input to the processor 2801 as a control signal for processing. At this point, the display 2805 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 2805 may be one, providing the front panel of the terminal; in other embodiments, the display 2805 may be at least two, each disposed on a different surface of the terminal or in a folded design; in still other embodiments, the display 2805 may be a flexible display disposed on a curved surface or a folded surface of the terminal. Even further, the display screen 2805 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 2805 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 2806 is used to capture images or video. Optionally, camera assembly 2806 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 2806 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 2807 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 2801 for processing or inputting the electric signals to the radio frequency circuit 2804 for voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones can be arranged at different parts of the terminal respectively. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 2801 or the radio frequency circuit 2804 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuit 2807 may also include a headphone jack.
The positioning component 2808 is employed to locate a current geographic Location of the terminal to implement navigation or LBS (Location Based Service). The Positioning component 2808 can be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union galileo System.
The power supply 2809 is used to supply power to various components in the terminal. Power supply 2809 can be alternating current, direct current, disposable batteries, or rechargeable batteries. When power supply 2809 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal also includes one or more sensors 2810. The one or more sensors 2810 include, but are not limited to: acceleration sensor 2811, gyroscope sensor 2812, pressure sensor 2813, fingerprint sensor 2814, optical sensor 2815, and proximity sensor 2816.
The acceleration sensor 2811 can detect the magnitude of acceleration on three coordinate axes of a coordinate system established with the terminal. For example, the acceleration sensor 2811 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 2801 can control the touch display screen 2805 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 2811. The acceleration sensor 2811 may also be used for game or user motion data acquisition.
The gyro sensor 2812 may detect a body direction and a rotation angle of the terminal, and the gyro sensor 2812 may cooperate with the acceleration sensor 2811 to acquire a 3D motion of the user with respect to the terminal. From the data collected by the gyro sensor 2812, the processor 2801 may perform the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensors 2813 may be disposed on a side bezel of the terminal and/or an underlying layer of the touch display 2805. When the pressure sensor 2813 is disposed on the side frame of the terminal, a user's holding signal to the terminal can be detected, and the processor 2801 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 2813. When the pressure sensor 2813 is disposed at a lower layer of the touch display screen 2805, the processor 2801 controls an operability control on the UI interface according to a pressure operation of the user on the touch display screen 2805. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 2814 is configured to collect a fingerprint of a user, and the processor 2801 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 2814, or the fingerprint sensor 2814 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 2801 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 2814 may be disposed on the front, back, or side of the terminal. When a physical key or a vendor Logo is provided on the terminal, the fingerprint sensor 2814 may be integrated with the physical key or the vendor Logo.
Optical sensor 2815 is used to collect ambient light intensity. In one embodiment, the processor 2801 can control the display brightness of the touch display 2805 based on the ambient light intensity collected by the optical sensor 2815. Specifically, when the ambient light intensity is high, the display luminance of the touch display screen 2805 is adjusted high; when the ambient light intensity is low, the display brightness of the touch display screen 2805 is turned down. In another embodiment, processor 2801 may also dynamically adjust the imaging parameters of camera assembly 2806 based on the intensity of ambient light collected by optical sensor 2815.
The proximity sensor 2816, also called a distance sensor, is generally provided on the front panel of the terminal. The proximity sensor 2816 is used to collect a distance between a user and a front surface of the terminal. In one embodiment, the touch display screen 2805 is controlled by the processor 2801 to switch from a bright screen state to a rest screen state when the proximity sensor 2816 detects that the distance between the user and the front face of the terminal is gradually decreasing; when the proximity sensor 2816 detects that the distance between the user and the front surface of the terminal gradually becomes larger, the touch display screen 2805 is controlled by the processor 2801 to switch from a breath screen state to a bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 28 is not intended to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 29 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 2901 and one or more memories 2902, where the memory 2902 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 2901 to implement the picture processing method provided by the above-mentioned method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a computer-readable storage medium, such as a memory, including instructions executable by a processor in a terminal to perform the picture processing method in the above embodiments. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A picture processing method, characterized in that the method comprises:
acquiring a picture processing instruction corresponding to a first desktop background picture, wherein the picture processing instruction carries target model information;
acquiring a preset picture corresponding to the target model information according to the picture processing instruction, wherein pixel points of the preset picture are black pixel points, and the shape of the preset picture corresponds to the target model information;
synthesizing the preset picture to a connecting area above the first desktop background picture to obtain a second desktop background picture, wherein the aspect ratio of the second desktop background picture is the same as the aspect ratio of the screen corresponding to the target model information;
and zooming the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same size as the screen size.
2. The method according to claim 1, wherein the obtaining a preset picture corresponding to the target model information according to the picture processing instruction includes:
determining a first height, wherein the ratio of the width of the first desktop background picture to the first height is equal to the aspect ratio of the screen corresponding to the target model information;
obtaining a second height by using the difference between the first height and the height of the first desktop background picture;
and acquiring a black picture with the width of the first desktop background picture and the height of the second desktop background picture.
3. The method according to claim 1, wherein the scaling the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same screen size as the screen size includes:
determining the scaling of the second desktop background picture according to the screen size corresponding to the target model information, wherein the scaling of the second desktop background picture is used for scaling the second desktop background picture to the screen size corresponding to the target model information;
and zooming the second desktop background picture to a target background picture according to the zooming proportion of the second desktop background picture.
4. The method according to claim 1, wherein after the scaling processing is performed on the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same screen size as the screen size, the method further comprises:
and calling a system function, and drawing the target background picture in a target area on a preset canvas to obtain a third desktop background picture, wherein the size of the target area is the same as that of the screen corresponding to the target model information, and the size of the third desktop background picture is larger than that of the screen corresponding to the target model information.
5. The method of claim 4, further comprising:
and when a desktop background setting instruction is acquired, displaying the third desktop background picture, and displaying the target background picture in a screen corresponding to the target model information, wherein the desktop background setting instruction is used for setting the third desktop background picture as the desktop background of the screen corresponding to the target model information.
6. The method of claim 1, wherein prior to obtaining the picture processing instruction corresponding to the first desktop background picture, the method further comprises:
when a picture selection instruction is obtained, obtaining an original picture to be processed;
when a preview display instruction for the original picture is acquired, zooming the original picture, and displaying the zoomed original picture in a screen template corresponding to target model information, wherein the preview display instruction carries the size of the screen template corresponding to the target model information, and the screen template is a template obtained by zooming a screen corresponding to the target model information according to a preset zoom ratio;
when a picture setting instruction is acquired, zooming or translating the original picture, and displaying a first desktop background picture to be acquired in the screen template, wherein the picture setting instruction is used for zooming or translating the original picture.
7. The method according to claim 1, wherein after the scaling processing is performed on the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same screen size as the screen size, the method further comprises:
when a sharing instruction is obtained, the target background picture is sent to a terminal where a target account is located through a target application, the target application is the application indicated by the sharing instruction, and the target account is the account indicated by the sharing instruction.
8. A picture processing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a picture processing instruction corresponding to a first desktop background picture, wherein the picture processing instruction carries target model information;
the acquisition module is further configured to acquire a preset picture corresponding to the target model information according to the picture processing instruction, wherein pixel points of the preset picture are black pixel points, and the shape of the preset picture corresponds to the target model information;
the synthesis module is used for synthesizing the preset picture to a connection area above the first desktop background picture to obtain a second desktop background picture, and the aspect ratio of the second desktop background picture is the same as the aspect ratio of the screen corresponding to the target model information;
and the processing module is used for zooming the second desktop background picture according to the screen size corresponding to the target model information to obtain a target background picture with the same size as the screen size.
9. The apparatus of claim 8, wherein the obtaining module is further configured to:
determining a first height, wherein the ratio of the width of the first desktop background picture to the first height is equal to the aspect ratio of the screen corresponding to the target model information;
obtaining a second height by using the difference between the first height and the height of the first desktop background picture;
and acquiring a black picture with the width of the first desktop background picture and the height of the second desktop background picture.
10. The apparatus of claim 8, wherein the processing module is configured to:
determining the scaling of the second desktop background picture according to the screen size corresponding to the target model information, wherein the scaling of the second desktop background picture is used for scaling the second desktop background picture to the screen size corresponding to the target model information;
and zooming the second desktop background picture to a target background picture according to the zooming proportion of the second desktop background picture.
11. The apparatus according to claim 8, wherein the processing module is further configured to invoke a system function, and draw the target background picture in a target area on a preset canvas to obtain a third desktop background picture, where a size of the target area is the same as a size of a screen corresponding to the target model information, and the size of the third desktop background picture is larger than the size of the screen corresponding to the target model information.
12. The apparatus of claim 11, further comprising:
and the display module is used for displaying the third desktop background picture when a desktop background setting instruction is acquired, and displaying the target background picture in a screen corresponding to the target model information, wherein the desktop background setting instruction is used for setting the third desktop background picture as the desktop background of the screen corresponding to the target model information.
13. The apparatus of claim 8, further comprising:
and the sending module is used for sending the target background picture to a terminal where a target account is located through a target application when the sharing instruction is obtained, wherein the target application is the application indicated by the sharing instruction, and the target account is the account indicated by the sharing instruction.
14. A terminal, characterized in that the terminal comprises a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the operation performed by the picture processing method according to any one of claims 1 to 7.
15. A computer-readable storage medium having at least one instruction stored therein, which is loaded and executed by a processor to implement the operations performed by the picture processing method according to any one of claims 1 to 7.
CN201810348881.4A 2018-04-18 2018-04-18 Picture processing method, device, terminal and computer readable storage medium Active CN108595239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810348881.4A CN108595239B (en) 2018-04-18 2018-04-18 Picture processing method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810348881.4A CN108595239B (en) 2018-04-18 2018-04-18 Picture processing method, device, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108595239A CN108595239A (en) 2018-09-28
CN108595239B true CN108595239B (en) 2021-08-13

Family

ID=63611086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810348881.4A Active CN108595239B (en) 2018-04-18 2018-04-18 Picture processing method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108595239B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598138B (en) * 2018-11-15 2023-07-11 创新先进技术有限公司 Method and device for identifying, covering and sensing whether sensitive information in picture is checked or not
CN110059274A (en) * 2019-03-15 2019-07-26 平安普惠企业管理有限公司 Front end picture amplifying method, device, computer equipment and storage medium
CN110047043B (en) * 2019-03-16 2022-11-08 平安普惠企业管理有限公司 Background image processing method, background image processing device, computer equipment and storage medium
CN112148398B (en) * 2019-06-28 2022-10-11 杭州海康机器人技术有限公司 Image processing method and device
CN110992268B (en) * 2019-12-06 2023-09-29 广州酷狗计算机科技有限公司 Background setting method, device, terminal and storage medium
CN111063001B (en) * 2019-12-18 2023-11-10 北京金山安全软件有限公司 Picture synthesis method, device, electronic equipment and storage medium
CN111159447A (en) * 2019-12-27 2020-05-15 海南简族信息技术有限公司 Picture display method, device and equipment and computer readable storage medium
CN111182208B (en) * 2019-12-31 2021-09-10 Oppo广东移动通信有限公司 Photographing method and device, storage medium and electronic equipment
CN111367445B (en) * 2020-03-31 2021-07-09 中国建设银行股份有限公司 Image annotation method and device
CN112055244B (en) * 2020-09-04 2022-06-21 维沃移动通信有限公司 Image acquisition method and device, server and electronic equipment
CN112948045A (en) * 2021-03-12 2021-06-11 深圳创维-Rgb电子有限公司 Picture display method, device, equipment and computer readable storage medium
CN113419802B (en) * 2021-06-21 2022-08-05 网易(杭州)网络有限公司 Atlas generation method and apparatus, electronic device and storage medium
CN113420176A (en) * 2021-06-22 2021-09-21 百度在线网络技术(北京)有限公司 Question searching method, question frame drawing method and device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408754A (en) * 2014-10-28 2015-03-11 久邦计算机技术(广州)有限公司 Icon synthesis method
CN104461439A (en) * 2014-12-29 2015-03-25 联想(北京)有限公司 Information processing method and electronic equipment
CN104461280A (en) * 2014-11-03 2015-03-25 联想(北京)有限公司 Information processing method and electronic device
CN105096354A (en) * 2014-05-05 2015-11-25 腾讯科技(深圳)有限公司 Image processing method and device
CN105843595A (en) * 2014-10-27 2016-08-10 中兴通讯股份有限公司 Method, device, and terminal for interface display
CN106780346A (en) * 2017-01-19 2017-05-31 努比亚技术有限公司 A kind of picture splicing apparatus and method based on edge input

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102008054113A1 (en) * 2008-10-31 2010-05-06 Deutsche Telekom Ag Method for adapting the background image on a screen

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096354A (en) * 2014-05-05 2015-11-25 腾讯科技(深圳)有限公司 Image processing method and device
CN105843595A (en) * 2014-10-27 2016-08-10 中兴通讯股份有限公司 Method, device, and terminal for interface display
CN104408754A (en) * 2014-10-28 2015-03-11 久邦计算机技术(广州)有限公司 Icon synthesis method
CN104461280A (en) * 2014-11-03 2015-03-25 联想(北京)有限公司 Information processing method and electronic device
CN104461439A (en) * 2014-12-29 2015-03-25 联想(北京)有限公司 Information processing method and electronic equipment
CN106780346A (en) * 2017-01-19 2017-05-31 努比亚技术有限公司 A kind of picture splicing apparatus and method based on edge input

Also Published As

Publication number Publication date
CN108595239A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
CN108595239B (en) Picture processing method, device, terminal and computer readable storage medium
CN109977333B (en) Webpage display method and device, computer equipment and storage medium
CN109191549B (en) Method and device for displaying animation
CN108449641B (en) Method, device, computer equipment and storage medium for playing media stream
CN108965922B (en) Video cover generation method and device and storage medium
CN111464749B (en) Method, device, equipment and storage medium for image synthesis
CN108196755B (en) Background picture display method and device
CN109862412B (en) Method and device for video co-shooting and storage medium
WO2022134632A1 (en) Work processing method and apparatus
CN110225390B (en) Video preview method, device, terminal and computer readable storage medium
CN110321126B (en) Method and device for generating page code
CN112565806B (en) Virtual gift giving method, device, computer equipment and medium
CN110839174A (en) Image processing method and device, computer equipment and storage medium
CN112363660B (en) Method and device for determining cover image, electronic equipment and storage medium
CN108734662B (en) Method and device for displaying icons
CN111142838A (en) Audio playing method and device, computer equipment and storage medium
CN111083526B (en) Video transition method and device, computer equipment and storage medium
CN108664300B (en) Application interface display method and device in picture-in-picture mode
CN108845777B (en) Method and device for playing frame animation
CN112770177B (en) Multimedia file generation method, multimedia file release method and device
CN110992268B (en) Background setting method, device, terminal and storage medium
CN112616082A (en) Video preview method, device, terminal and storage medium
CN113467682B (en) Method, device, terminal and storage medium for controlling movement of map covering
CN112637624B (en) Live stream processing method, device, equipment and storage medium
CN112612405B (en) Window display method, device, equipment 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
GR01 Patent grant
GR01 Patent grant