Image editing method and device, electronic equipment and storage medium
By meshing the watermark layer and automatically filling the target watermark material, the problem of long and cumbersome steps in the existing technology of adding watermarks in watermarks is solved, and automatic watermark addition and positional uniformity are achieved, which improves the visual effect of the image.
Patent Information
- Application Number
- CN202311568825.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2025-05-23
AI Technical Summary
When adding multiple watermarks to an image in the prior art, users need to manually adjust the position of each watermark, which takes a long time and cumbersome steps, affecting the visual effect of the image.
In response to the watermark addition instruction, the watermark layer is meshed to obtain multiple areas, and the target watermark material is automatically filled in these areas, and the image to be edited and the watermark layer filled with the watermark material is combined to obtain the edited image.
Automatic watermark addition is realized, which simplifies the steps of adding multiple watermarks on the image, shortens the time-consuming process of adding watermarks, and ensures the position of the watermark is uniform and unified, improving the visual effect of the image.
Smart Images

Figure CN120032016A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of image editing, and in particular to an image editing method, device, electronic device and storage medium. Background Art
[0002] In the current digital age, images play a very important role in human life. They can not only convey information, but also help people better understand and remember content, record life, etc.
[0003] After creating an image, users often want to add a watermark to the image in order to protect their own rights. When a user needs to add multiple watermarks to an image, the existing watermark adding method requires the user to manually adjust the position of each watermark. This method is not only time-consuming and cumbersome, but also because the position of the watermark is completely determined by the user, the position of the watermark after the user's adjustment may not be regular and uniform, affecting the visual effect of the entire image. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image editing method, device, electronic device and storage medium.
[0005] In a first aspect, the present disclosure provides an image editing method, the method comprising:
[0006] Determine the image to be edited and the target watermark material;
[0007] In response to the watermark adding instruction, the watermark layer is divided into grids to obtain a plurality of first areas;
[0008] Fill the target watermark material in the first area;
[0009] The image to be edited is synthesized with the watermark layer filled with the target watermark material to obtain an edited image.
[0010] In a second aspect, the present disclosure further provides an image editing device, the device comprising:
[0011] A determination module, used to determine the image to be edited and the target watermark material;
[0012] A division module, for dividing the watermark layer into grids in response to a watermark adding instruction to obtain a plurality of first areas;
[0013] A filling module, used for filling the target watermark material in the first area;
[0014] The synthesis module is used to synthesize the image to be edited with the watermark layer filled with the target watermark material to obtain the edited image.
[0015] In a third aspect, the present disclosure further provides an electronic device, the electronic device comprising:
[0016] one or more processors;
[0017] A storage device for storing one or more programs;
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the image editing method as described above.
[0019] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the image editing method as described above when executed by a processor.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] The technical solution provided by the disclosed embodiment is to divide the watermark layer into a grid in response to a watermark adding instruction to obtain multiple first areas; fill the target watermark material in the first area; and synthesize the image to be edited with the watermark layer filled with the target watermark material to obtain the edited image. The essence is to divide the watermark layer into a grid and automatically fill the target watermark material according to the grid division result, so that multiple target watermark materials can be arranged in the image to be edited according to certain standards or rules. On the one hand, it can realize automatic watermark adding, simplify the steps of adding multiple watermarks on an image, and shorten the overall time of watermark adding; on the other hand, because the target watermark material is filled according to the grid division result, it can ensure that the positions of multiple target watermark materials are regular and unified, avoiding the situation of causing adverse effects on the visual effect of the entire image. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 A flowchart of an image editing method provided by an embodiment of the present disclosure;
[0025] Figure 2-Figure 6A schematic diagram of an image editing process provided by an embodiment of the present disclosure;
[0026] Figure 7 A flowchart of another image editing method provided by an embodiment of the present disclosure;
[0027] Figure 8-Figure 14 Schematic diagrams of several other watermark layers provided in the embodiments of the present disclosure;
[0028] Figure 15-18 Schematic diagrams of several image editing interfaces provided by embodiments of the present disclosure;
[0029] Fig.19 is a structural schematic diagram of an image editing device in an embodiment of the present disclosure;
[0030] Fig. 20 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0033] Figure 1 This is a flowchart of an image editing method provided by an embodiment of the present disclosure. This embodiment is applicable to the case where a watermark is added in a client. The method can be executed by an image editing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, a smart home device, etc. Alternatively, this embodiment is applicable to the case where a watermark is added in a server. The method can be executed by an image editing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server.
[0034] like Figure 1 As shown, the method may specifically include:
[0035] S110: Determine the image to be edited and the target watermark material.
[0036] The image to be edited may be, for example, an image to which a watermark is to be added. The present application does not limit the source of the image to be edited. For example, the image to be edited may be taken by a user, or downloaded from the network by a user.
[0037] The target watermark material may be, for example, a material that is desired to be added to the image to be edited as a watermark.
[0038] The target watermark material can be completely designed by the user himself, or obtained by the user modifying an existing material template.
[0039] S120. In response to the watermark adding instruction, the watermark layer is divided into grids to obtain a plurality of first areas.
[0040] The watermark adding instruction may be, for example, an instruction for instructing to add a target watermark material to the image to be edited. In practice, optionally, the watermark adding instruction is generated in response to a trigger operation for adding a watermark to the entire screen.
[0041] The watermark layer is divided into grids, and each obtained grid is a first area.
[0042] There are many ways to implement this step. For example, the watermark layer can be divided into square grids, triangular grids, or grids of other shapes.
[0043] Different ways of meshing the watermark layer result in different shapes of the first area. For example, if the watermark layer is meshed in a square grid, the shape of the first area is a square. If the watermark layer is meshed in a triangle grid, the shape of the first area is a triangle.
[0044] In some embodiments, optionally, the size of the watermark layer is the same as the size of the image to be edited.
[0045] S130: Fill the target watermark material in the first area.
[0046] During the execution of this step, the target watermark material may be filled in all the first regions, or may be filled in part of the first regions.
[0047] Furthermore, if there are multiple target watermark materials, different first regions may be set to fill the same target watermark material, different first regions may be set to fill different target watermark materials, or the same first region may be set to fill multiple target watermark materials.
[0048] S140: Synthesize the image to be edited with the watermark layer filled with the target watermark material to obtain an edited image.
[0049] For example, Figure 2 Given an image to be edited, Figure 3 Given a target watermark material. After receiving the watermark adding instruction, a watermark layer with the same size as the image to be edited is formed, and the watermark layer is divided into square grids. The division results are as follows: Figure 4 As shown. Figure 4 In the example, each square grid is a first area. Each first area is filled with target watermark material. After filling, the watermark layer presents the effect as follows: Figure 5 Finally, Figure 2 The image to be edited in Figure 5 The watermark layer in the image is synthesized to obtain the edited image. Figure 6 shown.
[0050] The above technical solution divides the watermark layer into a grid in response to the watermark adding instruction to obtain multiple first areas; fills the target watermark material in the first area; and synthesizes the image to be edited with the watermark layer filled with the target watermark material to obtain the edited image. Its essence is to divide the watermark layer into a grid and automatically fill the target watermark material according to the grid division result, so that multiple target watermark materials can be arranged in the image to be edited according to certain standards or rules. On the one hand, it can realize automatic watermark adding, simplify the steps of adding multiple watermarks on an image, and shorten the overall time of watermark adding; on the other hand, because the target watermark material is filled according to the grid division result, it can ensure that the positions of multiple target watermark materials are regular and unified, avoiding the situation of adverse effects on the visual effect of the entire image.
[0051] Figure 7 Flow chart of another image editing method provided by the embodiment of the present disclosure. Figure 7 , the image editing method comprises:
[0052] S210: Determine the image to be edited and the target watermark material.
[0053] S220. In response to the watermark adding instruction, the watermark layer is divided into grids to obtain a plurality of first areas.
[0054] S230: Fill the target watermark material in the first area.
[0055] S240: In response to the adjustment operation on the watermark layer, adjust the first area and / or the target watermark material.
[0056] The adjustment operation on the watermark layer may be, for example, an operation performed by a user. It reflects that the user wants to adjust the first area and / or the target watermark material. In practice, the adjustment operation on the watermark layer may be, for example, a click or slide operation on a specific area or a specific control in a page for adding a watermark.
[0057] There are many implementation methods for this step, and this application does not limit this. Exemplarily, the implementation method of this step includes at least one of the following: in response to the size adjustment operation of the target watermark material, changing the size of the first area, controlling the target watermark material to scale in the same proportion as the size of the first area; in response to the spacing adjustment operation of the target watermark material, reducing the size of the target watermark material; in response to the adjustment operation of the filling method, changing the filling method of the target watermark material in the first area.
[0058] The size adjustment operation on the target watermark material may be, for example, a click or slide operation on an option with a function of adjusting the size of the target watermark material, or a drag operation on the target watermark material.
[0059] For example, in Figure 5 If the user performs a size adjustment operation to increase the target watermark material, see Figure 8 , increase the size of the first area, and at the same time increase the size of the target watermark material filled in the first area, so that along any direction parallel to the watermark layer, the enlargement multiple of the size of the target watermark material is the same as the enlargement multiple of the size of the first area.
[0060] Similarly, the spacing adjustment operation on the target watermark material may be, for example, a click or slide operation on an option having the function of adjusting the spacing of the target watermark material, or a drag operation on the target watermark material.
[0061] For example, in Figure 5 If the user performs a trigger operation to reduce the target watermark material spacing, see Fig. 9 , reducing the size of the target watermark material while keeping the size of the first area unchanged.
[0062] The adjustment operation on the filling mode includes at least one of the following: an adjustment operation on the rotation angle of the target watermark material, an adjustment operation on the interlacing degree of the target watermark material, and an adjustment operation on the transparency of the target watermark material.
[0063] If the implementation method of this step includes changing the filling method of the target watermark material in the first area in response to the adjustment operation of the filling method, optionally, after this step, it also includes: determining a to-be-completed area in the first area; and filling the to-be-completed area based on the target watermark material.
[0064] In practice, the target watermark material often carries information that the user wants other users to know. Due to the limitation of the first area, changing the filling method of the target watermark material in the first area may cause the target watermark material to exceed the first area, so that the part exceeding the first area cannot be displayed, and then the information carried by the target watermark material cannot be displayed relatively completely in the first area. By setting the area to be completed to be filled, the information carried by the target watermark material can be displayed relatively completely.
[0065] The area to be completed may be, for example, an area where information needs to be completed, and may be a local area of the first area.
[0066] Based on the target watermark material, the area to be completed is filled, for example, a first image is determined from the target watermark material, and the area to be completed is filled with the first image. The first image is a partial image of the target watermark material.
[0067] It should be noted that before the area to be completed is filled, the area to be completed may have been filled with other partial images of the target watermark material, or may not have been filled with the target watermark material. If the area to be completed has been filled with other partial images of the target watermark material, the other partial images of the target watermark material that fill the area to be completed are defined as the second image. "Filling the area to be completed with the first image" essentially means replacing the second image with the first image.
[0068] Further, determining the area to be completed in the first area includes: determining the area to be completed in the first area based on a preset rule for determining the area to be completed; filling the area to be completed based on the target watermark material, including: filling the area to be completed based on the target watermark material and the preset completion rule.
[0069] The rule for determining the area to be completed may include, for example, relative position information between the area to be completed and the first area under different filling modes; or, the rule for determining the area to be completed may include a functional relationship between the relative position information between the area to be completed and the first area and the filling mode.
[0070] The completion rule may include, for example, a specific method of determining the first image from the target watermark material under different filling modes. Preferably, based on a preset completion rule, the first image is determined in the target watermark material; and the area to be completed is filled with the first image.
[0071] For example, in Figure 5 If the user adjusts the rotation angle of the target watermark material, see Fig.10 , rotate the target watermark material. Since each target watermark material is limited to the first area it fills, each target watermark material is intercepted by the border of the first area. The target watermark material includes four patterns. Fig.10In the video, each pattern of each target watermark material is not fully displayed. Fig.11 In the figure, the area to be completed is shown. Each first area includes two areas to be completed. After filling each area to be completed, the effect is as follows: Fig.12 As shown. Fig.12 In the video, the smiling face and the little sun in each target watermark material are fully displayed.
[0072] For another example, the filling position of the target watermark material in the first area is defined as the position of the geometric center of the target watermark material in the first area. Figure 8 On the basis of, if the user performs an adjustment operation on the interlacing degree of the target watermark material, the filling position of the target watermark material in the odd-numbered rows remains unchanged, and the filling position of the target watermark material in the even-numbered rows is moved to the left. Since each target watermark material is limited to the first area it fills, each target watermark material will be cut off by the border of the first area. The cut result is as follows Fig.13 As shown. Fig.13 In the example, each first region includes a to-be-completed region. Each to-be-completed region is filled, and the effect after filling is as follows: Fig.14 shown.
[0073] Since the transparency of the target watermark material is adjusted, it often does not involve the display of the information it carries. Optionally, if the filling method is adjusted to adjust the transparency of the target watermark material, the step of "determining the area to be completed in the first area; filling the area to be completed based on the target watermark material" is not executed.
[0074] S250: Synthesize the image to be edited with the watermark layer filled with the target watermark material to obtain an edited image.
[0075] The above technical solution adjusts the first area and / or the target watermark material by setting a response to the adjustment operation of the watermark layer. Its essence is to allow the user to adjust the arrangement of the target watermark material in the image to be edited as needed, which can meet the user's personalized usage needs.
[0076] The following takes image editing in a terminal as an example to explain in detail the technical solution provided by this application.
[0077] See also Fig.15 , the user can select one or more images in the image library as the image to be edited, and the image editing page will be displayed in the terminal. Fig.15, the image editing page includes an image preview area and a configuration area. After the user selects the image to be edited, the image to be edited is displayed in the preview area. The configuration area includes multiple first-level options and a second-level configuration item display area. The first-level options are "Material", "Edit", "Style" and "Full Screen Settings". If the user selects the "Material" option, multiple watermark materials are displayed in the second-level configuration item display area, and the user can select one of the watermark materials. If the user selects watermark material 1, the image to be edited and a separate watermark material 1 are displayed in the preview area. See Fig.16 , if the user further selects the "Edit" option, the text editing item corresponding to watermark material 1 is displayed in the secondary configuration item display area. Exemplarily, watermark material 1 is a watermark material used for store promotion, and there are two text editing items corresponding to watermark material 1, one for editing the store name and the other for editing the store contact number. The user can enter "AAAAA" as the store name and "bbb" as the store contact number. After editing the text editing item corresponding to watermark material 1, the text content in watermark material 1 displayed in the image preview area will be updated accordingly.
[0078] See also Fig.17 If the user further selects the "Style" option, the style options corresponding to the watermark material 1 are displayed in the secondary configuration item display area. Fig.17 In the watermark material 1, the user is allowed to configure the font and color of the text. After the above configuration, the watermark material 1 finally obtained is the target watermark material mentioned in this application. After configuring the font and color corresponding to the watermark material 1, the watermark material 1 displayed in the image preview area will be updated accordingly.
[0079] See also Fig.18 If the user further selects the "Full Screen Settings" option, the configuration item "Set Watermark Full Screen" related to the full screen setting will be displayed in the secondary configuration item display area. Fig.18 The "Set Watermark Full Screen" configuration item is a switch option. If the user chooses to turn on the setting of watermark full screen, the user can further configure the size of the target watermark material, the spacing of the target watermark material, the rotation angle of the target watermark material, the degree of interlacing of the target watermark material, and the transparency of the target watermark material.
[0080] When the user chooses to configure one or more of the target watermark material size, target watermark material spacing, target watermark material rotation angle, target watermark material interlacing degree and target watermark material transparency, the preview image displayed in the image preview area is updated after each configuration.
[0081] It should be noted that, in the example of this application, for ease of understanding, grid lines are drawn in some watermark layers. In practice, grid lines may not be displayed in the watermark layer.
[0082] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0083] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0084] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0085] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0086] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0087] Fig.19 Schematic diagram of the structure of an image editing device in an embodiment of the present disclosure. The image editing device provided by the embodiment of the present disclosure can be configured in a client or in a server. Fig.19 , the image editing device specifically comprises:
[0088] A determination module 310 is used to determine the image to be edited and the target watermark material;
[0089] A division module 320, for dividing the watermark layer into grids in response to a watermark adding instruction to obtain a plurality of first regions;
[0090] A filling module 330, configured to fill the first area with the target watermark material;
[0091] The synthesis module 340 is used to synthesize the image to be edited with the watermark layer filled with the target watermark material to obtain an edited image.
[0092] Furthermore, the device also includes a configuration module for adjusting the first area and / or the target watermark material in response to an adjustment operation on the watermark layer after the target watermark material is filled in the first area.
[0093] Furthermore, the configuration module is used to perform at least one of the following steps:
[0094] In response to a size adjustment operation on the target watermark material, the first region size is changed, and the target watermark material is controlled to be scaled in the same proportion as the first region size;
[0095] In response to the spacing adjustment operation on the target watermark material, reducing the size of the target watermark material;
[0096] In response to the adjustment operation on the filling mode, the filling mode of the target watermark material in the first area is changed.
[0097] Furthermore, the configuration module is used to:
[0098] In response to the adjustment operation on the filling mode, after changing the filling mode of the target watermark material in the first area, determining a to-be-completed area in the first area;
[0099] The area to be completed is filled based on the target watermark material.
[0100] Furthermore, the configuration module is used to:
[0101] Determine the full area to be completed in the first area based on a preset full area to be completed determination rule;
[0102] The filling the to-be-completed area based on the target watermark material includes:
[0103] The area to be completed is filled based on the target watermark material and a preset completion rule.
[0104] Furthermore, the configuration module is used to:
[0105] Based on the preset complement rule, determining a first image in the target watermark material;
[0106] The area to be completed is filled with the first image.
[0107] Further, the adjustment operation of the filling mode includes at least one of the following:
[0108] The adjustment operation of the rotation angle of the target watermark material, the adjustment operation of the interlacing degree of the target watermark material and the adjustment operation of the transparency of the target watermark material.
[0109] The image editing device provided in the embodiment of the present disclosure can execute the steps executed by the client or server in the image editing method provided in the embodiment of the method of the present disclosure, and has the execution steps and beneficial effects, which will not be repeated here.
[0110] Fig. 20 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig. 20 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Fig. 20 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0111] like Fig. 20 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003 to implement the performance problem location method of the embodiment described in the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0112] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although Fig. 20 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0113] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the image editing method as described above. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0114] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include an information signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0115] In some embodiments, the client and the server may communicate using any known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.
[0116] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0117] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0118] Determine the image to be edited and the target watermark material;
[0119] In response to the watermark adding instruction, the watermark layer is divided into grids to obtain a plurality of first areas;
[0120] Fill the target watermark material in the first area;
[0121] The image to be edited is synthesized with the watermark layer filled with the target watermark material to obtain an edited image.
[0122] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0123] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0124] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0126] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0127] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0129] one or more processors;
[0130] A memory for storing one or more programs;
[0131] When the one or more programs are executed by the one or more processors, the one or more processors implement any image editing method provided by the present disclosure.
[0132] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the image editing method as described in any one of the methods provided by the present disclosure is implemented.
[0133] The embodiment of the present disclosure also provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the image editing method as described above is implemented.
[0134] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0135] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image editing method, It is characterized in that The method comprises: Determine the image to be edited and the target watermark material; In response to the watermark adding instruction, the watermark layer is divided into grids to obtain a plurality of first areas; Fill the target watermark material in the first area; The image to be edited is synthesized with the watermark layer filled with the target watermark material to obtain an edited image.
2. The method according to claim 1, It is characterized in that After filling the target watermark material in the first area, the method further includes: In response to the adjustment operation on the watermark layer, the first area and / or the target watermark material is adjusted.
3. The method according to claim 2, It is characterized in that In response to the adjustment operation on the watermark layer, adjusting the first area and / or the target watermark material includes at least one of the following: In response to a size adjustment operation on the target watermark material, the first region size is changed, and the target watermark material is controlled to be scaled in the same proportion as the first region size; In response to the spacing adjustment operation on the target watermark material, reducing the size of the target watermark material; In response to the adjustment operation on the filling mode, the filling mode of the target watermark material in the first area is changed.
4. The method according to claim 2, It is characterized in that After the filling mode of the target watermark material in the first area is changed in response to the adjustment operation on the filling mode, the method further includes: Determine an area to be completed in the first area; The area to be completed is filled based on the target watermark material.
5. The method according to claim 4, It is characterized in that The determining of the to-be-completed area in the first area includes: Determine the full area to be completed in the first area based on a preset full area to be completed determination rule; The filling the to-be-completed area based on the target watermark material includes: The area to be completed is filled based on the target watermark material and a preset completion rule.
6. The method according to claim 5, It is characterized in that The filling of the to-be-completed area based on the target watermark material and a preset completion rule includes: Based on the preset complement rule, determining a first image in the target watermark material; The area to be completed is filled with the first image.
7. The method according to claim 3, It is characterized in that The adjustment operation of the filling mode includes at least one of the following: The adjustment operation of the rotation angle of the target watermark material, the adjustment operation of the interlacing degree of the target watermark material and the adjustment operation of the transparency of the target watermark material.
8. An image editing device, It is characterized in that The device comprises: A determination module, used to determine the image to be edited and the target watermark material; A division module, for dividing the watermark layer into grids in response to a watermark adding instruction to obtain a plurality of first areas; A filling module, used for filling the target watermark material in the first area; The synthesis module is used to synthesize the image to be edited with the watermark layer filled with the target watermark material to obtain the edited image.
9. An electronic device, It is characterized in that The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.