CN112819924A - Picture editing method and device, electronic equipment and storage medium - Google Patents

Picture editing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112819924A
CN112819924A CN202110115004.4A CN202110115004A CN112819924A CN 112819924 A CN112819924 A CN 112819924A CN 202110115004 A CN202110115004 A CN 202110115004A CN 112819924 A CN112819924 A CN 112819924A
Authority
CN
China
Prior art keywords
editing
picture
trace
edited
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110115004.4A
Other languages
Chinese (zh)
Inventor
郭鹏程
张国朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Yuexuebang Network Technology Co ltd
Original Assignee
Wuhan Yuexuebang Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Yuexuebang Network Technology Co ltd filed Critical Wuhan Yuexuebang Network Technology Co ltd
Priority to CN202110115004.4A priority Critical patent/CN112819924A/en
Publication of CN112819924A publication Critical patent/CN112819924A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Abstract

The embodiment of the application provides a method and a device for editing pictures, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a picture to be edited; acquiring an editing trace input by an operation object on the picture to be edited; acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; and independently storing the editing file, recording the association relationship between the editing file and the picture to be edited, and realizing re-editing of the editing trace, thereby improving the experience of the user.

Description

Picture editing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the field of picture processing, in particular to a picture editing method and device, electronic equipment and a storage medium.
Background
In the related art, with the continuous development of online office, the demand of users for online annotation of work files is increasing. At present, many working documents are displayed in a picture form, and when an operation object annotates a displayed online processed picture document, the annotation trace of the picture document is directly solidified into a new picture for storage in the related art, so that when the operation object needs to edit the picture document again, the operation object can only edit the picture document in the inherent trace of the last modification, and the user experience is poor.
Therefore, how to improve the editing effect of the operation object in online office on the picture becomes an urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides a method and a device for editing pictures, electronic equipment and a storage medium, and some embodiments of the application can at least realize re-editing of editing traces, so that the user experience of online office work is improved.
In a first aspect, a method for editing a picture, the method comprising: acquiring a picture to be edited; acquiring an editing trace input by an operation object on the picture to be edited; acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; and independently storing the editing file, and recording the association relationship between the editing file and the picture to be edited.
Therefore, the editing file generated by the predefined format is independently stored, and the editing trace can be restored on the picture to be edited according to the association relation, so that the editing trace can be continuously edited, and the user experience of the user in online office is improved.
With reference to the first aspect, in an implementation manner, the picture to be edited is a picture with an editing trace obtained by synthesizing a history editing file and an original file; the method comprises the steps of obtaining an editing trace input by an operation object on a picture to be edited, wherein the editing trace comprises an updated editing trace obtained by re-editing a history editing trace by the operation object; the acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, including: and determining the target format of the updated editing trace according to the predefined format, recording the target format of the updated editing trace and the position of the updated editing trace, and generating the editing file.
Therefore, the embodiment of the application independently stores the editing file of the picture with the editing traces through the predefined format, and can restore all the previous editing traces on the picture to be edited according to the association relation, so that all the editing traces can be continuously edited, and the user experience of the user in online office is improved.
With reference to the first aspect, in an implementation manner, the acquiring a picture to be edited includes: searching the history editing file according to the incidence relation between the history editing file and the original file; and analyzing the historical editing file to obtain the positions and formats of all editing traces, and drawing the editing traces in the original file according to the positions and formats to obtain the picture to be edited.
Therefore, according to the embodiment of the application, all editing trace positions and formats are obtained by analyzing the historical editing file, the picture to be edited is obtained by drawing the historical editing file in the original file, all editing traces can be restored on the original file, and the editing traces can be continuously edited when the picture to be edited is opened again.
With reference to the first aspect, in an implementation manner, before the independently saving the editing file and recording an association relationship between the editing file and the picture to be edited, the method further includes: confirming the receipt of a saving instruction, wherein the saving instruction is triggered by the action of switching pictures or closing programs.
Therefore, the embodiment of the application can trigger the saving action by confirming that the saving instruction is received.
With reference to the first aspect, in one embodiment, the types of the editing trace include a line, a circle, a rectangle, an icon, and an annotation box; the predefined format includes: the size, angle, coordinate and color of the lines, circles, rectangles, icons and annotation boxes.
According to the embodiment of the application, the format of the editing trace can be defined in advance, different display forms of the editing trace can be accurately stored in the storage process, and therefore the editing trace can be accurately restored in the restoration process.
With reference to the first aspect, in an implementation manner, a Uniform Resource Locator (Uniform Resource Locator) is used to record an association relationship between the editing file and the picture to be edited by a URL address.
According to the embodiment of the application, the association relation is recorded through the URL address, so that the time for editing the file and the picture to be edited can be accurately connected, and the file can accurately correspond to the picture to be edited in the restoration process.
With reference to the first aspect, in an implementation manner, after the independently saving the editing file and recording an association relationship between the editing file and the picture to be edited, the method further includes: confirming that a restoring instruction is received, wherein the restoring instruction is triggered by an action of opening a picture; searching the editing file and the picture to be edited according to the incidence relation; analyzing the editing file to obtain the positions and formats of all the editing traces, and restoring the editing traces in the picture to be edited according to the positions and formats to obtain a restored picture.
In a second aspect, an apparatus for picture editing, the apparatus comprising: the picture to be edited acquisition module is configured to acquire a picture to be edited; the editing trace obtaining module is configured to obtain an editing trace input by an operation object on the picture to be edited; the editing file generating module is configured to acquire a target format of the editing trace according to a predefined format, record the target format and the position of the editing trace, and generate an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; and the storage module is configured to independently store the editing file and record the association relationship between the editing file and the picture to be edited.
With reference to the second aspect, in an implementation manner, the picture to be edited is a picture with an editing trace obtained by synthesizing a history editing file and an original file; the editing trace obtaining module is configured to obtain an updated editing trace of the operation object for reediting the historical editing trace; and the edit file generation module is configured to determine a target format of the updated edit trace according to the predefined format, record the target format of the updated edit trace and the position of the updated edit trace, and generate the edit file.
With reference to the second aspect, in an implementation manner, the to-be-edited picture obtaining module is configured to search the history editing file according to an association relationship between the history editing file and the original file; and analyzing the historical editing file to obtain the positions and formats of all editing traces, and drawing the editing traces in the original file according to the positions and formats to obtain the picture to be edited.
With reference to the second aspect, in an embodiment, the saving module is configured to confirm that a saving instruction is received, where the saving instruction is triggered by an action of switching pictures or closing a program.
With reference to the second aspect, in one embodiment, the types of the editing trace include a line, a circle, a rectangle, an icon, and an annotation box; the predefined format includes: the size, angle, coordinate and color of the lines, circles, rectangles, icons and annotation boxes.
With reference to the second aspect, in an embodiment, the association relationship between the editing file and the picture to be edited is recorded by a uniform resource locator URL address.
With reference to the second aspect, in an embodiment, the saving module is configured to confirm that a restore instruction is received, where the restore instruction is triggered by an action of opening a picture; searching the editing file and the picture to be edited according to the incidence relation; analyzing the editing file to obtain the positions and formats of all the editing traces, and restoring the editing traces in the picture to be edited according to the positions and formats to obtain a restored picture.
In a third aspect, an electronic device includes a processor, a memory, and a bus; the processor is connected to the memory via the bus, and the memory stores computer readable instructions for implementing the method according to any one of the first aspect and the first aspect embodiments when the computer readable instructions are executed by the processor.
In a fourth aspect, a computer-readable storage medium has stored thereon a computer program for implementing the method according to any one of the embodiments of the first aspect and the first aspect when the computer program is executed by a server.
Drawings
Fig. 1 is a flowchart of a method for editing a picture according to an embodiment of the present application;
fig. 2 is a flowchart of a method for saving pictures according to an embodiment of the present application;
fig. 3 is a flowchart of a method for restoring an image according to an embodiment of the present application;
fig. 4 is an internal structure of a picture editing apparatus according to an embodiment of the present application;
fig. 5 is an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
The method steps in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The embodiment of the application can be applied to various scenes of online picture editing, for example, the scenes comprise scenes that a teacher edits and annotates a student homework in the process of online amending the student homework, for example, the teacher needs to input an editing trace to a picture document displayed online. The problems of the picture and document editing method in the related art are exemplarily explained by taking the online teaching field as an example. Specifically, the demand of on-line instructors and students for homework correction is increasing, and related technologies may directly solidify the correction trace of the operation object (e.g., instructor) on the picture document displayed on the on-line education platform into a new picture, so that when the instructor and students open the picture editing again, only the editing trace may be added on the basis of the fixed editing trace, resulting in poor experience of the instructor and students in the homework correction.
At least to solve the above problem, some embodiments of the present application provide a method for independently saving an edit file and restoring the independently saved edit file to an original picture, so that a user can continue editing an edit trace. For example, some embodiments of the present application can implement re-editing of the editing trace by independently saving the editing trace according to a predefined format, thereby improving the experience of the user. It is to be understood that the application scenarios of the embodiments of the present application are not limited thereto.
In view of the foregoing problems, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for picture editing, where the method for picture editing includes: acquiring a picture to be edited; acquiring an editing trace input by an operation object on the picture to be edited; acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; and independently storing the editing file, recording the association relationship between the editing file and the picture to be edited, and realizing re-editing of the editing trace, thereby improving the experience of the user.
It should be noted that the method for editing pictures according to the embodiment of the present application may be applied to an electronic device with a display, for example, the electronic device includes: a mobile phone, a tablet computer or a notebook computer, etc.
The following will describe an embodiment of acquiring a picture to be edited, which is performed by an electronic device.
And S110, acquiring a picture to be edited.
In an embodiment of the present application, the picture to be edited obtained in S110 is a picture corresponding to an original file without any editing trace (for example, the picture is a file uploaded for the first time after a student completes a homework and without any editing or approval by a teacher).
In other embodiments of the present application, the picture to be edited in S110 is a picture with an editing trace. For example, the electronic device searches the history edit file according to the association relationship between the history edit file and the original file; and analyzing the historical editing file to obtain the positions and formats of all editing traces, and drawing the editing traces in the original file according to the positions and formats to obtain a picture to be edited so that the operation object can edit the picture to be edited.
It should be noted that the to-be-edited picture with the editing trace is a picture with the editing trace obtained by synthesizing a history editing file (for example, a first or non-first modification file of a picture corresponding to a job uploaded by a student by a teacher) and an original file, where the history editing file is a file formed by all editing traces before the current editing, and the original file is an original picture that has not been edited (for example, a picture uploaded by a student by taking a picture for the first time after the job is completed).
And S120, acquiring an editing trace input by the operation object on the picture to be edited.
In one implementation mode, the picture to be edited is a picture with editing traces, which is obtained by synthesizing a history editing file and an original file; s120 comprises the step of obtaining the updated editing trace of the operation object for re-editing the history editing trace.
When the picture to be edited is a picture with an editing trace, the electronic device obtains an updated editing trace for re-editing the history editing trace, for example, the history editing trace is a straight line drawn on the third line, and when the operation object obtains the picture to be edited, the straight line on the third line is extended for a certain distance, so that the electronic device obtains the distance for extending the drawing (i.e., the updated editing trace).
In one embodiment, when the picture to be edited is an original file without editing trace, S120 includes: and acquiring an editing trace input by the operation object to the original file, for example, when the operation object draws a circle on a picture to be edited, the electronic device acquires the circle.
The operation object may be a natural person such as a tutor or a student, or a robot or an artificial intelligent terminal that edits a picture to be edited, and the embodiment of the present application is not limited thereto.
An embodiment of S130 is exemplarily set forth below.
S130, acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file.
In one embodiment, S120 comprises obtaining an updated editing trace of the operation object re-editing the history editing trace; s130 includes: and determining the target format of the updated editing trace according to the predefined format, recording the target format of the updated editing trace and the position of the updated editing trace, and generating the editing file.
In one embodiment, when the picture to be edited is a picture with an editing trace, after the electronic device obtains the updated editing trace in S120, according to a predefined format, obtaining a target format of the updated editing trace (for example, obtaining the target format according to a type of the updated editing), so that a storage location of the updated editing trace is the same as a storage location of the historical editing trace, and storing an updated editing file composed of the target format of the updated editing trace and the location of the updated editing trace together with the historical editing trace file to form an editing file, so that when the picture to be edited is opened again, the historical editing trace and the updated editing trace are restored together in the original file, and the editing trace can be continuously edited by an operation object.
For example, the editing trace existing in the third row of the obtained picture to be edited is a short line (i.e. a history editing trace), the operation object draws a long line (i.e. an updating editing trace) next to the short line, the electronic device records the point where the long line passes (i.e. obtains the updating editing trace) in the process of editing the operation object, determines the target format corresponding to the long line according to the width and color format of the predefined line, records the target format of the long line and the position of the long line in the picture to be edited, stores the updating editing file formed by the target format of the long line and the position of the long line in the picture to be edited in the same position as the history editing file containing the short line in the database, and forms an editing file, which contains the updating editing file and the history editing file, so that when the picture to be edited is opened again, and the long lines and the short lines are restored in the original file together.
It should be noted that the type of the editing trace indicates which type the editing trace belongs to, for example, if the editing trace is a circle, then its type is a circle; the object format of the edit trace represents its properties, such as: the color of the circle, the location of the circle, etc.
In one embodiment, when the picture to be edited is a picture with an editing trace, after the electronic device obtains the updated editing trace in S120, S130 obtains a target format of the updated editing trace according to a predefined format, combines the target format of the updated editing trace and a position of the updated editing trace in the picture to be edited into an updated editing file, and stores the updated editing file separately from the historical editing file, so that when the picture to be edited is opened again, only the updated editing file is restored into the original file, and an operation object can obtain a latest editing result and regenerate a new editing trace to be edited based on the latest editing result.
For example, the editing trace existing in the third row of the obtained picture to be edited is a short line (i.e., a history editing trace), the operation object draws a long line (i.e., an update editing trace) next to the short line, the electronic device records the point where the long line passes (i.e., obtains the update editing trace) in the editing process of the operation object, determines the target format to which the long line belongs according to the width and color format of the predefined line, records the position of the long line in the picture to be edited, forms an update editing file with the target format of the long line and the position of the long line in the picture to be edited, and stores the update editing file in the database, so that when the picture to be edited is opened again, only the long line is restored to the original file.
In one embodiment, when the picture to be edited is an original file without editing traces, after the electronic device obtains the editing traces in S120, S130 includes: according to a predefined format, acquiring a target format of the editing trace, determining the position of the editing trace in the file to be edited, and forming the target format of the editing trace and the position of the editing trace in the file to be edited into an editing file, so that when the picture to be edited is opened again, the editing file is restored into an original file, and an operation object can continue to edit the editing trace.
For example, the types of editing traces include lines, circles, rectangles, icons, and comment boxes, and the predefined formats of the respective settings include: the size, angle, coordinate and color of the lines, circles, rectangles, icons and annotation boxes. Specifically, for example, the position (i.e., the coordinates in the original picture), the angle, the width, and the color corresponding to the line; the position, radius, line width and color corresponding to the circle; the position, the angle, the side length and the color corresponding to the rectangle, and the size, the position and the angle corresponding to the icon; the position, size and color corresponding to the annotation frame, and the size, color, font, angle and the like of the characters in the annotation frame.
As a specific embodiment, the editing trace may be any trace edited by the operation object on the picture to be edited, the editing trace may also be a mark trace such as a character stroke and a tick mark, and the corresponding predefined format includes a color, a thickness, and the like of the character stroke and the tick mark, which is not limited to this embodiment of the present application.
Therefore, the embodiment of the application independently stores the editing file of the picture with the editing traces through the predefined format, and can restore all the previous editing traces on the picture to be edited according to the association relation, so that all the editing traces can be continuously edited, and the user experience of the user in online office is improved. By predefining the format of the editing trace, different display forms of the editing trace can be accurately stored in the storing process, so that the editing trace can be accurately restored in the restoring process.
The embodiment of S130 is described above, and the embodiment of S140 is described below.
S140, independently storing the editing file, and recording the association relationship between the editing file and the picture to be edited.
In one embodiment, receipt of a save instruction is acknowledged, wherein the save instruction is triggered by an action of switching pictures or closing a program.
Before saving the edited file, the electronic device needs to confirm a saving instruction triggered by the operation object, the saving instruction is triggered when the operation object switches pictures or closes a program, and after the electronic device confirms that the saving instruction is received, the electronic device independently saves the edited file and records the association relationship between the edited file and the picture to be edited through the URL address.
Of course, the saving operation may also be initiated by the operation object clicking a saving button or triggering a saving gesture, and the like, which is not limited in any way.
The independent storage of the editing file is a method for distinguishing the existing editing trace from the picture to be edited, and the editing file and the picture to be edited are stored respectively and associated, so that the editing trace is independent from the picture to be edited in the process of restoring the editing trace, and thus, the editing trace can be continuously edited by an operation object.
The above describes an implementation of one picture editing method, and the following describes an implementation of another picture editing method.
In one embodiment, the receiving of a restore instruction is confirmed, wherein the restore instruction is triggered by an action of opening a picture; searching an editing file and a picture to be edited according to the association relation; analyzing the editing file to obtain the positions and formats of all the editing traces, and restoring the editing traces in the picture to be edited according to the positions and formats to obtain a restored picture.
After receiving the instruction of opening the picture of the operation object, the electronic equipment searches the picture to be edited and the editing file corresponding to the picture to be edited from the database according to the association relation, analyzes the format and the position of the editing trace in the editing file in the picture to be edited, and restores the editing trace in the picture to be edited according to the format and the position obtained by analyzing to obtain a restored picture, so that the operation object can continuously edit the editing trace on the restored picture.
The above describes a method for restoring an editing trace by an electronic device, and a specific embodiment of a picture editing method is described below.
As shown in fig. 2, fig. 2 shows a method for saving job picture editing as one of multiple scenarios of the present application, in which an operation object is a tutor, and an electronic device used by the tutor is a computer, and the specific embodiment is as follows:
after a computer of a tutor acquires a job picture to be corrected (namely, a picture to be edited), the tutor corrects the job on the job picture to be corrected in batches, the computer acquires correction marks (namely, editing marks, for example, the process of acquiring the correction marks comprises the steps of starting from the pressing of a mouse to the movement of the mouse until the lifting of the mouse is finished, and a graph formed in the process comprises all points through which the mouse passes, the computer needs to predefine the type, the line width, the color, the position and the rotation angle of the graph relative to the job picture to be corrected and other common attributes of the graph (namely predefine the format corresponding to various types of editing marks), and the computer records the collection and the attributes of the points through which the mouse passes in the process of correcting the tutor to generate an editing file. After the correction is completed, the instructor triggers an instruction to switch the picture 210 or close the program 211, in other words, the instructor triggers a timing to save the editing trace, which includes: switching a displayed picture to be edited (the operation approval tool is to be switched to the next display, and the current picture to be edited and an editing trace need to be stored) and an editing trace need to be stored before the program exits, wherein the computer executes an editing file generated by traversing all editing traces 220 (the obtained target format comprises the line width, the color, the position, the rotating angle, the editing trace sequence and the like of the editing trace) in the picture to be edited after confirming that a storage instruction is received, wherein traversing the editing trace means that one stroke is calculated in the process of starting to lift up the mouse when the mouse is pressed down during each editing, each stroke of the editing trace is recorded in a memory of the computer, and all recorded editing traces are taken out in the traversing process to obtain the editing file; and then, storing the editing file in the database 230, independently storing the editing file in the database, and establishing an association relation 240 between the picture to be edited and the editing file in the database, wherein the association is performed by using the URL of the picture to be edited in the database.
In another embodiment, when the computer obtains the editing trace approved by the tutor, the computer can use artificial intelligence to make a decision on the editing trace. For example: the teacher is instructed to correct the student's homework, and the first question picture is colluded, the second question fork, and the third question picture is colluded, so only preserve the editing trace of the fork, when reducing, also only reduce the editing trace of the fork, so that the student can clearly see the wrong question.
As shown in fig. 3, fig. 3 illustrates a method for restoring an editing trace of a job as one of the scenarios of the present application.
The instructor triggers an instruction (namely a reduction instruction) for opening a picture 310 on a computer under the condition that the teacher needs to modify the operation, the computer reopens the picture to be edited after confirming that the computer receives the reduction instruction, the computer searches an editing file 320 associated with the picture to be edited from a database at the moment, finds the editing file corresponding to the picture to be edited from the database according to the URL address of the picture to be edited, then restores the editing trace in the editing file to the picture to be edited 330, redraws the editing trace on the picture to be edited according to the data such as the type, the position, the line width, the color, the rotation angle and the like according to the sequence of the editing trace, restores and displays the editing trace on the picture to be edited to obtain the reduced picture, the editing trace on the reduced picture after the drawing is the editing trace before the storage, because the reduced picture is independently stored and restored according to the editing trace, so each stroke of the editing trace can continue the editing operation, such as: move, erase, extend, etc.
The method and the device have the advantages that the mode that the editing traces are separated from the to-be-edited pictures is adopted, the editing traces are independently abstracted and stored, the editing traces can be stored, restored, displayed and edited by different clients, when the editing traces are stored, original to-be-edited files are unchanged, the editing traces are independently stored and the incidence relation is established between the editing traces and the to-be-edited pictures, corresponding editing traces are found according to the incidence relation during restoration, the editing traces are restored to the to-be-edited pictures to be displayed (namely, the to-be-edited pictures are opened again), the editing traces can be re-edited, the experience of instructor teachers and students in the modification operation link is greatly improved, the modification quality and experience of online education operations are greatly improved, the improvement of teaching quality is promoted, and the user experience is improved.
The foregoing describes a specific embodiment of a method for picture editing, and the following describes an apparatus for picture editing.
As shown in fig. 4, an apparatus 400 for editing pictures includes: the system comprises a to-be-edited picture acquiring module 410, an editing trace acquiring module 420, an editing file generating module 430 and a saving module 440.
In one embodiment, an apparatus for picture editing, the apparatus comprising: the picture to be edited acquisition module is configured to acquire a picture to be edited; the editing trace obtaining module is configured to obtain an editing trace input by an operation object on the picture to be edited; the editing file generating module is configured to acquire a target format of the editing trace according to a predefined format, record the target format and the position of the editing trace, and generate an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; and the storage module is configured to independently store the editing file and record the association relationship between the editing file and the picture to be edited.
In one embodiment, the picture to be edited is a picture with an editing trace obtained by synthesizing a history editing file and an original file; the editing trace obtaining module is configured to obtain an updated editing trace of the operation object for reediting the historical editing trace; and the edit file generation module is configured to determine a target format of the updated edit trace according to the predefined format, record the target format of the updated edit trace and the position of the updated edit trace, and generate the edit file.
In an embodiment, the to-be-edited picture obtaining module is configured to search the history editing file according to an association relationship between the history editing file and the original file; and analyzing the historical editing file to obtain the positions and formats of all editing traces, and drawing the editing traces in the original file according to the positions and formats to obtain the picture to be edited.
In one embodiment, the saving module is configured to confirm receipt of a saving instruction, where the saving instruction is triggered by an action of switching pictures or closing a program.
In one embodiment, the types of the editing trace comprise a line, a circle, a rectangle, an icon and an annotation frame; the predefined format includes: the size, angle, coordinate and color of the lines, circles, rectangles, icons and annotation boxes.
In one embodiment, the association relationship between the editing file and the picture to be edited is recorded by a uniform resource locator URL address.
In one embodiment, the saving module is configured to confirm receipt of a restore instruction, wherein the restore instruction is triggered by an action of opening a picture; searching the editing file and the picture to be edited according to the incidence relation; analyzing the editing file to obtain the positions and formats of all the editing traces, and restoring the editing traces in the picture to be edited according to the positions and formats to obtain a restored picture.
In the embodiment of the present application, the module shown in fig. 4 can implement each process in the method embodiments of fig. 1, fig. 2, and fig. 3. The operations and/or functions of the respective modules in fig. 4 are respectively for implementing the corresponding flows in the method embodiments in fig. 1, 2 and 3. Reference may be made specifically to the description of the above method embodiments, and a detailed description is appropriately omitted herein to avoid redundancy.
As shown in fig. 5, an embodiment of the present application provides an electronic device 500, including: a processor 510, a memory 520 and a bus 530, the processor being connected to the memory via the bus, the memory storing computer readable instructions for implementing the method according to any one of the above embodiments when the computer readable instructions are executed by the processor, and in particular, refer to the description of the above method embodiments, and the detailed description is omitted here as appropriate to avoid redundancy.
Wherein the bus is used for realizing direct connection communication of the components. The processor in the embodiment of the present application may be an integrated circuit chip having signal processing capability. The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like. The memory stores computer readable instructions that, when executed by the processor, perform the methods described in the embodiments above.
It will be appreciated that the configuration shown in fig. 5 is merely illustrative and may include more or fewer components than shown in fig. 5 or have a different configuration than shown in fig. 5. The components shown in fig. 5 may be implemented in hardware, software, or a combination thereof.
Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a server, the method in any of the above-mentioned all embodiments is implemented, which may specifically refer to the description in the above-mentioned method embodiments, and in order to avoid repetition, detailed description is appropriately omitted here.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for picture editing, the method comprising:
acquiring a picture to be edited;
acquiring an editing trace input by an operation object on the picture to be edited;
acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace;
and independently storing the editing file, and recording the association relationship between the editing file and the picture to be edited.
2. The method according to claim 1, wherein the picture to be edited is a picture with editing traces obtained by synthesizing a history editing file and an original file;
the acquiring of the editing trace input by the operation object on the picture to be edited includes:
acquiring an updated editing trace of the operation object for reediting the historical editing trace;
the acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, including:
and determining the target format of the updated editing trace according to the predefined format, recording the target format of the updated editing trace and the position of the updated editing trace, and generating the editing file.
3. The method of claim 2,
the acquiring of the picture to be edited includes:
searching the history editing file according to the incidence relation between the history editing file and the original file;
and analyzing the historical editing file to obtain the positions and formats of all editing traces, and drawing the editing traces in the original file according to the positions and formats to obtain the picture to be edited.
4. The method according to claim 1 or 2, wherein before the independently saving the editing file and recording the association relationship between the editing file and the picture to be edited, the method further comprises:
confirming the receipt of a saving instruction, wherein the saving instruction is triggered by the action of switching pictures or closing programs.
5. The method according to claim 1 or 2, wherein the types of the editing trace include a line, a circle, a rectangle, an icon, and an annotation box;
the predefined format includes: the size, angle, coordinate and color of the lines, circles, rectangles, icons and annotation boxes.
6. The method according to claim 1 or 2, wherein the association relationship between the editing file and the picture to be edited is recorded by a Uniform Resource Locator (URL) address.
7. The method according to claim 1, wherein after the independently saving the editing file and recording the association relationship between the editing file and the picture to be edited, the method further comprises:
confirming that a restoring instruction is received, wherein the restoring instruction is triggered by an action of opening a picture;
searching the editing file and the picture to be edited according to the incidence relation;
analyzing the editing file to obtain the positions and formats of all the editing traces, and restoring the editing traces in the picture to be edited according to the positions and formats to obtain a restored picture.
8. An apparatus for picture editing, the apparatus comprising:
the picture to be edited acquisition module is configured to acquire a picture to be edited;
the editing trace obtaining module is configured to obtain an editing trace input by an operation object on the picture to be edited;
the editing file generating module is configured to acquire a target format of the editing trace according to a predefined format, record the target format and the position of the editing trace, and generate an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace;
and the storage module is configured to independently store the editing file and record the association relationship between the editing file and the picture to be edited.
9. An electronic device, comprising: a processor, a memory, and a bus;
the processor is connected to the memory via the bus, the memory storing computer readable instructions for implementing the method of any one of claims 1-7 when the computer readable instructions are executed by the processor.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a server, implements the method of any one of claims 1-7.
CN202110115004.4A 2021-01-27 2021-01-27 Picture editing method and device, electronic equipment and storage medium Pending CN112819924A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110115004.4A CN112819924A (en) 2021-01-27 2021-01-27 Picture editing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110115004.4A CN112819924A (en) 2021-01-27 2021-01-27 Picture editing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112819924A true CN112819924A (en) 2021-05-18

Family

ID=75860067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110115004.4A Pending CN112819924A (en) 2021-01-27 2021-01-27 Picture editing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112819924A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114390045A (en) * 2022-01-07 2022-04-22 北京思明启创科技有限公司 Interactive file transmission method and system
WO2023083169A1 (en) * 2021-11-10 2023-05-19 北京字节跳动网络技术有限公司 Display method and apparatus, electronic device and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020065853A1 (en) * 2000-08-09 2002-05-30 Sadao Takahashi Electronic document management for updating source file based upon edits on print-outs
CN1838111A (en) * 2006-02-14 2006-09-27 北京北大方正电子有限公司 Method for editing file and recording modification mark
CN101441644A (en) * 2007-11-19 2009-05-27 英福达科技股份有限公司 Web page annotation system and method
CN102136153A (en) * 2010-01-22 2011-07-27 腾讯科技(深圳)有限公司 Method and device for processing picture for instant communication tool
CN102541825A (en) * 2010-12-23 2012-07-04 北京大学 Method and device for recording trace information of electronic file
CN102609401A (en) * 2011-12-26 2012-07-25 北京大学 Webpage annotation method
CN103218765A (en) * 2013-03-21 2013-07-24 无锡曼荼罗软件有限公司 Method and system for retaining medical document modifying traces
CN105957542A (en) * 2016-04-25 2016-09-21 青岛海信移动通信技术股份有限公司 Audio file editing method and audio file editing device
CN106815185A (en) * 2017-03-10 2017-06-09 茂名市公安局 One kind investigates report automatic generation method and system on the spot
CN107831980A (en) * 2017-10-23 2018-03-23 广州视源电子科技股份有限公司 A kind of method, apparatus, electronic equipment and storage medium for closing annotation pattern
CN107870895A (en) * 2017-11-15 2018-04-03 苏州三星电子电脑有限公司 Mobile device document picture editing method and editing device
CN110263303A (en) * 2018-03-12 2019-09-20 北大方正集团有限公司 The retroactive method and device of text modification history
CN110597806A (en) * 2019-08-13 2019-12-20 上海建桥学院 Wrong question set generation and answer statistics system and method based on reading and amending identification
CN111263211A (en) * 2018-12-03 2020-06-09 深圳市炜博科技有限公司 Method for caching video data and terminal equipment
CN111382561A (en) * 2020-03-13 2020-07-07 北大方正集团有限公司 File verification method, device, equipment and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020065853A1 (en) * 2000-08-09 2002-05-30 Sadao Takahashi Electronic document management for updating source file based upon edits on print-outs
CN1838111A (en) * 2006-02-14 2006-09-27 北京北大方正电子有限公司 Method for editing file and recording modification mark
CN101441644A (en) * 2007-11-19 2009-05-27 英福达科技股份有限公司 Web page annotation system and method
CN102136153A (en) * 2010-01-22 2011-07-27 腾讯科技(深圳)有限公司 Method and device for processing picture for instant communication tool
CN102541825A (en) * 2010-12-23 2012-07-04 北京大学 Method and device for recording trace information of electronic file
CN102609401A (en) * 2011-12-26 2012-07-25 北京大学 Webpage annotation method
CN103218765A (en) * 2013-03-21 2013-07-24 无锡曼荼罗软件有限公司 Method and system for retaining medical document modifying traces
CN105957542A (en) * 2016-04-25 2016-09-21 青岛海信移动通信技术股份有限公司 Audio file editing method and audio file editing device
CN106815185A (en) * 2017-03-10 2017-06-09 茂名市公安局 One kind investigates report automatic generation method and system on the spot
CN107831980A (en) * 2017-10-23 2018-03-23 广州视源电子科技股份有限公司 A kind of method, apparatus, electronic equipment and storage medium for closing annotation pattern
CN107870895A (en) * 2017-11-15 2018-04-03 苏州三星电子电脑有限公司 Mobile device document picture editing method and editing device
CN110263303A (en) * 2018-03-12 2019-09-20 北大方正集团有限公司 The retroactive method and device of text modification history
CN111263211A (en) * 2018-12-03 2020-06-09 深圳市炜博科技有限公司 Method for caching video data and terminal equipment
CN110597806A (en) * 2019-08-13 2019-12-20 上海建桥学院 Wrong question set generation and answer statistics system and method based on reading and amending identification
CN111382561A (en) * 2020-03-13 2020-07-07 北大方正集团有限公司 File verification method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐国天;: "基于EXT3系统的文件内容操作痕迹提取软件设计", 《信息网络安全》, no. 12, 31 December 2014 (2014-12-31), pages 53 - 56 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023083169A1 (en) * 2021-11-10 2023-05-19 北京字节跳动网络技术有限公司 Display method and apparatus, electronic device and storage medium
CN114390045A (en) * 2022-01-07 2022-04-22 北京思明启创科技有限公司 Interactive file transmission method and system
CN114390045B (en) * 2022-01-07 2023-10-31 北京思明启创科技有限公司 Interactive file transmission method and system

Similar Documents

Publication Publication Date Title
US9977580B2 (en) Easy-to-use desktop screen recording application
CN112819924A (en) Picture editing method and device, electronic equipment and storage medium
CN110647624A (en) Automatic generation of an animation preview that presents document differences in enterprise messaging
CN110765995A (en) Answer sheet generation method, answer sheet identification device and storage medium
CN113254815B (en) Document processing method and device and page processing method and device
CN112083866A (en) Expression image generation method and device
CN111046644A (en) Answer sheet template generation method, identification method, device and storage medium
CN105653612A (en) Page rendering method and device
CN113807308A (en) Job correction method, device, equipment, storage medium and computer program product
CN113569541A (en) Message generation method, device, equipment and medium
CN115115740A (en) Thinking guide graph recognition method, device, equipment, medium and program product
CN111159975A (en) Display method and device
JP2006277001A (en) Input image displaying method, and input image displaying program
US20210073458A1 (en) Comic data display system, method, and program
CN115035032A (en) Neural network training method, related method, device, terminal and storage medium
CN115237293A (en) Picture editing method, device, equipment and storage medium
CN114816214A (en) Electronic text signing method and device, storage medium and electronic equipment
CN111582281B (en) Picture display optimization method and device, electronic equipment and storage medium
CN114444439A (en) Test question set file generation method and device, electronic equipment and storage medium
CN113934876A (en) Web-based job approval method, device and system
KR101935926B1 (en) Server and method for webtoon editing
CN114444450B (en) Volume file generation method and device, electronic equipment and storage medium
CN113065318B (en) Electronic point reading material manufacturing method and device, electronic equipment and storage medium
CN111241794B (en) Rectangular scene plan data processing method and device
CN111142748A (en) Unity 3D-based screenshot method and system

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