Image processing method and related device

By implementing the method of not displaying some elements during the cropping process in the picture library application of the terminal device and redisplaying them after the cropping is completed, the problem of insufficient flexibility in the picture library application of the terminal device is solved, and the user experience is improved.

CN117893639BActive Publication Date: 2025-08-01HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211261751.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-14
Publication Date
2025-08-01
Estimated Expiration
2042-10-14

AI Technical Summary

Technical Problem

The image gallery applications of existing terminal devices are less flexible when processing pictures, making it difficult for users to achieve flexible element display and cropping, resulting in the processing results that do not meet expectations and affect the user experience.

Method used

During the cropping process, some elements are not displayed for the time being. After the cropping is completed, they are redisplayed according to the size and position of the picture. Users can intuitively see and crop other elements, and provide one-click saving function to simplify the operation process.

Benefits of technology

It improves the flexibility and convenience of image processing, meets the actual needs of users, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117893639B_ABST
    Figure CN117893639B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides an image processing method and related device. The method includes: a terminal device displays a first image; the terminal device adds a first type of element to the first image; the terminal device adds a second type of element to the first image; the terminal device receives a cropping operation; in response to the cropping operation, the terminal device displays the first image, displays the second type of element, displays the cropping area corresponding to the cropping operation, and does not display the first type of element; when the cropping operation ends, the terminal device obtains a second image, and the second image includes: the first type of element, the content of the first image within the range covered by the target cropping area, and the content of the second type of element within the range covered by the target cropping area; the target cropping area is the cropping area corresponding to the end time of the cropping operation. In this way, the flexibility of image processing can be improved, the result of image processing can be made more in line with the user's expectations, and the user experience can be enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and in particular, to an image processing method and related device. Background Art

[0002] With the development of terminal technology, the image processing functions supported by terminal devices are becoming increasingly rich. Users can process target images through the editing function in the terminal device's gallery application.

[0003] However, when using the gallery application of a terminal device to process images, the processing flexibility is low and the convenience is poor. The processing result of the image may not meet the user's expectations, affecting the user experience. Summary of the Invention

[0004] Embodiments of this application provide an image processing method and related device. When a user performs a cropping operation on an image, a part of the elements on the image are temporarily not displayed and cannot be cropped. After the cropping is completed, this part of the elements can be displayed on the cropped image according to the size, position, etc. of the cropped image. Another part of the elements on the image are displayed, and during the cropping process, the user can intuitively see this part of the elements and can crop this part of the elements, thereby improving the flexibility of image processing.

[0005] In a first aspect, embodiments of this application propose an image processing method, which includes:

[0006] The terminal device displays a first image; the terminal device adds a first type of element to the first image; the terminal device adds a second type of element to the first image; the terminal device receives a cropping operation, and the cropping operation continuously acts on the interface of the terminal device; in response to the cropping operation, the terminal device displays the first image, displays the second type of element, displays the cropping area corresponding to the cropping operation, and does not display the first type of element; when the cropping operation ends, the terminal device obtains a second image, and the second image includes: the first type of element, the content of the first image within the coverage of the target cropping area, and the content of the second type of element within the coverage of the target cropping area; the target cropping area is the cropping area corresponding to the end moment of the cropping operation. In this way, the user can preview the cropping effect in real time, and can also improve the flexibility of image processing, making the result of image processing more in line with the user's expectations and enhancing the user experience.

[0007] In a possible implementation, the first type of element includes one or more of the following: text, watermark, or sticker; the second type of element includes one or more of the following: graffiti or mosaic. In this way, according to the actual needs of the user, the content included in the first type of element and the content included in the second type of element can be adjusted, so that some elements are displayed and some elements are not displayed during the cropping process, improving the flexibility of image processing and meeting the actual needs of the user.

[0008] In a possible implementation, the first type of elements includes one or more of the following: doodles, watermarks or stickers; the second type of elements includes one or more of the following: text or mosaics. In this way, according to the actual needs of the user, the content included in the first type of elements and the content included in the second type of elements can be adjusted, so that some elements are displayed and some elements are not displayed during the cropping process, improving the flexibility of image processing and meeting the actual needs of the user.

[0009] In a possible implementation, the gap between the position of the first type of elements in the second picture and the position of the first type of elements in the first picture is less than a preset value. In this way, the coordination degree of the cropped picture and the added elements can be improved, and the user experience can be enhanced.

[0010] In a possible implementation, before the terminal device receives the cropping operation, it further includes: the terminal device receives a first operation; in response to the first operation, the terminal device adds a photo frame to the periphery of the first picture; wherein, when the cropping operation continuously acts on the interface of the terminal device, the terminal device does not display the photo frame; when the cropping operation ends, the periphery of the second picture includes the photo frame. In this way, when the user crops the picture, the photo frame is not affected by the cropping and can be redisplayed on the periphery of the cropped picture after the cropping is completed, meeting the user's expectation for image processing and enhancing the user experience.

[0011] In a possible implementation, after the terminal device displays the first picture, it further includes: the terminal device receives a second operation on the first picture in the gallery application; in response to the second operation, the terminal device displays a toolbar, wherein the toolbar includes a primary toolbar and does not include a secondary toolbar. In this way, the user can select the functions that need to be used in the toolbar without having to expand the secondary toolbar, facilitating the user to find each function, reducing the number of interface jumps, and making the user's operation more convenient.

[0012] In a possible implementation, the primary toolbar includes one or more of the following functions: cropping, filtering, adjusting, beautifying, doodling, text, mosaic, watermark, photo frame, blurring, retaining color or sticker. In this way, all the image processing functions are placed in one toolbar, and the user can select the functions that need to be used in the primary toolbar, facilitating the user to find each function, reducing the number of interface jumps, and making the user's operation more convenient.

[0013] In a possible implementation, some functions are displayed in the primary toolbar. The method further includes: when a sliding operation is received in the primary toolbar, based on the sliding direction of the sliding operation, display the functions that are hidden in the sliding direction in the primary toolbar. In this way, all the image processing functions are placed in one toolbar, and the user can select the functions to be used through the sliding operation without having to expand the secondary toolbar, which is convenient for the user to find each function, reduces the number of interface jumps, and makes the user's operation more convenient.

[0014] In a possible implementation, after the terminal device obtains the second picture, it further includes: the terminal device receives a third operation; in response to the third operation, the terminal device saves the second picture. In this way, it is possible to implement one-key saving of the processed picture, making the user's operation simpler and faster.

[0015] In a possible implementation, before the terminal device adds a second type of element to the first picture, it further includes: the terminal device receives a fourth operation; in response to the fourth operation, the terminal device displays a filter toolbar, and the filter toolbar includes one or more filter options; when a trigger on the first filter option among the multiple filter options is received, the terminal device adds the first filter corresponding to the first filter option to the first picture, and, displays the first filter option as the selected state; between the terminal device adding the second type of element to the first picture and the terminal device receiving a cropping operation, it further includes: the terminal device receives a fifth operation; in response to the fifth operation, the terminal device displays the filter toolbar, and in the filter toolbar, the first filter option is in the selected state; when a trigger on the second filter option among the multiple filter options is received, the terminal device switches the first filter to the second filter corresponding to the second filter option, and in the filter toolbar, the second filter option is in the selected state and the first filter option is not in the selected state. In this way, it is possible to facilitate the user to process pictures, make the user's operation more convenient, and improve the user's experience.

[0016] In a possible implementation, before the terminal device adds a second type of element to the first picture, it further includes: the terminal device receives a sixth operation; in response to the sixth operation, the terminal device adds the first text to the first picture; between the terminal device adding the second type of element to the first picture and the terminal device receiving a cropping operation, it further includes: the terminal device receives a seventh operation; in response to the seventh operation, the first text is displayed as editable; the terminal device receives an eighth operation; in response to the eighth operation, the terminal device changes the first text to the second text. In this way, it is possible to facilitate the user to process pictures and improve the user's experience.

[0017] In a possible implementation, before the terminal device displays the first picture, it further includes: the terminal device displays the interface of the picture gallery, and the interface of the picture gallery includes one or more pictures; the terminal device receives a ninth operation; in response to the ninth operation, the terminal device displays the first picture. In this way, the user can process pictures through the picture gallery application in the terminal device, without importing pictures in a third-party picture processing software for processing, making picture processing more convenient and fast.

[0018] In a second aspect, an embodiment of the present application provides a picture processing device. The picture processing device may be a terminal device, or a chip or a chip system inside the terminal device. The picture processing device may include a processing unit and a display unit. The processing unit is used to implement any method related to processing in the first aspect or any possible implementation manner of the first aspect. When the picture processing device is a terminal device, the processing unit may be a processor. The display unit is used to support the picture processing device to display image information and the like. The picture processing device may further include a storage unit, and the storage unit may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit, so that the terminal device implements a method described in the first aspect or any possible implementation manner of the first aspect. When the picture processing device is a chip or a chip system inside the terminal device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit, so that the terminal device implements a method described in the first aspect or any possible implementation manner of the first aspect. The storage unit may be a storage unit inside the chip (for example, registers, caches, etc.), or a storage unit outside the chip in the terminal device (for example, read-only memory, random access memory, etc.).

[0019] Exemplarily, the display unit is used to display the first picture; the processing unit is used to add a first type of element to the first picture; the processing unit is further used to add a second type of element to the first picture; the processing unit is further used to receive a cropping operation, and the cropping operation continuously acts on the interface of the terminal device; in response to the cropping operation, the display unit is further used to display the first picture, display the second type of element, display the cropping area corresponding to the cropping operation, and not display the first type of element; the processing unit is further used to obtain a second picture when the cropping operation ends, and the second picture includes: the first type of element, the content of the first picture within the coverage of the target cropping area, and the content of the second type of element within the coverage of the target cropping area; the target cropping area is the cropping area corresponding to the end moment of the cropping operation.

[0020] In a possible implementation, the first type of element includes one or more of the following: text, watermark or sticker; the second type of element includes one or more of the following: graffiti or mosaic.

[0021] In a possible implementation, the first type of elements includes one or more of the following: doodles, watermarks, or stickers; the second type of elements includes one or more of the following: text or mosaics.

[0022] In a possible implementation, the gap between the position of the first type of elements in the second picture and the position of the first type of elements in the first picture is less than a preset value.

[0023] In a possible implementation, the processing unit is further configured to receive a first operation; in response to the first operation, the processing unit is further configured to add a photo frame to the periphery of the first picture; wherein, when the cropping operation continuously acts on the interface of the terminal device, the terminal device does not display the photo frame; when the cropping operation ends, the periphery of the second picture includes the photo frame.

[0024] In a possible implementation, the processing unit is further configured to receive a second operation on the first picture in the gallery application; in response to the second operation, the display unit is further configured to display a toolbar, wherein the toolbar includes a primary toolbar and does not include a secondary toolbar.

[0025] In a possible implementation, the primary toolbar includes one or more of the following functions: cropping, filtering, adjusting, beautifying, doodling, text, mosaic, watermark, photo frame, blurring, retaining color, or sticker.

[0026] In a possible implementation, some functions are displayed in the primary toolbar, and the display unit is further configured to, when a sliding operation is received in the primary toolbar, display the functions hidden in the sliding direction in the primary toolbar based on the sliding direction of the sliding operation.

[0027] In a possible implementation, the processing unit is further configured to receive a third operation; in response to the third operation, the processing unit is further configured to save the second picture.

[0028] In a possible implementation, the processing unit is further configured to receive a fourth operation; in response to the fourth operation, the display unit is further configured to display a filter toolbar, and the filter toolbar includes one or more filter options; the processing unit is further configured to, when a trigger on a first filter option among the multiple filter options is received, add a first filter corresponding to the first filter option to the first picture, and the display unit is further configured to, when a trigger on the first filter option among the multiple filter options is received, display the first filter option as being in a selected state; the processing unit is further configured to receive a fifth operation; in response to the fifth operation, the display unit is further configured to display the filter toolbar, and in the filter toolbar, the first filter option is in a selected state; the processing unit is further configured to, when a trigger on a second filter option among the multiple filter options is received, switch the first filter to a second filter corresponding to the second filter option, and in the filter toolbar, the second filter option is in a selected state and the first filter option is in an unselected state.

[0029] In one possible implementation, the processing unit is further configured to receive a sixth operation; in response to the sixth operation, the processing unit is further configured to add first text to a first picture; the processing unit is further configured to add a second type of element to the first picture, the processing unit is further configured to receive a seventh operation; in response to the seventh operation, the display unit is further configured to display the first text in an editable state; the processing unit is further configured to receive an eighth operation; in response to the eighth operation, the processing unit is further configured to modify the first text to second text.

[0030] In one possible implementation, the display unit is further configured to display an interface of a picture gallery, and the interface of the picture gallery includes one or more pictures; the processing unit is further configured to receive a ninth operation; in response to the ninth operation, the display unit is configured to display a first picture.

[0031] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory. The memory is used to store code instructions, and the processor is used to run the code instructions to execute the method described in the first aspect or any one of the possible implementation manners of the first aspect.

[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method as described in the first aspect is implemented.

[0033] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run, the computer is caused to execute the method as described in the first aspect.

[0034] In a sixth aspect, an embodiment of the present application provides a chip, which includes a processor. The processor is used to call a computer program in a memory to execute the method as described in the first aspect.

[0035] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar and will not be elaborated herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a schematic diagram of picture processing in one possible implementation;

[0037] Figure 2 It is a schematic diagram of element addition in one possible implementation;

[0038] Figure 3 It is a schematic diagram of picture cropping in one possible implementation;

[0039] Figure 4 It is a schematic diagram of filter addition in one possible implementation;

[0040] Figure 5 It is a schematic diagram of an editing process in a possible implementation;

[0041] Figure 6 It is a schematic diagram of the structure of the terminal device provided by the embodiments of the present application;

[0042] Figure 7 It is a schematic diagram of the software architecture of a terminal device provided by the embodiments of the present application;

[0043] Figure 8 It is a schematic diagram of a logical layer provided by the embodiments of the present application;

[0044] Figure 9 It is a schematic diagram of a physical layer provided by the embodiments of the present application;

[0045] Figure 10 It is a schematic diagram of the toolbar provided by the embodiments of the present application;

[0046] Figure 11 It is a diagram of the filter editing interface provided by the embodiments of the present application;

[0047] Figure 12 It is a diagram of the text editing interface provided by the embodiments of the present application;

[0048] Figure 13 It is a diagram of the picture cropping interface provided by the embodiments of the present application;

[0049] Figure 14 It is a schematic diagram of the structure of a picture processing device provided by the embodiments of the present application;

[0050] Figure 15 It is a schematic diagram of the hardware structure of a control device provided by the embodiments of the present application;

[0051] Figure 16 It is a schematic diagram of the structure of a chip provided by the embodiments of the present application. Detailed implementation manners

[0052] To facilitate a clear description of the technical solutions of the embodiments of the present application, the following briefly introduces some of the terms and technologies involved in the embodiments of the present application:

[0053] 1. Terms

[0054] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or more advantageous than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.

[0055] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, or B exists alone, where A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple.

[0056] It should be noted that "when..." in the embodiments of the present application may be at the instant when a certain situation occurs or within a period of time after a certain situation occurs. The embodiments of the present application do not make specific limitations on this. In addition, the display interface provided in the embodiments of the present application is only an example, and the display interface may also include more or less content.

[0057] 2. Terminal device

[0058] The terminal device in the embodiments of the present application can also be any form of electronic device. For example, the electronic device can include a handheld device with image processing functions, a vehicle-mounted device, etc. For example, some electronic devices are: mobile phone, tablet computer, handheld computer, laptop computer, mobile internet device (MID), wearable device, virtual reality (VR) device, augmented reality (AR) device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication function, computing device or other processing device connected to a wireless modem, vehicle-mounted device, wearable device, terminal device in a 5G network or terminal device in a future evolved public land mobile network (PLMN), etc. The embodiments of the present application are not limited thereto.

[0059] By way of example and not limitation, in the embodiments of the present application, the electronic device can also be a wearable device. A wearable device can also be called a wearable intelligent device, which is a general term for devices developed by applying wearable technology to the intelligent design of daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. A wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable intelligent devices include those with complete functions and large sizes that can realize complete or partial functions without relying on a smart phone, such as smart watches or smart glasses, etc., and those that only focus on a certain type of application function and need to cooperate with other devices such as smart phones, such as various smart bracelets and smart jewelry for physical sign monitoring.

[0060] In addition, in the embodiments of the present application, the electronic device may also be a terminal device in an Internet of Things (IoT) system. The IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-object interconnection.

[0061] The electronic device in the embodiments of the present application may also be referred to as: terminal device, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile terminal, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc.

[0062] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also referred to as main memory). The operating system can be any one or more computer operating systems that implement service processing through processes. For example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system, etc. The application layer includes applications such as a browser, an address book, a word processing software, and an instant messaging software.

[0063] It can be understood that in Figures 1 - 5 、 Figures 10 - 13 the corresponding embodiments, taking the terminal device as a mobile phone and the user processing pictures through the gallery application in the mobile phone as an example for illustration, this example does not limit the embodiments of the present application.

[0064] Exemplarily, Figure 1 is a schematic diagram of picture processing in a possible implementation.

[0065] As Figure 1 shown in interface a in, the gallery application (APP) of the mobile phone may include one or more pictures. After the mobile phone receives the operation of the user selecting a certain picture in the gallery APP, such as picture 101, the display interface of the mobile phone changes from Figure 1 a in to Figure 1 b in.

[0066] As Figure 1The interface shown in Figure b. The interface displayed on the mobile phone includes Picture 101, a share icon, a favorite icon, an edit icon 102, a delete icon, and a more icon. When the mobile phone receives an operation where the user selects a certain icon, the mobile phone can perform a corresponding operation on Picture 101. When the mobile phone receives an operation where the user selects the edit icon 102, the display interface of the mobile phone changes from Figure 1 b in Figure 1 to c in

[0067] As shown in Figure 1 the interface in Figure c. The interface displayed on the mobile phone includes Picture 101 and a primary toolbar 104. Among them, the primary toolbar 104 can include a crop icon, a filter icon, an adjustment icon, and a more icon 103. When the mobile phone receives an operation where the user selects a certain icon, the mobile phone can perform a corresponding process on Picture 101. When the mobile phone receives an operation where the user selects the more icon 103, the display interface of the mobile phone changes from Figure 1 c in Figure 1 to d in

[0068] As shown in Figure 1 the interface in Figure d. The interface displayed on the mobile phone includes Picture 101, the primary toolbar 104, and a secondary toolbar 105. As shown in Figure 1 in Figure d, the secondary toolbar 105 can include a beauty icon, a text icon 106, a graffiti icon, a mosaic icon, a watermark icon, and a photo frame icon. In a possible implementation, the secondary toolbar 105 can also include a blur icon, a retain color icon, a sticker icon, etc.

[0069] It can be understood that in the case where the screen size of the terminal device is limited, the content of the secondary toolbar 105 may not be fully displayed. When the terminal device receives an operation where the user swipes the secondary toolbar 105, the secondary toolbar 105 can display the hidden content. For example, in the mobile phone interface, the content displayed on the secondary toolbar 105 includes a beauty icon, a text icon, a graffiti icon, a mosaic icon, a watermark icon, and a photo frame icon, and the hidden content includes a blur icon, a retain color icon, and a sticker icon. The mobile phone responds to the operation where the user swipes the secondary toolbar, and the secondary toolbar on the mobile phone interface can display the hidden content.

[0070] When the mobile phone receives an operation where the user selects the text icon 106, the display interface of the mobile phone changes from Figure 1 d in Figure 1 to e in

[0071] As shown in Figure 1As shown in Figure e, the interface displayed on the mobile phone includes Picture 101 and Text Adjustment Float Layer 108. The user can input text, letters, numbers, symbols, etc. through the keyboard in the Text Adjustment Float Layer 108. In response to the user's input operation, the mobile phone can add the content input by the user to the picture. For example, Figure 1 As shown in Figure e, in response to the user's operation of inputting the two characters "text" through the keyboard in the Text Adjustment Float Layer 108, the mobile phone adds Text 107 to Picture 101.

[0072] In a possible implementation, the user can also select a bubble style through the bubble options in the Text Adjustment Float Layer 108 and add a bubble to the text. The user can also select the text style through the style options in the Text Adjustment Float Layer 108 to modify the font, color, size, etc. of the text.

[0073] When the mobile phone receives the operation of the user clicking the Confirm Button 109, the mobile phone completes the operation of adding Text 107 to the picture, and the display interface of the mobile phone changes from Figure 1 Figure e in Figure 1 to Figure f in

[0074] For example, Figure 1 As shown in Figure f, the interface displayed on the mobile phone includes Picture 101, Text 107, Primary Toolbar 104, and Secondary Toolbar 105.

[0075] After adding text to the picture, the mobile phone can also support adding elements to the picture. Exemplarily, Figure 2 is a schematic diagram of adding an element in a possible implementation.

[0076] For example, Figure 2 As shown in Figure a, the interface displayed on the mobile phone includes Picture 101, Text 107, Primary Toolbar 104, and Secondary Toolbar 105. When the mobile phone receives the user's selection of the Doodle Function 201 in the Secondary Toolbar 105, the display interface of the mobile phone changes from Figure 2 Figure a in Figure 2 to Figure b in

[0077] For example, Figure 2 As shown in Figure b, the interface displayed on the mobile phone can include Picture 101, Doodle Function Bar 206, and Doodle Style Bar 207. When the mobile phone receives the operation of the user drawing a doodle on Picture 101, the doodle 210 drawn by the user can be displayed on Picture 101.

[0078] In a possible implementation, the user can select the pen shape of the graffiti through the pen shape function in the graffiti function bar 206; the user can select the color of the graffiti through the color function in the graffiti function bar 206; the user can adjust the thickness of the graffiti line through the thickness function in the graffiti function bar 206; the user can erase the graffiti through the eraser function in the graffiti function bar 206.

[0079] In a possible implementation, the user can select the style of the graffiti through the graffiti style bar 207. For example, the user can select the graffiti style as a curve, a straight line, a straight line with an arrow, a rectangle or a circle. When the mobile phone receives the user's operation of selecting the confirmation option 208, the mobile phone can retain the added graffiti, and the interface displayed by the mobile phone is changed to Figure 2 b in the switch to Figure 2 c in.

[0080] like Figure 2 As shown in Figure c, the picture 101 displayed on the mobile phone includes text 107 and graffiti 210. When the mobile phone receives the user's selection of the mosaic function 202 and the operation of adding a mosaic to the picture 101, the mosaic added by the user can be displayed on the picture 101. The mosaic added by the user can be Figure 2 Mosaic 220 shown in middle d.

[0081] like Figure 2 In the interface shown in Figure d, the picture 101 displayed on the mobile phone includes text 107, graffiti 210 and mosaic 220. When the mobile phone receives the user's selection of the watermark function 203 and the operation of adding a watermark to the picture 101, the watermark added by the user can be displayed on the picture 101. The watermark added by the user can be as follows Figure 2 As shown in watermark 230 of e.

[0082] like Figure 2 In the interface shown in Figure e, the picture 101 displayed on the mobile phone includes text 107, graffiti 210, mosaic 220 and watermark 230. In response to the user sliding the secondary toolbar, the mobile phone interface can display the blur function, color retention function and sticker function hidden in the secondary toolbar. When the mobile phone receives the user's selection of the sticker function 204 and the operation of adding stickers to the picture 101, the stickers added by the user can be displayed on the picture 101. The stickers added by the user can be as follows: Figure 2 As shown in sticker 240 in the middle f.

[0083] like Figure 2In the interface shown in Figure f, the picture 101 displayed on the mobile phone includes text 107, graffiti 210, mosaic 220, watermark 230, and sticker 240. When the mobile phone receives the operation of the user selecting the photo frame function 205 and adding a photo frame to the picture 101, the photo frame added by the user can be displayed on the picture 101. The photo frame added by the user can be as shown in the photo frame 250 in Figure g. Figure 2 As shown by the photo frame 250 in Figure g.

[0084] As Figure 2 In the interface shown in Figure g, the picture 101 displayed on the mobile phone includes text 107, graffiti 210, mosaic 220, watermark 230, sticker 240, and photo frame 250.

[0085] After adding elements such as graffiti, mosaic, watermark, sticker, and photo frame to the picture, the mobile phone can also support cropping the picture. Exemplarily, Figure 3 It is a schematic diagram of picture cropping in a possible implementation.

[0086] As Figure 3 In the interface shown in Figure a, the picture 101 displayed on the mobile phone includes text 107, graffiti 210, mosaic 220, watermark 230, sticker 240, and photo frame 250. When the mobile phone receives the operation of the user selecting the cropping function 301, the display interface of the mobile phone switches from Figure 3 Figure a to Figure 3 Figure b.

[0087] As Figure 3 As shown in Figure b, the display interface of the mobile phone can include the picture 101, the secondary cropping toolbar 302, and the cropping adjustment bar 303. The text 107, graffiti 210, mosaic 220, watermark 230, sticker 240, and photo frame 250 added to the picture are not displayed temporarily. The user can crop the picture by operating on the cropping frame 304, such as zooming in and out, and the cropping continuously acts on the picture 101.

[0088] When the mobile phone detects the operation of the user lifting the hand off the mobile phone screen, the display interface of the mobile phone switches from Figure 3 Figure b to Figure 3 Figure c. When the mobile phone receives the operation of the user selecting the confirmation option 208, the display interface of the mobile phone switches from Figure 3 Figure c to Figure 3 Figure d.

[0089] As Figure 3 As shown in Figure d, the cropped picture 306 includes partial contents of the graffiti, partial contents of the mosaic, and partial contents of the sticker. The text, watermark, and photo frame are all cropped. When the mobile phone receives the operation of the user clicking the save button 305, the mobile phone can save the cropped picture 306.

[0090] That is to say, during the cropping process, the various elements added to the picture, such as text, graffiti, mosaic, watermark, sticker, and photo frame, etc., are not displayed temporarily. Cropping can act on the picture and the above-mentioned various elements. When the mobile phone receives the user's operation to crop the picture, the user cannot see the elements added to the picture. In this way, the cropped picture may not meet the user's expectations.

[0091] It can be understood that in Figure 3 the interface of d, the user can also trigger the undo button 307. In response to the user's undo operation, the interface displayed on the mobile phone changes from Figure 3 d of Figure 3 to e of Figure 3 As shown in e of Figure 3 , the picture displayed on the mobile phone reverts to the picture 101 before cropping. The picture 101 includes text 107, graffiti 210, mosaic 220, watermark 230, sticker 240, and photo frame 250. Further, the mobile phone can also support adding filters to the picture. Exemplarily, Figure 4 is a schematic diagram of picture processing in one possible implementation.

[0092] As Figure 4 shown in a of Figure 4 , when the mobile phone receives the user's operation of selecting the filter function 401 in the primary toolbar 104, the display interface of the mobile phone changes from Figure 4 a of Figure 4 to b of Figure 4

[0093] As Figure 4 shown in b of Figure 4 , the interface displayed on the mobile phone includes the picture 101 and the filter function bar 402. When the mobile phone receives the user's operation of selecting filter 3 in the filter function bar 402, the display interface of the mobile phone changes from Figure 4 b of Figure 4 to c of Figure 4

[0094] As Figure 4 shown in c of Figure 4 , filter 3 in the filter function bar is in the selected state. The picture 101 displayed on the mobile phone interface is the picture after the filter effect. The filter function acts on the picture 101 and all the elements added to the picture 101. Among them, the elements added to the picture 101 include text, watermark, sticker, graffiti, mosaic, and photo frame.

[0095] When the mobile phone receives the user's operation of selecting the text 107, the mobile phone does not respond to this operation, and the user cannot modify the text that has already been added.

[0096] When the mobile phone receives the user's operation of selecting the adjustment function 403, the display interface of the mobile phone changes from Figure 4 c of Figure 4 to d of Figure 4

[0097] AsFigure 4 As shown in Figure d, the interface displayed on the mobile phone includes Picture 101 and the adjustment function bar 404. After the mobile phone receives the operation of the user selecting the brightness function in the adjustment function bar 404, the brightness of the picture is adjusted through the brightness parameter adjustment bar 405 in the adjustment function bar 404. Among them, the brightness adjustment can act on Picture 101 and all elements added to Picture 101.

[0098] As Figure 4 shown in Figure e, Picture 101 displayed on the mobile phone is the picture after brightness adjustment, and each element included in the picture is the element after brightness adjustment. When the mobile phone receives the operation of the user selecting the filter function 401, the display interface of the mobile phone changes from Figure 4 Figure e in Figure 4 to Figure f in

[0099] As Figure 4 shown in Figure f, after the user adds a filter to the picture and then performs other operations on the picture except for the filter, when the mobile phone receives the operation of the user selecting the filter function 401 again, the original picture in the filter function bar is in the selected state, and the gallery application cannot locate that the filter added by the user is Filter 3. That is to say, the gallery application cannot remember the filter added by the user to the picture.

[0100] That is to say, in the above Figures 1 - 4 picture editing process, there are certain pain points. Exemplarily, Figure 5 shows the Figures 1 to 4 editing process schematic diagram from the time sequence and explains the pain points existing in the editing process.

[0101] The mobile phone responds to the operation of the user selecting a picture and clicking the editing function, and enters picture editing.

[0102] Pain point 1: In the scenario where the mobile phone responds to the operation of the user adding text and adds the text added by the user to the picture, the user's expectation for the text function is that the text style is rich and the text can be added quickly. However, in some implementations, the pain points of adding text are that the text styles supported by the gallery application are few; the text function level is deep, which is not convenient for searching and operating, and the operation efficiency is low.

[0103] Pain point 2: In the scenario where the mobile phone responds to the operation of the user adding graffiti, mosaic, watermark, and sticker and adds the graffiti, mosaic, watermark, and sticker added by the user to the picture, the user's expectation for the above elements is that the styles of each element are rich and can be added quickly. However, in some implementations, the pain points of adding the above elements are that the styles of each element supported by the gallery application are few; the function levels corresponding to each element are deep, which is not convenient for searching and operating, and the operation efficiency is low.

[0104] Pain Point 3: In the scenario where the mobile phone responds to the user's operation of adding a photo frame and adds a photo frame to the periphery of the picture, the user's expectations for the photo frame are: rich photo frame styles, the ability to quickly preview the effects of the photo frame, and quickly add a photo frame. However, in some implementations, the pain points of adding a photo frame are: few types of photo frames and not good-looking; the proportion of the picture may change after adding a photo frame.

[0105] Pain Point 4: In the scenario where the mobile phone responds to the user's operation of cropping a picture and adjusts the length, width, etc. of the picture, the user's expectations for the cropping function are the ability to crop the picture to the target size and the ability to quickly perform the cropping operation. However, in some implementations, the pain points of picture cropping are that when adjusting the picture size, the cropping effect cannot be previewed in real time, and content outside the user's expectations may be cropped.

[0106] Pain Point 5: In the scenario where the mobile phone responds to the user's operation of adding filters and adjusting the picture through the adjustment function, and adds filters and adjusts the picture, the user's expectations are: rich filters, the ability to preview the effect of the picture after adding filters in real time, and the ability to modify the already added filters and the completed picture adjustments. However, in some implementations, the pain points of the filter function are that there are many filters and no classification, which is not convenient for users to find the specified effect; the granularity of the adjustment bar is rough and the adjustment effect is not delicate enough; after adding filters or making adjustments to the picture, the color, brightness, saturation and other parameters of elements such as photo frames, text, stickers, graffiti, mosaics, watermarks, etc. will change; the already added filters or the completed adjustments cannot be modified.

[0107] It can be understood that when the mobile phone receives the user's operation of changing the added mosaics, blurs or beautifications on the picture, the user's expectation is that the above elements can be repeatedly modified and edited. However, the pain point in some implementations is that the above elements cannot be changed anymore.

[0108] Pain Point 6: When the mobile phone receives the user's operation of adjusting text, the user's expectation is that the text can be repeatedly modified and edited. However, the pain point in some implementations is that the style or content of the text cannot be modified anymore.

[0109] It can be understood that when the mobile phone receives the user's operation of changing graffiti, watermarks, stickers or photo frames, the user's expectation is that the above elements can be repeatedly modified and edited. However, the pain point in some implementations is that the above elements cannot be changed anymore.

[0110] Pain Point 7: When the mobile phone receives the user's operation of clicking to save, the processed picture can be exported. The user's expectation is to quickly export the edited picture. However, in some implementations, the pain point is that in the secondary toolbar or tertiary toolbar interface of the editing function, after editing the picture, the user needs to first click the "Confirm" button, return to the primary toolbar, and click the "Save" button on the primary toolbar interface to save and export the processed picture.

[0111] In view of this, an embodiment of the present application provides an image processing method:

[0112] For pain points one, two, and seven among the above pain points, an embodiment of the present application can provide a first-level toolbar that includes all image processing functions. Users can select the functions they need to use in the first-level toolbar without having to expand the second-level toolbar, and can also achieve one-key saving of the processed image. In this way, it is convenient for users to find various functions of image processing, reduces the number of page jumps, and makes the user's operation more convenient.

[0113] For pain point four among the above pain points, when the user performs a cropping process on an image in an embodiment of the present application, some elements on the image are temporarily not displayed and cannot be cropped. After the cropping is completed, these elements can be displayed on the cropped image according to the size, position, etc. of the cropped image; another part of the elements on the image is displayed, and the user can intuitively see these elements during the cropping process and can crop these elements. In this way, the flexibility and convenience of image processing can be improved, the coordination of the image can be improved, and the user experience can be improved.

[0114] For pain points five and six among the above pain points, the image processing method provided by an embodiment of the present application can implement the function of remembering the filters added by the user, and can also change the filters, adjustments, mosaics, blurs, or beauty effects, etc. already added to the image, and can also modify the text, stickers, graffiti, watermarks, and photo frames, etc. already added. After adding a filter or adjusting the image, the filter function or adjustment function may not act on the added elements such as photo frames, text, stickers, graffiti, mosaics, watermarks, etc. In this way, it is convenient for users to process images, makes the user's operation more convenient, and the result of image processing is more in line with the user's expectations, improving the user experience.

[0115] In order to better understand the embodiments of the present application, the structure of the terminal device in the embodiments of the present application will be introduced below.

[0116] Exemplarily, Figure 6 is a schematic structural diagram of a terminal device 100 provided by an embodiment of the present application.

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

[0118] It can be understood that the structure schematically shown in the embodiments of the present invention does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0119] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0120] The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0121] A memory may also be provided in the processor 110 for storing instructions and data.

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

[0123] The charging management module 140 is configured to receive a charging input from a charger.

[0124] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110.

[0125] The wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

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

[0127] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0128] The terminal device 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.

[0129] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.

[0130] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.

[0131] The terminal device 100 can implement the audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor, etc. For example, music playback, recording, etc.

[0132] The software system of the terminal device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the terminal device 100.

[0133] Exemplarily, Figure 7 This is a schematic diagram of the software architecture of a terminal device provided by the embodiments of this application.

[0134] The layered architecture divides software into several layers, and each layer has clear roles and divisions of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0135] The application layer may include a series of application packages.

[0136] As Figure 7 shown, the application packages may include applications such as the camera, gallery, calendar, call, WLAN, Bluetooth, music, video, short message, etc. Exemplarily, the image processing method provided in the embodiments of the present application may be implemented through the gallery.

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

[0138] As Figure 7 shown, the application framework layer may include a window manager, a content provider, a view system, a telephone manager, a resource manager, a notification manager, etc.

[0139] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0140] The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc.

[0141] The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a short message notification icon may include a view for displaying text and a view for displaying pictures.

[0142] The telephone manager is used to provide the communication function of the terminal device 100. For example, the management of call states (including connection, disconnection, etc.).

[0143] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0144] The notification manager enables an application to display notification information in the status bar. It can be used to convey informative messages, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that a download is complete, a message is reminded, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or a scrolling text, such as a notification of a background-running application, or a notification that appears on the screen in the form of a dialogue window. For example, it can prompt text information in the status bar, emit a prompt tone, vibrate the electronic device, blink the indicator light, etc.

[0145] The Android Runtime includes core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0146] The core libraries consist of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android.

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

[0148] The system libraries can include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engines (such as SGL), etc.

[0149] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0150] The media libraries support the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as: MPEG4, H.‘264, MP3, AAC, AMR, JPG, PNG, etc.

[0151] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0152] The 2D graphics engine is a drawing engine for 2D drawing.

[0153] The kernel layer is the layer between the hardware and the software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.

[0154] Taking the gallery application that implements the image processing method of the embodiment of the present application as an example, the gallery application can be divided according to different processing functions as followsFigure 8 The described logical layer, and as Figure 9 described physical layer.

[0155] Exemplarily, Figure 8 is a schematic diagram of the logical layer provided by an embodiment of the present application.

[0156] As Figure 8 shown, the logical layer may include, from top to bottom, a photo frame, color-related functions, overlay materials, effect materials, and a content layer.

[0157] The photo frame is independently displayed on the periphery of the screen, so that the photo frame can be unaffected by other materials or functions. For example, when the mobile phone successively receives the operation of the user adding a photo frame to the picture and the operation of the user adding a filter to the picture, the color of the photo frame is not affected by the filter and does not change.

[0158] The color-related functions may include retaining colors, and the objects of action of the color-related functions are all colored contents in the picture.

[0159] The overlay materials may include text, watermarks, stickers, and / or graffiti, and the overlay materials act on a part of the picture.

[0160] The effect materials may include mosaics, blurs, filters, beauty effects, and / or adjustments. Among them, the object of action of the adjustment function is the picture or video itself. For example, the user can adjust the brightness, saturation, etc. of the picture itself through the adjustment function. Except for the adjustment function, the upper-layer materials in other effect materials can affect the lower-layer materials. For example, when the mobile phone receives the operation of the user adding a mosaic to the picture that has already been added with a filter, the mosaic acts on the picture after the filter is added.

[0161] The content layer may include pictures, canvases. Among them, the picture refers to the picture itself used for picture processing.

[0162] In Figure 8 the shown logical layer, the upper-layer materials or functions will affect the lower-layer materials or functions, and the lower-layer materials or functions will not affect the upper-layer materials or functions. In this way, no matter how the operation order of the user changes, a consistent picture processing result can be obtained. Taking the filter and adjustment as an example, when the mobile phone successively receives: the operation of the user adding a filter to the picture and the operation of the user using the adjustment function to adjust the picture, since the adjustment function is directed at the picture layer in the logical layer, rather than the picture after the filter is added, the above picture processing result is the same as the effect after the user uses the adjustment function to adjust the picture and then adds a filter.

[0163] As Figure 8As shown, for the actual needs of users, the cropping function is placed below the text, watermark, and stickers, and above the graffiti. When the mobile phone receives the user's cropping operation to crop the picture, the cropping can act on the graffiti layer, effect-based materials, and content layer below the cropping, and the cropping cannot act on the text, watermark, sticker layer, color-based functions, and photo frame above the cropping.

[0164] That is to say, on the one hand, considering that the graffiti and mosaic added by the user to the picture may be strongly related to the content of the picture. For example, when the user adds graffiti to the picture and circles a certain word in the picture, the user does not want the relative position between the graffiti and the picture to change during the cropping process. Or, when the user adds a mosaic to cover the face in the picture, the user does not want the relative position between the mosaic and the picture to change during the cropping process. Therefore, the graffiti and mosaic are placed below the cropping, so that during the cropping process, the graffiti and mosaic can always be displayed on the picture and the relative position with the picture remains unchanged. The user can intuitively see the graffiti and mosaic and crop the mosaic and graffiti according to the actual needs of the user. On the other hand, considering that the user does not want to crop or completely crop the text, watermark, and / or sticker parts added to the picture during the cropping process, the text, watermark, and sticker are placed above the cropping, so that during the cropping process, the text, watermark, and sticker can be temporarily not displayed, and after the cropping is completed, the text, watermark, and sticker can be redisplayed on the cropped picture, and the cropping function does not act on the text, watermark, and sticker.

[0165] It can be understood that the content included in each layer can be adjusted according to actual needs. For example, when the user adds text to the picture and uses the text to label the names of various items in the picture, the user's requirement is that the relative position between the text and the picture remains unchanged during the cropping process. To meet the user's needs, the text can be moved to the lower layer of the cropping. The embodiments of the present application do not make specific limitations on this.

[0166] Exemplarily, Figure 9 is a schematic diagram of the physical layer provided by the embodiments of the present application. Among them, the physical layer is the actual layer order corresponding to each picture processing function during the picture processing process.

[0167] Corresponding to Figures 1 - 4 the picture editing process, the order of the physical layers from top to bottom can include: photo frame physical layer, reserved color physical layer, overlay material physical layer, mosaic physical layer, blur physical layer, filter physical layer, beauty physical layer, adjustment physical layer, picture physical layer, and canvas physical layer.

[0168] Among them, the overlay materials can include text, graffiti, watermark, and / or stickers, etc. Corresponding to Figures 1 - 4In the picture editing process, the physical layers of superimposed materials can include a sticker layer, a watermark layer, a text layer, and a layer for doodle 123 from top to bottom.

[0169] Among them, the order of the above physical layers can be relatively fixed. One or more real layers can be added to each physical layer.

[0170] Exemplarily, taking the mosaic physical layer as an example, when the mobile phone responds to the user's operation and adds the first mosaic to the picture, the first real mosaic layer will be added to the mosaic physical layer. After that, when the mobile phone responds to the user's operation and adds text to the picture, a real text layer can be added to the text physical layer. After adding the text, the user returns to the mosaic function. Further, when the mobile phone responds to the user's operation and adds the second mosaic to the picture, the second real mosaic layer will be added to the mosaic physical layer. That is to say, the first mosaic and the second mosaic are in the mosaic physical layer.

[0171] Similarly, for the text, doodle, watermark, and sticker added by the terminal device at different times, in the physical layer of superimposed elements, new layers can be created for each element in sequence according to the order added by the user. For example, when the mobile phone responds to the user's operation and adds the first doodle to the picture, the first real doodle layer can be added to the physical layer of superimposed materials. After that, when the mobile phone responds to the user's operation and adds text to the picture, a real text layer can be added to the physical layer of superimposed materials. After adding the text, the user returns to the doodle function. Further, when the mobile phone responds to the user's operation and adds the second doodle to the picture, the second real doodle layer can be added to the physical layer of superimposed materials. That is to say, the first doodle layer, the text layer, and the second doodle layer can be in the physical layer of superimposed materials in the order from bottom to top.

[0172] It can be understood that for the first doodle, no matter how much doodle content is included in the first doodle, a real doodle layer can be created for the first doodle. For example, the content of the first doodle is "123". Among them, although "1", "2", and "3" correspond to three different strokes, in the doodle physical layer, "123" corresponds to one real layer, rather than three. The second doodle is processed similarly and will not be elaborated.

[0173] Based on this logical layer and physical layer, embodiments of the present application can distinguish and process elements in each logical layer or physical layer, so that some elements can be displayed and some elements can be not displayed during cropping. After cropping, the elements that are not displayed can be redisplayed on the cropped picture, thereby solving the problem corresponding to pain point four; when adding effect-based materials to the picture, they can not act on elements such as photo frames, text, stickers, graffiti, mosaics, and watermarks, and the added effect-based materials can also be modified, thereby solving the problem corresponding to pain point five; it can also implement editing and modifying elements such as photo frames, text, stickers, graffiti, and watermarks that have been added to the picture, thereby solving the problem corresponding to pain point six. The specific solution methods will be described in detail in subsequent embodiments and will not be elaborated here again.

[0174] Next, the interfaces that may be involved in the picture processing method of embodiments of the present application will be described by referring to Figures 1 - 4 the order of use of each function in the gallery application and the order of each pain point.

[0175] Exemplarily, for the problems of too deep function levels in pain points one and two, and the problem that one-key saving cannot be achieved in pain point seven, as Figure 10 shown, embodiments of the present application provide a schematic diagram of a toolbar.

[0176] As Figure 10 shown in a of, the toolbar 1001 can include all functions of picture processing. When the screen size of the terminal device is limited and only part of the content of the toolbar 1001 can be displayed, when the terminal device receives an operation of the user sliding the toolbar 1001, the toolbar can display other hidden functions.

[0177] As Figure 10 shown in b of, the picture processing functions included in the toolbar 1001 can include: cropping, filter, adjustment, beauty, graffiti, text, mosaic, watermark, photo frame, blurring, color retention, and stickers. Among them, the order of each picture processing function is not fixed. For the convenience of users, the order of each picture processing function can be arranged from high to low according to the frequency of user use. Embodiments of the present application do not make specific limitations on this.

[0178] It can be understood that the toolbar 1001 can include more or fewer functions. Embodiments of the present application do not make specific limitations on this.

[0179] It can be understood that compared with Figure 1The primary toolbar 104 and secondary toolbar 105 shown in a. The toolbar 1001 may include all the functions included in the primary toolbar 104 and all the functions included in the secondary toolbar 105. When the mobile phone receives a user's selection of a certain function included in the original secondary toolbar in the toolbar 1001, the interface displayed on the mobile phone may not jump. After the mobile phone processes the picture according to the selected function by the user, it can, in response to the user's operation of selecting the save button, save the processed picture, realizing one-key saving.

[0180] Compared with pain point one, pain point two, and pain point seven, placing all the picture processing functions in one toolbar allows users to select the functions they need through a sliding operation, without having to click the more button and expand the secondary toolbar. In this way, it is convenient for users to find each function, reduces the number of page jumps, can realize one-key saving of the processed picture, and makes the user's operation more convenient.

[0181] Exemplarily, for the problem in pain point five that it is not convenient for users to find the specified effect in the filter, Figure 11 This is the filter editing interface diagram provided by the embodiment of the present application.

[0182] As Figure 11 In the interface shown in a, the interface displayed on the mobile phone includes a picture 101 and a toolbar 1001. When the mobile phone receives the operation of the user selecting the filter function 401 in the toolbar 1001, the display interface of the mobile phone changes from Figure 11 a in <> Figure 11 to b in.

[0183] As Figure 11 In the interface shown in b, the interface displayed on the mobile phone includes a title bar 601, a picture display area 602, and a filter function area 1101. Users can preview the output picture after picture processing in real time through the picture display area 602. Among them, the filter function area 1101 includes a content area 603 and a parameter adjustment bar 604. Compared with the filter parameter adjustment bar in [[ID=2...]] Figure 4 the adjustment bar has a finer granularity and can realize smooth adjustment of parameters. When the mobile phone receives the operation of the user selecting the filter 3 option in the filter function bar, the display interface of the mobile phone changes from Figure 11 b in Figure 11 to c in.

[0184] As Figure 11 In the interface shown in c, the filter 3 option is in a selected state. After the filter is adjusted, parameters such as the color and brightness of the picture 101 may change, while the parameters such as the color and brightness of each element added to the picture 101 do not change. According to Figure 8The logical layer shown in . In the logical layer, the filter is on the upper layer of the picture, and under the text, watermark, sticker, graffiti, and mosaic. Therefore, the filter only adjusts the picture and does not adjust the text, watermark, sticker, graffiti, and mosaic added to the picture.

[0185] After the mobile phone receives the operation of the user selecting the adjustment function in the toolbar 1001, the display interface of the mobile phone changes from Figure 11 c in to Figure 11 d in .

[0186] As Figure 11 The interface shown by d in . The interface displayed on the mobile phone includes a picture and an adjustment function bar 1102. After the mobile phone receives the operation of the user selecting the brightness function in the adjustment function bar 1102 and adjusting the picture brightness through the brightness adjustment bar 1103, the display interface of the mobile phone changes from Figure 11 d in to Figure 11 e in . Among them, compared with the brightness parameter adjustment bar 405 in Figure 4 , the granularity of the adjustment bar is finer, and smooth adjustment of the parameters can be achieved.

[0187] As Figure 11 The interface shown by e in . The interface displayed on the mobile phone includes the picture 101 after brightness adjustment and the toolbar 1001. The brightness adjustment only acts on the picture 101 itself and does not act on the elements added to the picture 101. According to Figure 8 The logical layer shown in . In the logical layer, the adjustment is on the upper layer of the picture, and under the text, watermark, sticker, graffiti, and mosaic. Therefore, the adjustment only acts on the picture and does not act on the text, watermark, sticker, graffiti, and mosaic added to the picture.

[0188] After the mobile phone receives the operation of the user selecting the filter function 401, the display interface of the mobile phone changes from Figure 11 e in to Figure 11 f in .

[0189] As Figure 11 The interface shown by f in . The interface displayed on the mobile phone includes a filter function area 1101, and the filter 3 option in the filter function area 1101 is in the selected state.

[0190] That is to say, after the user adds a filter to the picture and then performs other operations on the picture except the filter, when the mobile phone receives the operation of the user returning to the filter function again, the gallery application can remember the filter added to the picture by the user, such as filter 3, and can display the filter as the selected state in the filter function bar.

[0191] In a possible implementation, the mobile phone can adjust the parameters of Filter 3 in response to the user's operation of editing the filter, or switch Filter 3 to another filter, such as Filter 4. In this way, after the user adds a filter and then performs other operations, when the user selects the filter function again, the filter can be modified and edited again, that is, continuous editing of the filter can be achieved.

[0192] Similarly, in the embodiments of the present application, the gallery application can perform continuous editing on Figure 8 other effect-based materials shown, such as mosaic, blurring, beauty, adjustment, etc. Details are not described herein again.

[0193] Compared with Pain Point 5, in the embodiments of the present application, after the user adds a filter and then performs other operations, when the user selects the filter function again, the gallery application can remember the previously added filter. Without the need for operations such as comparing and searching for filters, the user can locate the previously selected filter and can also modify and edit the filter. In this way, it is convenient for the user to process pictures and improves the user experience.

[0194] Exemplarily, for the problem in Pain Point 6 that the style or content of the text cannot be modified anymore, Figure 12 is the text editing interface diagram provided by the embodiments of the present application.

[0195] As Figure 12 shown in the interface a in, the interface displayed on the mobile phone includes Picture 101, Toolbar 1001, and Filter Function Bar 402. When the mobile phone receives the operation of the user selecting Text 107, the display interface of the mobile phone changes from Figure 12 a in to Figure 12 b in. Among them, the operation of the user selecting Text 107 can be clicking on Text 107, double-clicking on Text 107, long-pressing on Text 107, etc. The embodiments of the present application do not make specific limitations on this.

[0196] As Figure 12 shown in b in, the interface displayed on the mobile phone includes Picture 101, Text Selection Box 1201, and Text Toolbar 1202. When the mobile phone receives the operation of the user selecting the editing function in Text Toolbar 1202, the display interface of the mobile phone changes from Figure 12 b in to Figure 12 c in.

[0197] As Figure 12 shown in c in, the interface displayed on the mobile phone includes Picture 101, Text Adjustment Floating Layer 108, Confirm Button 109, Text Function Option 1204, and Title Bar 1205. In a possible implementation, when the user enters "Reading" in Text Adjustment Floating Layer 108, the "Text" of Text 107 can be changed to "Reading". In response to the operation of the user selecting Confirm Button 109, the display interface of the mobile phone changes fromFigure 12 The c in the command is switched to Figure 12 d in the text, the picture after modifying the text is as follows Figure 12 As shown in d.

[0198] That is to say, after the user adds text to the picture, and then performs other operations on the picture except adding text, when the mobile phone receives the user's operation to return to the text function again, the gallery application can modify and edit the added text again, that is, continuous editing of the text can be achieved.

[0199] Similarly, in the embodiment of the present application, the gallery application [[ID=13 The other overlay materials and photo frames shown can be edited continuously, and other overlay materials such as stickers, watermarks, graffiti, etc. will not be described here.

[0200] In this way, compared with pain point six, in the embodiment of the present application, the added text, stickers, watermarks, graffiti and photo frames can be modified and edited again, which is convenient for users to process pictures and improve the user experience.

[0201] For example, in order to solve the problem of cropping unexpected content when cropping pictures in pain point 4, ​ A cutting diagram provided for an embodiment of the present application.

[0202] like ​ In the interface shown in a, the picture 101 displayed on the mobile phone includes text 107, graffiti 210, mosaic 220, watermark 230, sticker 240, and photo frame 250. When the mobile phone receives the user's operation of selecting the crop function 301, the display interface of the mobile phone changes to ​ The a in the switch is ​ The b in.

[0203] like ​ As shown in b, the interface displayed by the mobile phone may include a picture, a cropping secondary toolbar 302, a cropping adjustment bar 303, and a cropping frame 304. Among them, the graffiti 210 and mosaic 220 on the picture are displayed, and the text 107, watermark 230, sticker 240, and photo frame 250 on the picture are temporarily not displayed. The user can crop the picture by operating the cropping frame 304, such as zooming in and out. When the user completes the cropping and the mobile phone detects that the user has lifted his hand off the phone screen, the display interface of the mobile phone changes to ​ b in the switch to ​ c in.

[0204] according to ​The logical layer shown in [figure reference], in which the cropping function is above scribbles and mosaics and below text, watermarks, and stickers. Therefore, the cropping function can only crop scribbles and mosaics and cannot crop the text, watermarks, and stickers added to the picture.

[0205] As ​ In the interface shown in c of [figure reference], the interface displayed on the mobile phone can include picture 1301 and save button 305. Among them, picture 1301 is the picture after cropping picture 101. Picture 1301 includes text 107, part of the content of scribbles 210, mosaics 220, watermarks 230, stickers 240, and photo frames 250.

[0206] That is to say, after the cropping operation is completed, the content that is not temporarily displayed, such as text, watermarks, stickers, and photo frames, is redisplayed on the picture.

[0207] It can be understood that the text, watermarks, and stickers can automatically adapt to the aspect ratio of the cropped picture, and the gap between the position of the text, watermark, or sticker on the cropped picture and its position on the picture before cropping is less than a preset value. Taking the watermark as an example, in the original picture, the watermark is located at the 90% horizontal and 95% vertical positions of the original picture. In the cropped picture, the watermark is still located at the 90% horizontal and 95% vertical positions of the cropped picture.

[0208] It can be understood that the photo frame can automatically adjust its size according to the size of the cropped picture. For example, if the length and width of the original picture are 30mm * 40mm, and the length and width of the cropped picture are 25mm * 30mm, the photo frame can automatically adjust its size according to the size of the cropped picture so that the picture can fill the entire photo frame.

[0209] When the mobile phone receives the operation of the user selecting the save button 305, the mobile phone can save picture 1301.

[0210] In another possible implementation, when the mobile phone receives the operation of the user selecting the cropping function 301, the display interface of the mobile phone can be switched from ​ a in [figure reference] to ​ d in [figure reference].

[0211] As ​ As shown in d of [figure reference], the interface displayed on the mobile phone can include a picture, a secondary cropping toolbar 302, a cropping adjustment bar 303, and a cropping frame 304. Among them, the text 107 and mosaics 220 on the picture are displayed, and the scribbles 210, watermarks 230, stickers 240, and photo frames 250 on the picture are not temporarily displayed.

[0212] That is to say, corresponding to ​In the logical layer, when the cropping function is above the text and mosaic layers and below the graffiti, watermark, and sticker layers, during the cropping process, the text and mosaic can be displayed and cropped; the graffiti, watermark, and sticker are temporarily not displayed and cannot be cropped. The user can crop the picture by operating on the cropping frame 304, such as zooming in or out. After the user finishes cropping and the mobile phone detects the operation of the user lifting the hand off the screen, the display interface of the mobile phone switches from ​ d in ​ to c in

[0213] In this way, compared with pain point four, during the cropping process, the user can intuitively see the elements such as mosaics and graffiti added to the picture, which can effectively avoid cropping elements outside the user's expectation. Elements such as text, watermarks, stickers, and photo frames are temporarily not displayed during the cropping process, and after cropping, the above elements can automatically adapt to the cropped picture and adjust their positions. In this way, the convenience and flexibility of picture processing can be improved, the user can preview the cropping effect in real time, making the result of picture processing more in line with the user's expectation and enhancing the user experience.

[0214] Based on the content described in the above embodiments, in order to better understand the embodiments of the present application, the following specifically explains the picture processing method.

[0215] The specific steps of the picture processing method provided by the embodiments of the present application may include:

[0216] S1401. The terminal device displays the interface of the picture library, and the terminal device receives the ninth operation.

[0217] In the embodiments of the present application, the interface of the picture library includes one or more pictures. Among them, the picture library interface may correspond to the interface shown in ​ a in

[0218] In the embodiments of the present application, the ninth operation may be used to select the first picture in the picture library interface. Among them, the ninth operation may correspond to the operation in ​ a in which the terminal device receives the user's operation of selecting picture 101 in the picture library interface.

[0219] In this way, the user can process pictures through the picture library application in the terminal device, without importing pictures in a third-party picture processing software for processing, making picture processing more convenient and fast.

[0220] S1402. The terminal device displays the first picture.

[0221] Among them, the first picture may correspond to the picture 101 in ​

[0222] ​In a possible implementation, the terminal device displays a first picture in response to a ninth operation. For example, when the terminal device receives an operation in which the user selects Picture 101 in the gallery interface, in response to this operation, the terminal device displays Picture 101.

[0223] S1403. The terminal device receives a second operation on the first picture in the gallery application; in response to the second operation, the terminal device displays a toolbar.

[0224] In the embodiments of the present application, the second operation can be used to invoke the picture editing function of the gallery application, and the second operation can correspond to ​ the operation shown in b in which the mobile phone receives the user's selection of the editing icon 102.

[0225] In response to the second operation, the interface of the terminal device can display a toolbar, where the toolbar includes a primary toolbar and does not include a secondary toolbar. The toolbar can correspond to ​ the toolbar 1001 shown in a.

[0226] In this way, the user can select the functions to be used in the toolbar without having to expand the secondary toolbar, which is convenient for the user to find each function, reduces the number of interface jumps, and makes the user's operation more convenient.

[0227] Optionally, the primary toolbar includes one or more of the following functions: cropping, filtering, adjusting, beautifying, scribbling, text, mosaic, watermark, photo frame, blurring, retaining color, or stickers.

[0228] Among them, the primary toolbar can correspond to ​ the toolbar 1001 shown in b.

[0229] It can be understood that the primary toolbar can also include picture processing functions such as matting and background, and the embodiments of the present application do not make specific limitations on this.

[0230] In this way, all the picture processing functions are placed in one toolbar, and the user can select the functions to be used in the primary toolbar, which is convenient for the user to find each function, reduces the number of interface jumps, and makes the user's operation more convenient.

[0231] Optionally, some functions are displayed in the primary toolbar. When a sliding operation is received in the primary toolbar, based on the sliding direction of the sliding operation, the functions hidden and displayed in the sliding direction in the primary toolbar are displayed.

[0232] When the interface size of the terminal device is limited, the primary toolbar can display some functions. The user can expand the hidden functions by swiping the primary toolbar. For example, the functions currently displayed on the primary toolbar include: cropping, filtering, adjusting, beautifying, and doodling. When the terminal device receives an operation from the user to swipe the primary toolbar to the left, the terminal device can display hidden functions such as mosaic and text.

[0233] In this way, all the image processing functions are placed in one toolbar. The user can select the functions to be used through swiping operations, without the need to expand the secondary toolbar, which is convenient for the user to find each function, reduces the number of interface jumps, and makes the user's operations more convenient.

[0234] S1404. The terminal device adds a first type of element to the first picture.

[0235] Among them, the first type of element can be understood as ​ In the shown logical layer, the element located above the cropping layer. The cropping operation does not act on the first type of element.

[0236] S1405. The terminal device adds a second type of element to the first picture.

[0237] Among them, the second type of element can be understood as ​ The element below the cropping layer in. The cropping operation acts on the second type of element.

[0238] S1406. The terminal device receives a cropping operation, and the cropping operation continuously acts on the interface of the terminal device.

[0239] In the embodiments of the present application, the cropping operation can be used to implement cropping of some content in the picture. The cropping operation can correspond to ​ The cropping operation of the picture 101 shown. The user can adjust the cropping area through continuous operations on the cropping frame, such as continuously touching the cropping frame displayed on the mobile phone screen and other operations.

[0240] S1407. In response to the cropping operation, the terminal device displays the first picture, displays the second type of element, displays the cropping area corresponding to the cropping operation, and does not display the first type of element.

[0241] Among them, the cropping area corresponding to the cropping operation can be as shown in b in ​ or d in ​ shown. In ​ , the cropping area is the area of the picture selected by the cropping frame 304.

[0242] Optionally, the first type of element includes one or more of the following: text, watermark, or sticker; the second type of element includes one or more of the following: doodle or mosaic.

[0243] Corresponding to ​ b in ​ , during the cropping process, the first type of elements are not displayed, that is, text, watermarks, and / or stickers are not displayed, and the second type of elements are displayed, that is, scribbles and / or mosaics are displayed.

[0244] Optionally, the first type of elements includes one or more of the following: scribbles, watermarks, or stickers; the second type of elements includes one or more of the following: text or mosaics.

[0245] Corresponding to ​ d in ​ , during the cropping process, the first type of elements are not displayed, that is, scribbles, watermarks, and / or stickers are not displayed, and the second type of elements are displayed, that is, text and / or mosaics are displayed.

[0246] In this way, according to the actual needs of the user, the content included in the first type of elements and the content included in the second type of elements can be adjusted, so that some elements are displayed and some elements are not displayed during the cropping process, improving the flexibility of image processing and meeting the actual needs of the user.

[0247] S1408. When the cropping operation ends, the terminal device obtains a second picture, and the second picture includes: the first type of elements, the content of the first picture within the coverage of the target cropping area, and the content of the second type of elements within the coverage of the target cropping area; the target cropping area is the cropping area corresponding to the end time of the cropping operation.

[0248] In the embodiments of the present application, the second picture is the cropped picture, and the second picture can be understood as ​ the picture 1301 in ​ . After the cropping operation ends, since the cropping operation does not act on the first type of elements, all the content of the first type of elements can be redisplayed; since the cropping operation acts on the second type of elements, the second type of elements display the content within the coverage of the target cropping area, where the content of the second type of elements within the coverage of the target cropping area can be part of the second type of elements or all of the second type of elements, and the coverage of the target cropping area may also not include the content of the second type of elements. The embodiments of the present application do not make specific limitations on this.

[0249] When the terminal device detects that the user stops the cropping operation, the cropping of the picture by the terminal device ends. Among them, the operation for the user to stop cropping may include: the operation of the user lifting a finger to stop touching the screen, the operation of the user lifting a finger to stop manipulating an input device such as a mouse, etc. The embodiments of the present application do not make specific limitations on this.

[0250] During the cropping process, the first type of elements are temporarily not displayed, while the second type of elements are displayed. The user can intuitively see the second type of elements added to the picture, effectively avoiding cropping the second type of elements that are not expected by the user. After the cropping is completed, the first type of elements are not affected by the cropping and can be redisplayed. In this way, the user can preview the cropping effect in real time, improve the flexibility of picture processing, make the result of picture processing more in line with the user's expectations, and enhance the user experience.

[0251] Optionally, the gap between the position of the first type of elements in the second picture and the position of the first type of elements in the first picture is less than a preset value.

[0252] After the cropping operation ends, the first type of elements are redisplayed, and the position of the first type of elements in the second picture can be set according to the position of the first type of elements in the first picture. For example, if the preset value is that the gap in position is less than 5%, the position of the first type of elements in the first picture is 30% horizontally and 40% vertically of the original picture, and the position of the first type of elements in the second picture can be 33% horizontally and 42% vertically of the second picture. The gap between the position of the first type of elements in the picture before cropping and the position in the picture after cropping is less than the preset value.

[0253] In this way, the coordination degree between the cropped picture and the added elements can be improved, and the user experience can be enhanced.

[0254] S1409. The terminal device receives a third operation; in response to the third operation, the terminal device saves the second picture.

[0255] In the embodiment of the present application, the third operation can be used to save the processed picture, and the third operation can correspond to ​ the operation of the user selecting the save button 305 received by the mobile phone in c.

[0256] When the terminal device processes the picture to obtain the second picture and then receives the third operation, the terminal device can save the second picture.

[0257] In this way, it is possible to realize one-key saving of the processed picture, making the user's operation simpler and faster.

[0258] Optionally, before the terminal device receives the cropping operation, it further includes: the terminal device receives a first operation; in response to the first operation, the terminal device adds a photo frame to the periphery of the first picture; where when the cropping operation continuously acts on the interface of the terminal device, the terminal device does not display the photo frame; when the cropping operation ends, the periphery of the second picture includes the photo frame.

[0259] In the embodiment of the present application, the first operation can be used to add a photo frame to the periphery of the picture. The first operation can correspond to ​As shown in Fig. f: The mobile phone receives the operation that the user selects the photo frame function 205 and adds a photo frame to the picture 101.

[0260] According to ​ the logic layer shown, the photo frame is located on the upper layer of the cropping. Therefore, the cropping operation does not act on the photo frame. When the terminal device responds to the user's operation to crop the first picture, the photo frame is temporarily not displayed. When the terminal device responds to the user's operation and completes the cropping operation, the periphery of the second picture includes the photo frame. Among them, the size of the photo frame can be automatically adjusted according to the size of the second picture.

[0261] In this way, when the user crops the picture, the photo frame is not affected by the cropping and can be redisplayed on the periphery of the cropped picture after the cropping is completed, meeting the user's expectation for picture processing and enhancing the user's experience.

[0262] Optionally, before the terminal device adds the second type of element to the first picture, it further includes: the terminal device receives a fourth operation; in response to the fourth operation, the terminal device displays a filter toolbar, and the filter toolbar includes one or more filter options; when receiving the trigger of the first filter option among the multiple filter options, the terminal device adds the first filter corresponding to the first filter option to the first picture, and displays that the first filter option is in a selected state; between the terminal device adding the second type of element to the first picture and the terminal device receiving the cropping operation, it further includes: the terminal device receives a fifth operation; in response to the fifth operation, the terminal device displays a filter toolbar, and in the filter toolbar, the first filter option is in a selected state; when receiving the trigger of the second filter option among the multiple filter options, the terminal device switches the first filter to the second filter corresponding to the second filter option, and in the filter toolbar, the second filter option is in a selected state and the first filter option is in an unselected state.

[0263] In the embodiment of the present application, the fourth operation can be used to activate the filter function, and the fourth operation can correspond to ​ the operation in which the user selects the filter function 401 in the toolbar 1001 shown in Fig. a. The fifth operation can be used to activate the filter function again, and the fifth operation can correspond to ​ the operation in which the mobile phone receives the user's selection of the filter function 401 shown in Fig. e. Among them, between the fourth operation and the fifth operation, the terminal device can receive the operation performed by the user on the picture other than the filter processing.

[0264] The first filter option can correspond to ​ Filter 3 in Fig., when the terminal device receives the operation of the user selecting the first filter option, the first filter option is in a selected state. Among them, the selected state can be that the first filter option is highlighted, the background color of the first filter option becomes lighter or darker, etc. The embodiment of the present application does not make specific limitations on this.

[0265] Optionally, after the terminal device adds the first filter corresponding to the first filter option to the first picture, when the terminal device receives an operation from the user other than the filter processing, the terminal device processes the picture in response to the user's operation. After the processing is completed, when the terminal device receives an operation from the user to activate the filter function, the terminal device displays a filter toolbar, where the first filter option in the filter toolbar is in the selected state. In response to the user's operation to switch the filter, the terminal device switches the filter added to the first picture to the second filter, switches the second filter option to the selected state, and switches the first filter option to the unselected state.

[0266] For example, after the terminal device adds Filter 3 corresponding to the Filter 3 option to the first picture, the terminal device receives an operation from the user to add text. The terminal device adds text to the picture in response to the user's operation. After the text is added, when the terminal device receives an operation from the user to activate the filter function, the terminal device displays a filter toolbar, and the Filter 3 option in the filter toolbar is in the selected state. In response to the user's operation to switch the filter, the terminal device switches the Filter 3 added to the first picture to Filter 4, switches the Filter 4 option to the selected state, and switches the Filter 3 option to the unselected state.

[0267] That is to say, the gallery application of the terminal device can remember the filter selected by the user and can modify the filter already added to the picture. Without the need for the user to compare filters, search for filters, etc., the previously selected filter can be located. In the embodiments of the present application, changes can also be made to the mosaic, adjustment, blurring, or beauty added to the picture. In this way, it is convenient for the user to process the picture, making the user's operation more convenient and improving the user experience.

[0268] Optionally, before the terminal device adds the second type of element to the first picture, it further includes: the terminal device receives a sixth operation; in response to the sixth operation, the terminal device adds the first text to the first picture; between the terminal device adding the second type of element to the first picture and receiving a cropping operation, it further includes: the terminal device receives a seventh operation; in response to the seventh operation, the first text is displayed in an editable state; the terminal device receives an eighth operation; in response to the eighth operation, the terminal device modifies the first text to the second text.

[0269] In the embodiments of the present application, the sixth operation can be used to add text, and the sixth operation can correspond to ​ the operation of the terminal device receiving the user adding text 107 as shown in e. The seventh operation can be used to select the text added to the picture, and the seventh operation can correspond to ​The mobile phone shown in a receives an operation where the user selects text 107. Among them, between the sixth operation and the seventh operation, the terminal device can receive an operation performed by the user on the picture other than text processing. The eighth operation can be used to edit text, and the eighth operation can correspond to ​ In c of, the terminal device receives an operation where the user modifies text 107.

[0270] The first text can correspond to text 107. When the terminal device receives an operation where the user selects the first text, the first text switches to an editable state, and the user can modify the content, style, etc. of the first text.

[0271] Optionally, after the terminal device adds the first text to the first picture, the terminal device receives an operation performed by the user other than text processing. The terminal device processes the picture in response to the user's operation. After the processing is completed, the terminal device receives an operation where the user selects the first text, and the first text switches to an editable state. The terminal device modifies the first text to the second text in response to the user's operation of modifying the first text.

[0272] For example, after the terminal device adds text 107 with the content "text" to the first picture, the terminal device receives an operation where the user crops the picture. The terminal device crops the picture in response to the user's operation. After the cropping is completed, the terminal device receives an operation where the user selects text 107, and text 107 switches to an editable state. The terminal device modifies the content of text 107 to "read" in response to the user's operation of modifying the text.

[0273] That is to say, after the user adds text and then performs other operations, when the user selects the text added to the picture again, the corresponding editing interface of the text can be switched to modify and edit the text again. In the embodiments of the present application, the added stickers, graffiti, watermarks, photo frames, etc. can also be modified. In this way, it is convenient for the user to process pictures and improves the user experience.

[0274] It can be understood that in the above steps S1401 - S1409, S1401, S1403, and S1409 are optional steps.

[0275] Combined with the above ​ , the method provided by the embodiments of the present application has been described. Next, the device for executing the above method provided by the embodiments of the present application will be described. As ​ shown, ​ is a schematic structural diagram of a picture processing device provided by the embodiments of the present application. This picture processing device can be the terminal device in the embodiments of the present application, or a chip or chip system inside the terminal device.

[0276] As ​As shown, the image processing device 1400 can be used in a circuit, a hardware component, or a chip. The image processing device includes a processing unit 1410. Among them, the processing unit 1410 is used to support the steps executed by the image processing device. For example, the processing unit is used to process the steps from S1401 to S1409.

[0277] In a possible implementation, the image processing device may further include: a storage unit 1430. Among them, the storage unit 1430 may include one or more memories, and the memory may be a device or a component in one or more devices or circuits for storing programs or data.

[0278] The storage unit 1430 can exist independently and be connected to the processing unit 1410 through a communication bus. The storage unit 1430 can also be integrated with the processing unit 1410.

[0279] Taking the image processing device as an example of the chip or chip system of the terminal device in the embodiments of the present application, the storage unit 1430 can store computer-executable instructions of the method of the terminal device, so that the processing unit 1410 executes the method of the terminal device in the above embodiments. The storage unit 1430 can be a register, a cache, or a random access memory (RAM), etc. The storage unit 1430 can be integrated with the processing unit 1410. The storage unit 1430 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions. The storage unit 1430 can be independent of the processing unit 1410.

[0280] In a possible implementation, the image processing device may further include: a communication unit 1420. Among them, the communication unit 1420 is used to support the interaction between the image processing device and other devices. Exemplarily, when the image processing device is a terminal device, the communication unit 1420 can be a communication interface or an interface circuit. When the image processing device is a chip or a chip system inside the terminal device, the communication unit 1420 can be a communication interface. For example, the communication interface can be an input / output interface, a pin, or a circuit, etc.

[0281] The device in this embodiment can correspondingly be used to execute the steps executed in the above method embodiments, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0282] ​ This is a schematic diagram of the hardware structure of an electronic device provided by the embodiments of the present application. As ​ shown, the electronic device includes a processor 1501, a communication line 1504, and at least one communication interface ( ​ exemplarily taking the communication interface 1503 as an example for illustration).

[0283] The processor 1501 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the solution of the present application.

[0284] The communication line 1504 may include a circuit for transmitting information between the above components.

[0285] The communication interface 1503, using any device such as a transceiver, is used to communicate with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.

[0286] Possibly, the electronic device may further include a memory 1502.

[0287] The memory 1502 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor through the communication line 1504. The memory may also be integrated with the processor.

[0288] Among them, the memory 1502 is used to store computer execution instructions for executing the solution of the present application, and is controlled by the processor 1501 to execute. The processor 1501 is used to execute the computer execution instructions stored in the memory 1502, so as to implement the method provided by the embodiments of the present application.

[0289] Possibly, the computer execution instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not make specific limitations thereto.

[0290] In a specific implementation, as an example, the processor 1501 may include one or more CPUs, such as ​ CPU0 and CPU1 in

[0291] In a specific implementation, as an example, the electronic device may include multiple processors, such as ​ processor 1501 and processor 1505 in

[0292] Exemplarily, ​ FIG. is a schematic structural diagram of a chip provided by an embodiment of the present application. The chip 1600 includes one or more than two (including two) processors 1620 and a communication interface 1630.

[0293] In some embodiments, the memory 1640 stores the following elements: executable modules or data structures, or subsets thereof, or extended sets thereof.

[0294] In the embodiment of the present application, the memory 1640 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1620. A part of the memory 1640 may also include a non-volatile random access memory (NVRAM).

[0295] In the embodiment of the present application, the memory 1640, the communication interface 1630, and the processor 1620 are coupled together through a bus system 1610. Among them, the bus system 1610 may include a power bus, a control bus, a status signal bus, etc. in addition to a data bus. For the sake of description, in ​ all kinds of buses are labeled as the bus system 1610.

[0296] The methods described in the embodiments of the present application above can be applied to, or implemented by, the processor 1620. The processor 1620 may be an integrated circuit chip with the ability to process signals. During implementation, the steps of the above methods can be completed by the integrated logic circuit in the hardware of the processor 1620 or by instructions in the form of software. The above-mentioned processor 1620 may be a general-purpose processor (e.g., a microprocessor or a conventional processor), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate, transistor logic devices, or discrete hardware components. The processor 1620 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.

[0297] The steps of the methods disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the art such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read-only memory (EEPROM). This storage medium is located in the memory 1640, and the processor 1620 reads the information in the memory 1640 and combines its hardware to complete the steps of the above methods.

[0298] In the above embodiments, the instructions stored in the memory for the processor to execute can be implemented in the form of a computer program product. Among them, the computer program product can be pre-written in the memory in advance, or downloaded and installed in the memory in the form of software.

[0299] A computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, a process or function according to the embodiments of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, a computer, a server, or a data center to another website, a computer, a server, or a data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. For example, the available medium may include magnetic media (such as floppy disks, hard disks, or magnetic tapes), optical media (such as digital versatile discs (DVDs)), or semiconductor media (such as solid state disks (SSDs)).

[0300] Embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. The computer-readable medium may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium accessible by a computer.

[0301] As a possible design, the computer-readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc memories; the computer-readable medium may include magnetic disk memories or other magnetic disk storage devices. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, a server, or other remote sources using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies (such as infrared, radio, and microwave), then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, magnetic disks and optical discs include optical discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where magnetic disks usually reproduce data magnetically, while optical discs use lasers to reproduce data optically.

[0302] The above combinations should also be included within the scope of the computer-readable medium. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A method for image processing, characterized in that, Including: The terminal device displays a first picture. The terminal device adds first - type elements to the first picture. The terminal device adds second - type elements to the first picture. The terminal device receives a cropping operation, and the cropping operation continuously acts on the interface of the terminal device. In response to the cropping operation, the terminal device displays the first picture, displays the second - type elements, displays the cropping area corresponding to the cropping operation, and does not display the first - type elements. When the cropping operation ends, the terminal device obtains a second picture, and the second picture includes: the first - type elements, the content of the first picture within the coverage of the target cropping area, and the content of the second - type elements within the coverage of the target cropping area; the target cropping area is the cropping area corresponding to the end moment of the cropping operation.

2. The method according to claim 1, wherein The first - type elements include one or more of the following: text, watermark, or sticker. The second - type elements include one or more of the following: graffiti or mosaic.

3. The method according to claim 1, wherein The first - type elements include one or more of the following: graffiti, watermark, or sticker. The second - type elements include one or more of the following: text or mosaic.

4. The method according to claim 2 or 3, characterized in that, The gap between the position of the first - type elements in the second picture and the position of the first - type elements in the first picture is less than a preset value.

5. The method according to any one of claims 1 to 3, characterized in that Before the terminal device receives the cropping operation, it further includes: The terminal device receives a first operation. In response to the first operation, the terminal device adds a photo frame to the periphery of the first picture. Wherein, when the cropping operation continuously acts on the interface of the terminal device, the terminal device does not display the photo frame. When the cropping operation ends, the periphery of the second picture includes the photo frame.

6. The method according to any one of claims 1 to 3, characterized in that After the terminal device displays the first picture, it further includes: The terminal device receives a second operation on the first picture in the gallery application. In response to the second operation, the terminal device displays a toolbar, wherein the toolbar includes a primary toolbar and does not include a secondary toolbar.

7. The method according to claim 6, wherein The primary toolbar includes one or more of the following functions: cropping, filter, adjustment, beauty, graffiti, text, mosaic, watermark, photo frame, blurring, color retention, or sticker.

8. The method according to claim 7, wherein Some functions are displayed in the primary toolbar, and the method further includes: When a sliding operation is received in the primary toolbar, based on the sliding direction of the sliding operation, the functions hidden and displayed in the sliding direction in the primary toolbar are displayed.

9. The method according to any one of claims 1-3, 7-8, characterized in that, After the terminal device obtains the second picture, it further includes: The terminal device receives a third operation. In response to the third operation, the terminal device saves the second picture.

10. The method according to any one of claims 1-3, 7-8, characterized in that, Before the terminal device adds second - type elements to the first picture, it further includes: The terminal device receives a fourth operation. In response to the fourth operation, the terminal device displays a filter toolbar, and the filter toolbar includes one or more filter options. When a trigger for a first filter option among the multiple filter options is received, the terminal device adds the first filter corresponding to the first filter option to the first picture, and displays the first filter option as a selected state; Before the terminal device adds the second type of element to the first picture and before the terminal device receives the cropping operation, it further includes: The terminal device receives a fifth operation; In response to the fifth operation, the terminal device displays a filter toolbar, and in the filter toolbar, the first filter option is in a selected state; When a trigger for a second filter option among the multiple filter options is received, the terminal device switches the first filter to the second filter corresponding to the second filter option. In the filter toolbar, the second filter option is in a selected state, and the first filter option is in an unselected state.

11. The method according to any one of claims 1-3, 7-8, characterized in that, Before the terminal device adds the second type of element to the first picture, it further includes: The terminal device receives a sixth operation; In response to the sixth operation, the terminal device adds first text to the first picture; Before the terminal device adds the second type of element to the first picture and before the terminal device receives the cropping operation, it further includes: The terminal device receives a seventh operation; In response to the seventh operation, the first text is displayed as an editable state; The terminal device receives an eighth operation; In response to the eighth operation, the terminal device modifies the first text to second text.

12. The method according to any one of claims 1-3, 7-8, characterized in that, Before the terminal device displays the first picture, it further includes: The terminal device displays an interface of a picture gallery, and the interface of the picture gallery includes one or more pictures; The terminal device receives a ninth operation; In response to the ninth operation, the terminal device displays the first picture.

13. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the electronic device is caused to execute the method according to any one of claims 1 - 12.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 - 12 is implemented.

15. A computer program product, characterized in that, It includes a computer program, and when the computer program is run, the electronic device is caused to execute the picture processing method according to any one of claims 1 - 12.

Citation Information

Patent Citations

  • Picture processing method and terminal and computer readable storage medium

    CN107633475A

  • Photo clipping method and device

    CN111768416A