CN111857518A - Method and device for canceling image editing operation, electronic equipment and medium - Google Patents
Method and device for canceling image editing operation, electronic equipment and medium Download PDFInfo
- Publication number
- CN111857518A CN111857518A CN202010751127.2A CN202010751127A CN111857518A CN 111857518 A CN111857518 A CN 111857518A CN 202010751127 A CN202010751127 A CN 202010751127A CN 111857518 A CN111857518 A CN 111857518A
- Authority
- CN
- China
- Prior art keywords
- image
- editing operation
- coordinate point
- image editing
- cancelled
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The embodiment of the disclosure discloses a method, a device, electronic equipment and a medium for canceling image editing operation, wherein the method comprises the steps of obtaining the image editing operation, and correspondingly storing an image every preset interval operation times; receiving an operation cancelling instruction, and acquiring a first image closest to an editing operation to be cancelled and all image editing operations after the image editing operation corresponding to the first image and before the editing operation to be cancelled from the stored image; and generating a target image based on the first image and all image editing operations after the image editing operation corresponding to the first image and before the operation to be cancelled. By the method and the device, the memory consumption and the performance consumption in the revocation process of the image editing operation can be reduced, and the revocation efficiency of the image editing operation is improved.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for revoking an image editing operation, an electronic device, and a medium.
Background
Drawing tools such as an existing drawing board, an image editor, a photo editor and the like generally have the functions of drawing, erasing, canceling and restoring, wherein the technical difficulty is how to cancel the image editing operation. The prior art is mainly realized by adopting the following two schemes: (1) when the operation is cancelled, all the actions before the operation needing to be cancelled are redrawn once; (2) in the process of editing the image, each time the image is edited, a currently edited image is saved, and when the image is cancelled, the previous image corresponding to the operation to be cancelled is obtained.
However, when operations are performed many times before revocation is required, the scheme (1) is very performance consuming and inefficient. Scheme (2) needs to store multiple pictures, and frequent revocation increases IO operations of the device, consumes a large amount of memory, and is inefficient. Therefore, it is known that how to reduce the memory consumption and the performance consumption in the revocation process of the image editing operation and improve the revocation efficiency of the image editing operation is a technical problem to be solved urgently.
Disclosure of Invention
The embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a medium for undoing an image editing operation, so as to solve the technical problem mentioned in the foregoing background technology, or at least partially solve the technical problem mentioned in the foregoing background technology.
In a first aspect, an embodiment of the present disclosure provides a method for undoing an image editing operation, including:
acquiring image editing operation, and correspondingly storing an image every preset interval operation times;
receiving an operation cancelling instruction, and acquiring a first image closest to an editing operation to be cancelled and all image editing operations after the image editing operation corresponding to the first image and before the editing operation to be cancelled from the stored image;
and generating a target image based on the first image and all image editing operations after the image editing operation corresponding to the first image and before the operation to be cancelled.
In a second aspect, an embodiment of the present disclosure provides an apparatus for undoing an image editing operation, including:
the first acquisition module is used for acquiring image editing operation and correspondingly storing an image every preset interval operation times;
the second acquisition module is used for receiving an operation cancellation instruction, and acquiring a first image closest to an editing operation to be cancelled and all image editing operations after the image editing operation corresponding to the first image and before the editing operation to be cancelled from the stored image;
and the image generation module is used for generating a target image based on the first image and all image editing operations after the image editing operation corresponding to the first image and before the operation to be cancelled.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform a method of undoing an image editing operation as described in embodiments of the first aspect of the disclosure.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, where the computer instructions are used to execute a method for undoing an image editing operation according to an embodiment of the first aspect of the present disclosure.
The method comprises the steps that based on the image editing operation, one image is correspondingly stored every preset interval operation times; when the image editing operation needs to be cancelled, acquiring an image closest to the editing operation to be cancelled and all image editing operations after the image editing operation corresponding to the image and before the image editing operation to be cancelled; and finally, generating a target image by all image editing operations from the image and the image editing operation corresponding to the image editing operation before the operation to be cancelled, namely completing the cancelled image. The image storage capacity and the times of image editing operation needing to be executed in the revocation process are reduced, the memory consumption and the performance consumption in the revocation process of the image editing operation are reduced, and the revocation efficiency of the image editing operation is improved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following more detailed description of the embodiments of the present application, which is taken in conjunction with the accompanying drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application.
FIG. 1 is a flowchart illustrating a method for undoing an image-editing operation according to an embodiment of the present disclosure;
FIG. 2 is a diagram illustrating an undo apparatus for an image editing operation according to an embodiment of the present disclosure;
fig. 3 is a schematic block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The embodiment of the present disclosure provides a method for undoing an image editing operation, as shown in fig. 1, including the following steps:
step S1, acquiring image editing operation, and correspondingly storing an image every preset interval operation times;
the single continuous image editing operation represents one image editing operation, for example, one image editing operation performed from when the finger touches the screen to when the finger leaves the screen, one image editing operation performed from when the mouse clicks the screen to when the mouse is released, or the like. It can be understood that, every preset number of operations at intervals, when one image is stored, an image number is set for the stored image.
Step S2, receiving an operation canceling instruction, and acquiring a first image closest to an editing operation to be canceled and all image editing operations after the image editing operation corresponding to the first image and before the editing operation to be canceled from the stored image;
step S3, generating a target image based on the first image and all image editing operations after the image editing operation corresponding to the first image and before the operation to be undone.
Based on the method disclosed by the embodiment of the disclosure, the image storage capacity and the times of image editing operation needing to be executed in the revocation process can be reduced, the memory consumption and the performance consumption in the revocation process of the image editing operation are reduced, and the revocation efficiency of the image editing operation is improved.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
As an example, step S1 further includes:
step S11, acquiring a coordinate point set corresponding to each image editing operation except the image editing operation corresponding to the saved image;
and step S12, storing a coordinate point set corresponding to each image editing operation.
In step S11, all coordinate points corresponding to each image editing operation may be directly stored to obtain a corresponding coordinate point set, but when the number of coordinate points is too large, a larger memory may be occupied, which affects the efficiency of canceling the image editing operation.
The first embodiment,
Step S11 specifically includes the following steps:
step S111, storing an initial coordinate point of each image editing operation;
and step S112, when the storage time of the coordinate point on the time distance of the image editing operation is equal to a preset time interval threshold value, storing the coordinate point corresponding to the time point into a coordinate point set corresponding to the image editing operation.
It can be understood that the preset time interval threshold value needs to satisfy that an image drawn based on the finally obtained coordinate point set and an image drawn by the original image editing operation are within a preset error range, and the preset error range satisfies that human eyes cannot find that the image drawn based on the finally obtained coordinate point set and the image drawn by the original image editing operation have a difference. Through the steps S111-S112, the storage number of coordinate points in the coordinate point set can be greatly reduced, the memory occupation amount is reduced, the number of coordinate points can also be reduced in the process of redrawing the image editing operation in the revocation process, and the revocation efficiency of the image editing operation is improved.
The second embodiment,
Step S11 specifically includes the following steps:
step S101, storing an initial coordinate endpoint of each image operation and edition;
and S102, when the distance between the coordinate point of the image editing operation and the coordinate point of the last coordinate point is less than or equal to a preset distance interval threshold value, storing the coordinate point to a coordinate point set corresponding to the image editing operation.
It can be understood that the preset distance interval threshold value needs to satisfy that an image drawn based on the finally obtained coordinate point set and an image drawn by the original image editing operation are within a preset error range, and the preset error range satisfies that human eyes cannot find that the image drawn based on the finally obtained coordinate point set and the image drawn by the original image editing operation have a difference. Through the steps S101 to S102, the storage quantity of coordinate points in the coordinate point set can be greatly reduced, the memory occupation quantity is reduced, the quantity of the coordinate points can also be reduced in the process of redrawing the image editing operation in the revocation process, and the revocation efficiency of the image editing operation is improved.
As an example, in step S2, the obtaining a first image closest to the editing operation to be undone from the stored images may specifically include the following steps:
step S21, determining the image number N of the first image closest to the editing operation to be undone:
N=(m%n)*n
wherein,% represents the operation of solving the modulus, m is the number of the editing operation to be cancelled, and n is the interval times;
and step S22, acquiring an image corresponding to the image number, where the image is the first image.
As an example, step S3 may specifically include: and drawing a coordinate point set corresponding to each image editing operation from the image editing operation corresponding to the first image to the operation to be cancelled on the first image by taking the first image as an initial image, and generating the target image.
As an example, the value range of the number of interval operations may be set to [100,1000], and the number of interval operations in this range can ensure high revocation efficiency. When the maximum undo time is in the range of [100,1000], the interval operation time can be directly equal to the maximum undo time, and thus the setting can improve the undo efficiency of the image editing operation to a greater extent. The maximum revocation frequency refers to the maximum revocable frequency set on drawing tools such as drawing boards, image editors and photo editors, and the numerical revocation frequency can be defined by the tools or the users. However, it is understood that when the maximum revocation number is in the range of [100,1000], the number of interval operations is not limited to be equal to the maximum revocation number, and the corresponding number of interval operations may be selected in [100,1000] according to specific application requirements.
An embodiment of the present disclosure further provides a revocation apparatus for image editing operation, as shown in fig. 2, including: the image editing device comprises a first acquisition module 1, a second acquisition module 2 and an image generation module 3, wherein the first acquisition module 1 is used for acquiring image editing operation and correspondingly storing an image every preset interval operation times; the second obtaining module 2 is configured to receive an operation cancelling instruction, and obtain, from a stored image, a first image closest to an editing operation to be cancelled and all image editing operations after an image editing operation corresponding to the first image and before the editing operation to be cancelled; and the image generating module 3 is configured to generate a target image based on the first image and all image editing operations after the image editing operation corresponding to the first image and before the operation to be undone. Based on the device disclosed by the embodiment of the disclosure, the image storage capacity and the times of image editing operation needing to be executed in the revocation process can be reduced, the memory consumption and the performance consumption in the revocation process of the image editing operation are reduced, and the revocation efficiency of the image editing operation is improved.
As an example, the first obtaining module 1 further includes a coordinate point obtaining unit and a coordinate point storage unit, wherein the coordinate point obtaining unit is configured to obtain a set of coordinate points corresponding to each image editing operation other than the image editing operation corresponding to the saved image; the coordinate point storage unit is used for storing a coordinate point set corresponding to each image editing operation.
It should be noted that the coordinate point obtaining unit may directly store all coordinate points corresponding to each image editing operation to obtain a corresponding coordinate point set, but when the number of coordinate points is too large, a large memory may be occupied, and the cancellation efficiency of the image editing operation is affected.
The first embodiment,
The coordinate point acquisition unit comprises a first coordinate point acquisition subunit and a second coordinate point acquisition subunit, wherein the first coordinate point acquisition subunit is used for storing the initial coordinate point of each image editing operation; and the second coordinate point acquisition subunit is used for storing the coordinate point corresponding to the time point to the coordinate point set corresponding to the image operation editing operation when the storage time of the coordinate point at the time distance of the image editing operation is equal to a preset time interval threshold value. The first coordinate point acquisition subunit and the second coordinate point acquisition subunit can greatly reduce the storage quantity of coordinate points in the coordinate point set, reduce the memory occupation quantity, reduce the quantity of coordinate points in the process of redrawing the image editing operation in the revocation process, and improve the revocation efficiency of the image editing operation.
The second embodiment,
The coordinate point acquisition unit comprises a third coordinate point acquisition subunit and a fourth coordinate point acquisition subunit, wherein the third coordinate point acquisition subunit is used for storing the initial coordinate end point of each image operation edition; and the fourth coordinate point acquisition subunit is used for storing the coordinate point to the coordinate point set corresponding to the image operation editing operation when the coordinate distance between the coordinate point of the image editing operation and the last coordinate point is less than or equal to a preset distance interval threshold value. The third coordinate point acquisition subunit and the fourth coordinate point acquisition subunit can greatly reduce the storage quantity of coordinate points in the coordinate point set, reduce the memory occupation quantity, reduce the quantity of coordinate points in the process of redrawing the image editing operation in the revocation process, and improve the revocation efficiency of the image editing operation.
As an example, the second acquiring module 2 includes a first image acquiring unit for acquiring, from the stored images, a first image closest to the editing operation to be undone, the first image acquiring unit including a number determining subunit and a first image acquiring subunit, wherein the number determining subunit is configured to determine an image number N of the first image closest to the editing operation to be undone:
N=(m%n)*n
wherein,% represents the operation of solving the modulus, m is the number of the editing operation to be cancelled, and n is the interval times;
and the first image acquisition subunit is used for acquiring the image corresponding to the image number.
As an example, the image generating module 3 is specifically configured to use the first image as an initial image, and draw, on the first image, a set of coordinate points corresponding to each image editing operation after the image editing operation corresponding to the first image is performed to before an operation to be undone, so as to generate the target image.
As an example, the value range of the number of interval operations may be set to [100,1000], and the number of interval operations in this range can ensure high revocation efficiency. When the maximum undo time is in the range of [100,1000], the interval operation time can be directly equal to the maximum undo time, and thus the setting can improve the undo efficiency of the image editing operation to a greater extent. The maximum revocation frequency refers to the maximum revocable frequency set on drawing tools such as drawing boards, image editors and photo editors, and the numerical revocation frequency can be defined by the tools or the users. However, it is understood that when the maximum revocation number is in the range of [100,1000], the number of interval operations is not limited to be equal to the maximum revocation number, and the corresponding number of interval operations may be selected in [100,1000] according to specific application requirements.
It should be noted that the apparatus according to the embodiment of the present disclosure corresponds to the method according to the embodiment of the present disclosure, and therefore, the technical details described in the embodiment of the method are also applicable to the apparatus, and are not described herein again.
An embodiment of the present disclosure further provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform a method of undo an image editing operation in accordance with an embodiment of the present disclosure.
The disclosed embodiments also provide a computer readable storage medium, where the computer instructions are used to execute the method for undoing an image editing operation according to the disclosed embodiments.
FIG. 3 shows a schematic structural diagram of an electronic device 100 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3 for example, electronic device 100 may include a processing device (e.g., central processing unit, graphics processor, etc.) 101 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)102 or a program loaded from a storage device 108 into a Random Access Memory (RAM) 103. In the RAM 103, various programs and data necessary for the operation of the electronic apparatus 100 are also stored. The processing device 101, the ROM102, and the RAM 103 are connected to each other via a bus 104. An input/output (I/O) interface 105 is also connected to bus 104.
Generally, the following devices may be connected to the I/O interface 105: input devices 106 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 107 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 108 including, for example, magnetic tape, hard disk, etc.; and a communication device 109. The communication means 109 may allow the electronic device 100 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates the electronic device 100 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 109, or installed from the storage means 108, or installed from the ROM 102. The computer program, when executed by the processing device 101, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of 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 the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The method, the device, the electronic equipment and the medium for canceling the image editing operation of the unit do not limit the unit in some cases.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Claims (16)
1. A method for undoing an image editing operation, comprising:
acquiring image editing operation, and correspondingly storing an image every preset interval operation times;
receiving an operation cancelling instruction, and acquiring a first image closest to an editing operation to be cancelled and all image editing operations after the image editing operation corresponding to the first image and before the editing operation to be cancelled from the stored image;
and generating a target image based on the first image and all image editing operations after the image editing operation corresponding to the first image and before the operation to be cancelled.
2. The method of claim 1, further comprising:
acquiring a coordinate point set corresponding to each image editing operation except the image editing operation corresponding to the stored image;
and storing a coordinate point set corresponding to each image editing operation.
3. The method of claim 2, further comprising:
the obtaining of the coordinate point set corresponding to each image editing operation except the image editing operation corresponding to the saved image includes:
storing the initial coordinate point of each image editing operation;
and when the storage time of the coordinate point on the time distance of the image editing operation is equal to a preset time interval threshold value, storing the coordinate point corresponding to the time point into a coordinate point set corresponding to the image editing operation.
4. The method of claim 2, further comprising:
the obtaining of the coordinate point set corresponding to each image editing operation except the image editing operation corresponding to the saved image includes:
storing the initial coordinate end point of each image operation edition;
and when the distance between the coordinate point of the image editing operation and the coordinate of the last coordinate point is less than or equal to a preset distance interval threshold, storing the coordinate point to a coordinate point set corresponding to the image editing operation.
5. The method of claim 1, further comprising:
acquiring a first image closest to the editing operation to be undone from the stored images, wherein the first image comprises:
determining the image number N of the first image closest to the editing operation to be cancelled:
N=(m%n)*n
wherein,% represents the operation of solving the modulus, m is the number of the editing operation to be cancelled, and n is the interval times;
and acquiring the image corresponding to the image number.
6. The method of claim 2, further comprising:
generating a target image based on the first image and all image editing operations after the image editing operation corresponding to the first image and before the operation to be undone, including:
and drawing a coordinate point set corresponding to each image editing operation from the image editing operation corresponding to the first image to the operation to be cancelled on the first image by taking the first image as an initial image, and generating the target image.
7. The method of claim 1, further comprising:
the value range of the interval operation times is [100,1000], and when the maximum revocation times is in the range of [100,1000], the interval operation times is equal to the maximum revocation times.
8. An apparatus for undoing an image editing operation, comprising:
the first acquisition module is used for acquiring image editing operation and correspondingly storing an image every preset interval operation times;
the second acquisition module is used for receiving an operation cancellation instruction, and acquiring a first image closest to an editing operation to be cancelled and all image editing operations after the image editing operation corresponding to the first image and before the editing operation to be cancelled from the stored image;
and the image generation module is used for generating a target image based on the first image and all image editing operations after the image editing operation corresponding to the first image and before the operation to be cancelled.
9. The apparatus of claim 8,
the first obtaining module further comprises:
a coordinate point acquisition unit configured to acquire a set of coordinate points corresponding to each image editing operation other than the image editing operation corresponding to the saved image;
and the coordinate point storage unit is used for storing a coordinate point set corresponding to each image editing operation.
10. The apparatus of claim 9,
the coordinate point acquisition unit includes:
a first coordinate point obtaining subunit, configured to store an initial coordinate point of each image editing operation;
and the second coordinate point acquisition subunit is used for storing the coordinate point corresponding to the time point into the coordinate point set corresponding to the image operation editing operation when the storage time of the coordinate point at the time distance of the image editing operation is equal to a preset time interval threshold value.
11. The apparatus of claim 9,
the coordinate point acquisition unit includes:
a third coordinate point obtaining subunit, configured to store an initial coordinate endpoint of each image operation editing;
and the fourth coordinate point acquisition subunit is used for storing the coordinate point to the coordinate point set corresponding to the image operation editing operation when the coordinate distance between the coordinate point of the image editing operation and the last coordinate point is less than or equal to a preset distance interval threshold value.
12. The apparatus of claim 8,
the second acquisition module includes:
a first image acquisition unit for acquiring, from the stored images, a first image closest to an editing operation to be undone, the first image acquisition unit including:
a number determination subunit operable to determine an image number N of the first image closest to the editing operation to be undone:
N=(m%n)*n
wherein,% represents the operation of solving the modulus, m is the number of the editing operation to be cancelled, and n is the interval times;
and the first image acquisition subunit is used for acquiring the image corresponding to the image number.
13. The apparatus of claim 9,
the image generation module is specifically configured to: and drawing a coordinate point set corresponding to each image editing operation from the image editing operation corresponding to the first image to the operation to be cancelled on the first image by taking the first image as an initial image, and generating the target image.
14. The apparatus of claim 8,
the value range of the interval operation times is [100,1000], and when the maximum revocation times is in the range of [100,1000], the interval operation times is equal to the maximum revocation times.
15. An electronic device, comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the method of any of the preceding claims 1-7.
16. A computer-readable storage medium having stored thereon computer-executable instructions for performing the method of any of the preceding claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010751127.2A CN111857518A (en) | 2020-07-30 | 2020-07-30 | Method and device for canceling image editing operation, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010751127.2A CN111857518A (en) | 2020-07-30 | 2020-07-30 | Method and device for canceling image editing operation, electronic equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111857518A true CN111857518A (en) | 2020-10-30 |
Family
ID=72946247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010751127.2A Pending CN111857518A (en) | 2020-07-30 | 2020-07-30 | Method and device for canceling image editing operation, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111857518A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113763508A (en) * | 2021-08-27 | 2021-12-07 | 广州市城市规划勘测设计研究院 | Vector data processing method, device and medium based on virtual engine |
CN113947647A (en) * | 2021-09-08 | 2022-01-18 | 北京达佳互联信息技术有限公司 | Image processing method and device, electronic equipment and storage medium |
CN114879889A (en) * | 2022-05-07 | 2022-08-09 | 上海米哈游天命科技有限公司 | Processing method, device, revocation system, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104424162A (en) * | 2013-08-21 | 2015-03-18 | 鸿合科技有限公司 | Method and device for generating record of document used recently |
CN104571589A (en) * | 2014-12-31 | 2015-04-29 | 广东欧珀移动通信有限公司 | Input method based data processing method and device |
CN105100842A (en) * | 2015-06-17 | 2015-11-25 | 深圳市美贝壳科技有限公司 | Method for withdrawing picture editing |
US9471385B1 (en) * | 2012-08-16 | 2016-10-18 | Open Invention Network Llc | Resource overprovisioning in a virtual machine environment |
CN107329854A (en) * | 2017-06-20 | 2017-11-07 | 算丰科技(北京)有限公司 | Operation repealing method and device, electronic equipment |
CN108519846A (en) * | 2018-03-28 | 2018-09-11 | 维沃移动通信有限公司 | A kind of picture editting's processing method and terminal |
CN111045580A (en) * | 2018-10-15 | 2020-04-21 | 鸿合科技股份有限公司 | Handwriting processing method and device and electronic equipment |
-
2020
- 2020-07-30 CN CN202010751127.2A patent/CN111857518A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9471385B1 (en) * | 2012-08-16 | 2016-10-18 | Open Invention Network Llc | Resource overprovisioning in a virtual machine environment |
CN104424162A (en) * | 2013-08-21 | 2015-03-18 | 鸿合科技有限公司 | Method and device for generating record of document used recently |
CN104571589A (en) * | 2014-12-31 | 2015-04-29 | 广东欧珀移动通信有限公司 | Input method based data processing method and device |
CN105100842A (en) * | 2015-06-17 | 2015-11-25 | 深圳市美贝壳科技有限公司 | Method for withdrawing picture editing |
CN107329854A (en) * | 2017-06-20 | 2017-11-07 | 算丰科技(北京)有限公司 | Operation repealing method and device, electronic equipment |
CN108519846A (en) * | 2018-03-28 | 2018-09-11 | 维沃移动通信有限公司 | A kind of picture editting's processing method and terminal |
CN111045580A (en) * | 2018-10-15 | 2020-04-21 | 鸿合科技股份有限公司 | Handwriting processing method and device and electronic equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113763508A (en) * | 2021-08-27 | 2021-12-07 | 广州市城市规划勘测设计研究院 | Vector data processing method, device and medium based on virtual engine |
CN113947647A (en) * | 2021-09-08 | 2022-01-18 | 北京达佳互联信息技术有限公司 | Image processing method and device, electronic equipment and storage medium |
CN114879889A (en) * | 2022-05-07 | 2022-08-09 | 上海米哈游天命科技有限公司 | Processing method, device, revocation system, electronic equipment and storage medium |
CN114879889B (en) * | 2022-05-07 | 2024-03-29 | 上海米哈游天命科技有限公司 | Processing method, processing device, revocation system, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110389796A (en) | Edit operation processing method, device and electronic equipment | |
CN111857518A (en) | Method and device for canceling image editing operation, electronic equipment and medium | |
CN111367516B (en) | Application interface generation method and device and electronic equipment | |
CN111291244B (en) | House source information display method, device, terminal and storage medium | |
CN111459364B (en) | Icon updating method and device and electronic equipment | |
CN111258582B (en) | Window rendering method and device, computer equipment and storage medium | |
CN111338827B (en) | Method and device for pasting form data and electronic equipment | |
CN113220281A (en) | Information generation method and device, terminal equipment and storage medium | |
CN116522064A (en) | Method and device for determining frequent liveness of passenger, electronic equipment and storage medium | |
JP2024518594A (en) | Electronic table introduction method, device, equipment and medium | |
CN111290692B (en) | Picture display method and device, electronic equipment and computer readable medium | |
CN110619079B (en) | Method and device for pushing information | |
CN110209851B (en) | Model training method and device, electronic equipment and storage medium | |
CN110070479B (en) | Method and device for positioning image deformation dragging point | |
CN111343468A (en) | Message processing method and device and electronic equipment | |
CN111311665B (en) | Video processing method and device and electronic equipment | |
CN110807164A (en) | Automatic image area adjusting method and device, electronic equipment and computer readable storage medium | |
CN117520228B (en) | Command processing method, device, equipment and computer readable storage medium | |
CN115908143B (en) | Vehicle cross-layer parking method, device, electronic equipment and computer readable medium | |
CN112732269B (en) | Access method and device applied to physical address of AVS2 hardware encoder | |
CN111797932B (en) | Image classification method, apparatus, device and computer readable medium | |
CN110263797B (en) | Method, device and equipment for estimating key points of skeleton and readable storage medium | |
CN111381796B (en) | Processing method and device for realizing KTV function on client and user equipment | |
CN111294321B (en) | Information processing method and device | |
CN116880898A (en) | Document processing method and device, readable medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201030 |