CN104899911A - Image editing method and apparatus - Google Patents

Image editing method and apparatus Download PDF

Info

Publication number
CN104899911A
CN104899911A CN201510312743.7A CN201510312743A CN104899911A CN 104899911 A CN104899911 A CN 104899911A CN 201510312743 A CN201510312743 A CN 201510312743A CN 104899911 A CN104899911 A CN 104899911A
Authority
CN
China
Prior art keywords
editor
image
described image
event
edit 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
CN201510312743.7A
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.)
Beijing Egression Epoch Information Technology Co Ltd
Original Assignee
Beijing Egression Epoch Information 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 Beijing Egression Epoch Information Technology Co Ltd filed Critical Beijing Egression Epoch Information Technology Co Ltd
Priority to CN201510312743.7A priority Critical patent/CN104899911A/en
Publication of CN104899911A publication Critical patent/CN104899911A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention, which relates to the image processing field, discloses an image editing method and apparatus. The method comprises: a to-be-edited image is selected; a detection interface for detecting an editing event of the image is established on the image; the editing event for starting editing of the image is detected at the detection interface; when the editing event for starting editing of the image is detected, starting position editing information for editing the image is obtained; an editing event for stopping editing the image is detected in the detection interface; and when the editing event for stopping editing the image is detected, stopping position editing information for editing the image is obtained; and on the basis of the starting position editing information and the stopping position editing information, the image is processed. According to the invention, translation, rotation and zooming of an image can be carried out in an integrated mode. The method and apparatus are suitable for images with different dimensions.

Description

A kind of image edit method and device
Technical field
The present invention relates to image processing field, particularly a kind of image edit method and device.
Background technology
Picture editting's class application program provides the function of checking with edited image to graphic artists.This type of application program comprises the Photoshop of Adobe, Flash Professional, the Unity etc. of Illustrator, Unity Tech.
Carrying out translation rotation convergent-divergent to image is function the most frequently used in picture editting's class application program.In order to realize these functions, this type of application program generally all can provide some auxiliary user interfaces to complete editing operation for helping user.
The secondary user interface provided generally all needs the Railway Project solved below:
1., for different functions provides different modes of operation, do not conflict mutually;
2. user in editing operation, can not be made to falsely drop other images;
3. can be applicable to the image of very large and very little different size;
4. after couple editor, the change (with the difference before editor) of image provides and shows clearly.
At present, 8 edit boxes are modal a solution, such as, 8 edit box solutions of Adobe FlashPro as shown in Figure 1, the picture itself in 8 edit boxes is translation hot-zone, and eight points are convergent-divergent hot-zones, rotate hot-zone outside eight points, its advantage is, under same interface, user just can complete the operation that translation rotates convergent-divergent.Another common solution is lock out operation solution, such as Unity, and the editor that translation rotates convergent-divergent carries out under different states, and its advantage is, the hot-zone of each operation is all larger, is not easy the situation occurring misoperation.
Information input frame is generally secondary user interface, for showing the information such as position, the anglec of rotation, convergent-divergent of current edit object for user, provides the most direct input editing function simultaneously.
There is following problem in the solution of above-mentioned 8 edit boxes:
1. because in-edit position along with dimension of picture change and change, so when picture very large or very little time editing operation can become very difficult.Such as, when picture is very little, eight points can be overlapping, easy maloperation; When picture is very large, eight points can be distant, and user often needs to operate across screen.
2. outer ledge at eight is generally put in the rotation process hot-zone of pair picture, hot-zone is smaller need mouse accurately locate after could operate, operate smooth and easy not, easy maloperation.
There is following problem in the solution of above-mentioned lock out operation:
1. different operations is carried out in different modes, cannot carry out dissimilar editing operation smoothly.
2. complicated operation, user learning cost is higher.
For providing a set of user interface tool picture being carried out to translation rotation convergent-divergent that can solve the integrated form of above-mentioned whole issue, the invention provides a kind of image edit method and device.
Summary of the invention
The object of the present invention is to provide a kind of image edit method and device, can solve the problem better.
According to an aspect of the present invention, provide a kind of image edit method, comprising:
Image to be edited is chosen;
On the image, foundation is used for detecting the detection interface about editor's event of described image;
In described detection interface, the editor's event starting the described image of editor is detected, and when the editor's event starting the described image of editor being detected, obtain the enable position edit file being used for editing described image;
To stopping editor's event of the described image of editor to detect in described detection interface, and when the editor's event stopping the described image of editor being detected, obtain the stop position edit file being used for editing described image;
Utilize described enable position edit file and stop position edit file, described image is processed.
Preferably, described detection interface comprises center translation detection zone, X-axis translation detection zone, Y-axis translation detection zone, convergent-divergent detection zone and rotates detection zone, and described foundation is used for detecting and comprises about the step at the detection interface of editor's event of described image:
After choosing image, obtain the center position coordinate of described image and the anglec of rotation of described image;
Utilize the center position coordinate of described image, the center position coordinate of described center translation detection zone is set, make the central point at the central point of described image and described detection interface at same position;
Centered by described center translation detection zone, arrange respectively be used for detected image in the X-axis translation detection zone of editor's event of X-axis translation, be used for detected image in the Y-axis translation detection zone of editor's event of Y-axis translation, be used for detected image convergent-divergent editor's event convergent-divergent detection zone and be used for the rotation detection zone of editor's event that detected image rotates.
Preferably, described when the editor's event stopping the described image of editor being detected, obtain and be used for the step of the stop position edit file of editing described image and also comprise:
When the editor's event stopping the described image of editor being detected, obtain the stopping editor position coordinates that described image is current, and using described stopping editor position coordinates as stop position edit file.
Preferably, described when the editor's event starting the described image of editor being detected, obtain and be used for the step of the enable position edit file of editing described image and comprise:
When any one detection zone in center translation detection zone, X-axis translation detection zone, Y-axis translation detection zone detects the editor's event starting the described image of editor, obtain the current image array of described image and start editor's position coordinates;
Utilize the anglec of rotation of described image, calculate the coordinate system matrix of the current coordinate system at described image place;
Preserve the enable position edit file comprising described image array, startup editor position coordinates, coordinate system matrix.
Preferably, describedly utilize described enable position edit file and stop position edit file, the step that described image processes comprised:
Utilize the startup editor position coordinates in described enable position edit file and described stopping editor position coordinates, calculate described image moves to stop position translation matrix from enable position;
Utilize the coordinate system matrix in described translation matrix, described enable position edit file and image array, calculate described image translation to image array during stop position.
Preferably, described when the editor's event starting the described image of editor being detected, obtain and be used for the step of the enable position edit file of editing described image and comprise:
When the editor's event starting the described image of editor being detected in convergent-divergent detection zone, obtain the current scale value of described image, center position coordinate and start editor's position coordinates;
Utilize described center position coordinate and start editor's position coordinates, computing center's point position and the initial distance started between editor position;
Preserve the enable position edit file comprising current scale value, initial distance.
Preferably, describedly utilize described enable position edit file and stop position edit file, the step that described image processes comprised:
Utilize the described center position coordinate stopped in editor's position coordinates and described enable position edit file, the current distance between computing center's point position and stopping editor position;
Utilize the initial Distance geometry scale value in described current distance, described enable position edit file, calculate the scale value of described image after convergent-divergent editor.
Preferably, described when the editor's event starting the described image of editor being detected, obtain and be used for the step of the enable position edit file of editing described image and comprise:
When rotating detection zone and the editor's event starting the described image of editor being detected, obtain the current anglec of rotation of described image, center position coordinate and start editor's position coordinates;
Preserve the enable position edit file comprising the anglec of rotation, center position coordinate and start editor's position coordinates.
Preferably, describedly utilize described enable position edit file and stop position edit file, the step that described image processes comprised:
Utilize the described editor's of stopping position coordinates, center position coordinate in described enable position edit file and start editor's position coordinates, calculating enable position and the stop position relative angle relative to center position;
Utilize the anglec of rotation in described relative angle, described enable position edit file, calculate described image and rotate the anglec of rotation to stop position from enable position.
According to an aspect of the present invention, provide a kind of image editing apparatus, comprising:
Choose module, for choosing image to be edited;
Interface creating module, on the image, sets up and is used for detecting the detection interface about editor's event of described image;
Starting editor module, for detecting the editor's event starting the described image of editor in described detection interface, and when the editor's event starting the described image of editor being detected, obtaining the enable position edit file being used for editing described image;
Stopping editor module, for detecting editor's event of the described image of stopping editor in described detection interface, and when the editor's event stopping the described image of editor being detected, obtaining the stop position edit file being used for editing described image;
Image processing module, for utilizing described enable position edit file and stop position edit file, processes described image.
Compared with prior art, beneficial effect of the present invention is:
1. integrated mode of operation provided by the invention makes user can complete when not switching operation modes to rotate zoom operations to the translation of image;
2. the invention solves the problem that the excessive or too small meeting of image has a strong impact on Consumer's Experience;
3. compare the solution of tradition 8 edit boxes, the present invention provide the user the rotation of larger hot-zone for application drawing picture, solves the problem of editor's little easy maloperation in hot-zone.
4. the present invention can carry out the unidirectional translation based on different coordinates to image easily.
Accompanying drawing explanation
Fig. 1 is 8 edit boxes that Flash Professional that prior art provides provides;
Fig. 2 is the image edit method theory diagram that the embodiment of the present invention provides;
Fig. 3 is the image editing apparatus block diagram that the embodiment of the present invention provides;
Fig. 4 is the user interface schematic diagram that the embodiment of the present invention provides;
Fig. 5 is each hot-zone scope schematic diagram that the embodiment of the present invention provides;
Fig. 6 is translation schemes process flow diagram under the non-selected state that provides of the embodiment of the present invention;
Fig. 7 is the process flow diagram being triggered translation under the state of choosing that provides of the embodiment of the present invention by center translation district;
Fig. 8 is the process flow diagram being triggered translation under the state of choosing that provides of the embodiment of the present invention by translation X-axis;
Fig. 9 is the process flow diagram being triggered translation under the state of choosing that provides of the embodiment of the present invention by translation Y-axis;
Figure 10 is the process flow diagram by the area triggering translation within image rectangular area beyond user interface under the state of choosing that provides of the embodiment of the present invention;
Figure 11 is the translation process flow diagram that the embodiment of the present invention provides;
Figure 12 is the convergent-divergent handle schematic diagram before the image scaling that provides of the embodiment of the present invention;
Figure 13 is the convergent-divergent handle schematic diagram after the image scaling that provides of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing to a preferred embodiment of the present invention will be described in detail, should be appreciated that following illustrated preferred embodiment is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Fig. 2 is the image edit method theory diagram that the embodiment of the present invention provides, and as shown in Figure 1, step comprises;
Step S101: image to be edited is chosen.
Step S102: on the image, sets up and is used for detecting the detection interface about editor's event of described image.
Described detection interface comprises center translation detection zone, X-axis translation detection zone, Y-axis translation detection zone, convergent-divergent detection zone and rotates detection zone, specifically, after choosing image, obtains the center position coordinate of described image and the anglec of rotation of described image; Utilize the center position coordinate of described image, the center position coordinate of described center translation detection zone is set, make the central point of the central point at described detection interface and described image at same position; The size at described detection interface is fixed, and direction is X-direction, and specifically different according to selected coordinate system difference, if select world coordinate system, X-direction is right direction, if select local coordinate, X-direction is the X-direction of selected image.Centered by described center translation detection zone, arrange respectively be used for detected image in the X-axis translation detection zone of editor's event of X-axis translation, be used for detected image in the Y-axis translation detection zone of editor's event of Y-axis translation, be used for detected image convergent-divergent editor's event convergent-divergent detection zone and be used for the rotation detection zone of editor's event that detected image rotates.
Step S103: in described detection interface, the editor's event starting the described image of editor is detected, and when the editor's event starting the described image of editor being detected, obtain the enable position edit file being used for editing described image.
When needs carry out translation process to image, at least there are following three kinds of processing modes, namely trigger translation in center translation detection zone, trigger the translation of X-direction in X-axis translation detection zone, trigger the translation of Y direction in Y-axis translation detection zone.Specifically, when any one detection zone in center translation detection zone, X-axis translation detection zone, Y-axis translation detection zone detects the editor's event starting the described image of editor, obtain the current image array of described image and start editor's position coordinates; Utilize the anglec of rotation of described image, calculate the coordinate system matrix of the current coordinate system at described image place; Preserve the enable position edit file comprising described image array, startup editor position coordinates, coordinate system matrix.
When needs carry out convergent-divergent process to image, namely when the editor's event starting the described image of editor being detected in convergent-divergent detection zone, obtain the current scale value of described image, center position coordinate and start editor's position coordinates; Utilize described center position coordinate and start editor's position coordinates, computing center's point position and the initial distance started between editor position; Preserve the enable position edit file comprising current scale value, initial distance.
When needs carry out rotation process to image, namely when when rotating detection zone and the editor's event starting the described image of editor being detected, obtain the current anglec of rotation of described image, center position coordinate and start editor's position coordinates; Preserve the enable position edit file comprising the anglec of rotation, center position coordinate and start editor's position coordinates.
Step S104: to stopping editor's event of the described image of editor to detect in described detection interface, and when the editor's event stopping the described image of editor being detected, obtain the stop position edit file being used for editing described image.
When the editor's event stopping the described image of editor being detected, obtain the stopping editor position coordinates that described image is current, and using described stopping editor position coordinates as stop position edit file.
Step S105: utilize described enable position edit file and stop position edit file, described image is processed.
To described image carry out process comprise to image carry out translation process, convergent-divergent process, rotate process, wherein:
Translation treatment step comprises: utilize the startup editor position coordinates in described enable position edit file and described stopping editor position coordinates, calculate described image moves to stop position translation matrix from enable position; Utilize the coordinate system matrix in described translation matrix, described enable position edit file and image array, calculate described image translation to image array during stop position.
Convergent-divergent treatment step comprises: utilize the described center position coordinate stopped in editor's position coordinates and described enable position edit file, the current distance between computing center's point position and stopping editor position; Utilize the initial Distance geometry scale value in described current distance, described enable position edit file, calculate the scale value of described image after convergent-divergent editor.
Spin step comprises: utilize the described editor's of stopping position coordinates, center position coordinate in described enable position edit file and start editor's position coordinates, calculates enable position and the stop position relative angle relative to center position; Utilize the anglec of rotation in described relative angle, described enable position edit file, calculate described image and rotate the anglec of rotation to stop position from enable position.
Fig. 3 is the image editing apparatus block diagram that the embodiment of the present invention provides, and as shown in Figure 3, comprising:
Choose module 10, for choosing image to be edited;
Interface creating module 20, for on the image, set up and be used for detecting the detection interface about editor's event of described image, further, detect interface to set up after choosing image, comprise center translation detection zone, X-axis translation detection zone, Y-axis translation detection zone, convergent-divergent detection zone and rotate detection zone.
Start editor module 30, for detecting the editor's event starting the described image of editor in described detection interface, and when the editor's event starting the described image of editor being detected, obtain the enable position edit file being used for editing described image, further, the editor's event starting the described image of editor comprising editor's event for starting displacement images, being used for starting editor's event of zoomed image and being used for starting editor's event of image rotating.
Stop editor module 40, for detecting editor's event of the described image of stopping editor in described detection interface, and when the editor's event stopping the described image of editor being detected, obtain the stop position edit file being used for editing described image, further, stop editor's event of the described image of editor to comprise for stopping editor's event of displacement images, be used for stopping editor's event and being used for of zoomed image to stop the rotation editor's event of image.
Image processing module 50, for utilizing described enable position edit file and stop position edit file, processes described image, further, described to image carry out process comprise to image carry out translation process, convergent-divergent process, rotate process.
Below by a specific embodiment, workflow of the present invention is described further:
1. precondition: select coordinate system.
Default situations uses world coordinate system, and user also can select local coordinate.In the user interface using the difference of different coordinate systems to be to provide, translation X-axis is different with the direction of translation Y-axis.Select the user operation mode of coordinate to be not emphasis of the present invention, the emphasis of invention is that the user interface of display can according to the translation X-axis of the coordinate system display different directions selected and translation Y-axis, facilitates the translation that user carries out without direction.
2. precondition: choose image.
Any editor completes based under the selected prerequisite of image, but selection operation itself is not emphasis of the present invention, in general clicks picture and just can complete and choose.
3. for choosing image display user interface (being equivalent to above-mentioned detection interface) under state.User interface comprises center translation district (i.e. middle circle part, be equivalent to above-mentioned center translation detection zone), translation X-axis (i.e. direction arrow to the right, be equivalent to above-mentioned X-axis translation detection zone), translation Y-axis (the arrow that namely direction is downward, be equivalent to above-mentioned Y-axis translation detection zone), convergent-divergent handle (be positioned at the upper left handle of circle, be equivalent to above-mentioned convergent-divergent detection zone).The center of user interface all the time with the center superposition being selected image, the size of user interface is fixed, and direction is different and different according to selected coordinate system, as shown in Figure 4.If selection world coordinate system, the direction of user interface is always X-axis and points to right side.If selection local coordinate, the direction of user interface is the X-direction that X-axis points to selected image.
Such as, user interface can generate as follows:
Step 1: in monitoring scene, picture chooses situation.
Step 2: when there being picture to choose, obtains center point coordinate (x, y) and the anglec of rotation r. of selected picture
Step 3: draw user interface
A) the drawing API that use system provides draws translation X-axis respectively, translation Y-axis and convergent-divergent handle;
B) angle of translation Y-axis is set to 90 degree.
C) angle of convergent-divergent handle is set to-135 degree, length is set to image zooming ratio and is multiplied by 20
D) the empty circles part at center is drawn
Step 4: be set to (x, y) by the coordinate of user interface, angle is set to r.
4. cancel and choosing.
In order to get along well, other editing operation clashes, and cancels choosing being completed by right mouse button single-click operation.Cancel with the realization Anywhere in right mouse button single-click operation scene interface and choosing (scene outward such as panel button is then invalid).Each hot-zone scope as shown in Figure 5, drags left button to drag triggering translation in the inside, rectangular area of image, and in the rectangular area of image, outside left button pulls to trigger and rotates, and triggers to cancel select at the inner right-click of Zone Full.
5. translation under non-selected state.
In the rectangular area of image, press left button with mouse, the rolling mouse (being later called for short left button to pull) when not lifting left button, image enters the state of choosing, and starts to follow mouse translation simultaneously.
As shown in Figure 6, step comprises idiographic flow:
Step 1: monitor the event that left mouse button is pressed in the rectangular area of image.
Step 2: when left mouse button is pressed, records current object, and current mouse position is initial mouse position (namely starting editor position), starts to monitor mouse moving event simultaneously.
Step 3: the initial mouse position comparing mouse current location (position that mouse moves to) and record when mouse moves, judges whether the distance between two positions is greater than preset distance, such as 10 pixels, if it is performs step 4.
Step 4: when the distance of two positions is more than 10 pixel, the existing object of record is set to selected object, and starts translation flow process.
6. choose translation under state, have four kinds of modes:
First kind of way: in the center translation district of the user interface provided, use left mouse button to pull, image starts to follow mouse translation, and as shown in Figure 7, step comprises idiographic flow:
Step 1: the event pressed the center translation district of user interface monitoring left mouse button.
Step 2: when left mouse button is pressed, starts translation flow process
The second way: in the translation X-axis of the user interface provided, use left mouse button to pull, image starts to follow mouse translation on the direction that X-axis is pointed to, and as shown in Figure 8, step comprises idiographic flow:
Step 1: monitor the event that left mouse button is pressed in the translation X-axis of user interface.
Step 2: when left mouse button is pressed, the translation of mark X-axis, starts translation flow process.
The third mode: in the translation Y-axis of the user interface provided, use left mouse button to pull, image starts to follow mouse translation on the direction that Y-axis is pointed to, and as shown in Figure 9, step comprises idiographic flow:
Step 1: monitor the event that left mouse button is pressed in the translation Y-axis of user interface.
Step 2: when left mouse button is pressed, the translation of mark Y-axis, starts translation flow process.
4th kind of mode: the region beyond the user interface provided within image rectangular area, use left mouse button to pull, image starts to follow mouse translation.It should be noted that then this mode can not be triggered if image rectangular area is less than interface region.
As shown in Figure 10, step comprises idiographic flow:
Step 1: monitor the event that left mouse button is pressed in the rectangular area of image.
Step 2: when left mouse button is pressed, the translation of mark X-axis, starts translation flow process.
As shown in figure 11, step comprises translation flow process:
Step 1: recording-related information.
Step a: record object image current matrix is M, record current mouse coordinate points (namely starting editor's position coordinates) is (x, y).
Step b: the anglec of rotation θ calculating current coordinate system, if changing coordinates is world coordinate system, θ=0; If changing coordinates is local coordinate, the anglec of rotation of θ=target image.
Step c: the coordinate system Matrix C M calculating current coordinate system.
CM = cos θ sin θ 0 sin θ cos θ 0 0 0 1
Step 2: whether monitoring mouse moves or left button lifts, if listen to mouse moving event, then performs step 3, if listen to left mouse button to lift event, stop monitoring mouse moving event and left mouse button to lift event, translation flow process terminates.
Step 3: when mouse moves, record current mouse coordinate is (x ', y ').
Step 4: calculate the matrix M that target image is new ' and arrange, method is as follows:
1) translation matrix TM is calculated.
TM = 1 0 x ′ - x 0 1 y ′ - y 0 0 1
2) the translation matrix CTM chosen under coordinate system is calculated.
CTM=CM*TM
3) if the translation of mark X-axis, arranging y component is 0, i.e. CTM.ty=0; If the translation of mark Y-axis, arranging x component is 0, i.e. CTM.tx=0.
4) coordinate system Matrix C M transposition is obtained CM -1.
5) translation matrix is revised
TM=CM -1*CTM
6) M ' is calculated
M’=TM*M;
7. rotate under choosing state.
Outside image rectangular area; Beyond the user interface provided; Region in operation scenario interface, uses left mouse button to pull, and image starts to follow mouse and rotates.
Step 1: monitor the event that left mouse button is pressed in editing area background.Because background is below user interface and image, so only have when mouse is beyond image rectangular area and user interface, just can trigger event.
Step 2: when left mouse button is pressed, record object image present rotation angel degree is θ, record object image center CP (cx, cy), and record current mouse coordinate points (namely starting editor's position coordinates) is P (x, y).
Step 3: monitor mouse moving event, monitors mouse-up event.
Step 4: when mouse moves, record current mouse coordinate is P ' (x ', y ').
Step 5: the angle d θ calculating the relative CP line of P with P '.
Step 6: the anglec of rotation θ ' that Offered target image is new=θ+d θ.
Step 7: when mouse-up, stop monitoring mouse moving event and mouse-up event, rotation process flow process terminates.
8. choose convergent-divergent under state.
On the convergent-divergent handle of the user interface provided, use left mouse button to pull, image starts to follow mouse and carries out uniform zoom.
Step 1: monitor the event that left mouse button is pressed on the convergent-divergent handle of user interface.
Step 2: when left mouse button is pressed, record object image current zoom value S, record object image center CP (cx, cy), record current mouse coordinate points (namely starting editor's position coordinates) is P (x, y), calculates P and CP distance between two points D.
Step 3: when mouse moves, record current mouse coordinate is P ' (x ', y '), calculates P ' and CP distance between two points D '.
Step 4: the scale value S ' that Offered target image is new=S*D '/D.
Before and after convergent-divergent, except handle, the size of other user interfaces is all constant.And the length of handle can change along with image zooming ratio, pantograph ratio is larger, and handle is longer, as shown in Figures 12 and 13.
9. information input frame assisted user input translation, rotates, the absolute value of convergent-divergent.
The user interface of information input frame and mode of operation are not emphasis of the present invention, just exist as supplementing of function of the present invention.
In above-mentioned flow process, when user's left mouse button first time presses, the present invention can detect the editor's event starting the described image of editor, and records relevant information when picture editting starts, i.e. enable position edit file; When user's left mouse button second time is pressed, the present invention can detect the editor's event stopping the described image of editor, and records relevant information when picture editting stops, i.e. stop position edit file.
As a kind of embodiment, the present invention can be used in DragonBones Animation Editors, DragonBones Animation Editors is the multipad of a Based PC, supports cartoon making, time shaft editor etc.In DragonBones Animation Editors, the machine picture can import in editing machine by user, and can choose any picture and carry out the editor of translation convergent-divergent rotation.Technically, the present invention can use in any desktop picture process software.
Although above to invention has been detailed description, the present invention is not limited thereto, those skilled in the art of the present technique can carry out various amendment according to principle of the present invention.Therefore, all amendments done according to the principle of the invention, all should be understood to fall into protection scope of the present invention.

Claims (10)

1. an image edit method, is characterized in that, comprising:
Image to be edited is chosen;
On the image, foundation is used for detecting the detection interface about editor's event of described image;
In described detection interface, the editor's event starting the described image of editor is detected, and when the editor's event starting the described image of editor being detected, obtain the enable position edit file being used for editing described image;
To stopping editor's event of the described image of editor to detect in described detection interface, and when the editor's event stopping the described image of editor being detected, obtain the stop position edit file being used for editing described image;
Utilize described enable position edit file and stop position edit file, described image is processed.
2. method according to claim 1, it is characterized in that, described detection interface comprises center translation detection zone, X-axis translation detection zone, Y-axis translation detection zone, convergent-divergent detection zone and rotates detection zone, and described foundation is used for detecting and comprises about the step at the detection interface of editor's event of described image:
After choosing image, obtain the center position coordinate of described image and the anglec of rotation of described image;
Utilize the center position coordinate of described image, the center position coordinate of described center translation detection zone is set, make the central point at the central point of described image and described detection interface at same position;
Centered by described center translation detection zone, arrange respectively be used for detected image in the X-axis translation detection zone of editor's event of X-axis translation, be used for detected image in the Y-axis translation detection zone of editor's event of Y-axis translation, be used for detected image convergent-divergent editor's event convergent-divergent detection zone and be used for the rotation detection zone of editor's event that detected image rotates.
3. method according to claim 2, is characterized in that, described when the editor's event stopping the described image of editor being detected, obtains to be used for the step of the stop position edit file of editing described image and also to comprise:
When the editor's event stopping the described image of editor being detected, obtain the stopping editor position coordinates that described image is current, and using described stopping editor position coordinates as stop position edit file.
4. method according to claim 3, is characterized in that, described when the editor's event starting the described image of editor being detected, obtains to be used for the step of the enable position edit file of editing described image and to comprise:
When any one detection zone in center translation detection zone, X-axis translation detection zone, Y-axis translation detection zone detects the editor's event starting the described image of editor, obtain the current image array of described image and start editor's position coordinates;
Utilize the anglec of rotation of described image, calculate the coordinate system matrix of the current coordinate system at described image place;
Preserve the enable position edit file comprising described image array, startup editor position coordinates, coordinate system matrix.
5. method according to claim 4, is characterized in that, describedly utilizes described enable position edit file and stop position edit file, comprises the step that described image processes:
Utilize the startup editor position coordinates in described enable position edit file and described stopping editor position coordinates, calculate described image moves to stop position translation matrix from enable position;
Utilize the coordinate system matrix in described translation matrix, described enable position edit file and image array, calculate described image translation to image array during stop position.
6. method according to claim 3, is characterized in that, described when the editor's event starting the described image of editor being detected, obtains to be used for the step of the enable position edit file of editing described image and to comprise:
When the editor's event starting the described image of editor being detected in convergent-divergent detection zone, obtain the current scale value of described image, center position coordinate and start editor's position coordinates;
Utilize described center position coordinate and start editor's position coordinates, computing center's point position and the initial distance started between editor position;
Preserve the enable position edit file comprising current scale value, initial distance.
7. method according to claim 6, is characterized in that, describedly utilizes described enable position edit file and stop position edit file, comprises the step that described image processes:
Utilize the described center position coordinate stopped in editor's position coordinates and described enable position edit file, the current distance between computing center's point position and stopping editor position;
Utilize the initial Distance geometry scale value in described current distance, described enable position edit file, calculate the scale value of described image after convergent-divergent editor.
8. method according to claim 3, is characterized in that, described when the editor's event starting the described image of editor being detected, obtains to be used for the step of the enable position edit file of editing described image and to comprise:
When rotating detection zone and the editor's event starting the described image of editor being detected, obtain the current anglec of rotation of described image, center position coordinate and start editor's position coordinates;
Preserve the enable position edit file comprising the anglec of rotation, center position coordinate and start editor's position coordinates.
9. method according to claim 8, is characterized in that, describedly utilizes described enable position edit file and stop position edit file, comprises the step that described image processes:
Utilize the described editor's of stopping position coordinates, center position coordinate in described enable position edit file and start editor's position coordinates, calculating enable position and the stop position relative angle relative to center position;
Utilize the anglec of rotation in described relative angle, described enable position edit file, calculate described image and rotate the anglec of rotation to stop position from enable position.
10. an image editing apparatus, is characterized in that, comprising:
Choose module, for choosing image to be edited;
Interface creating module, on the image, sets up and is used for detecting the detection interface about editor's event of described image;
Starting editor module, for detecting the editor's event starting the described image of editor in described detection interface, and when the editor's event starting the described image of editor being detected, obtaining the enable position edit file being used for editing described image;
Stopping editor module, for detecting editor's event of the described image of stopping editor in described detection interface, and when the editor's event stopping the described image of editor being detected, obtaining the stop position edit file being used for editing described image;
Image processing module, for utilizing described enable position edit file and stop position edit file, processes described image.
CN201510312743.7A 2015-06-09 2015-06-09 Image editing method and apparatus Pending CN104899911A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510312743.7A CN104899911A (en) 2015-06-09 2015-06-09 Image editing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510312743.7A CN104899911A (en) 2015-06-09 2015-06-09 Image editing method and apparatus

Publications (1)

Publication Number Publication Date
CN104899911A true CN104899911A (en) 2015-09-09

Family

ID=54032554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510312743.7A Pending CN104899911A (en) 2015-06-09 2015-06-09 Image editing method and apparatus

Country Status (1)

Country Link
CN (1) CN104899911A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105894554A (en) * 2016-04-11 2016-08-24 腾讯科技(深圳)有限公司 Image processing method and image processing device
CN110764764A (en) * 2019-09-16 2020-02-07 平安科技(深圳)有限公司 Webpage-side image fixing and stretching method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0554766A1 (en) * 1992-02-05 1993-08-11 BASF Aktiengesellschaft Process for reducing the nitrogen oxide content in exhaust gases by the controlled addition of NH3
US20030123698A1 (en) * 2001-12-10 2003-07-03 Canon Kabushiki Kaisha Image processing apparatus and method
CN102521849A (en) * 2010-10-14 2012-06-27 微软公司 Region-based image manipulation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0554766A1 (en) * 1992-02-05 1993-08-11 BASF Aktiengesellschaft Process for reducing the nitrogen oxide content in exhaust gases by the controlled addition of NH3
US20030123698A1 (en) * 2001-12-10 2003-07-03 Canon Kabushiki Kaisha Image processing apparatus and method
CN102521849A (en) * 2010-10-14 2012-06-27 微软公司 Region-based image manipulation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WAN6418200111: "《https://wenku.baidu.com/view/37f82220af45b307e8719794.html》", 7 January 2011 *
XIAANMING: "《http://blog.csdn.net/xiaanming/article/details/42833893》", 19 January 2015 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105894554A (en) * 2016-04-11 2016-08-24 腾讯科技(深圳)有限公司 Image processing method and image processing device
CN105894554B (en) * 2016-04-11 2019-07-05 腾讯科技(深圳)有限公司 Image processing method and device
CN110764764A (en) * 2019-09-16 2020-02-07 平安科技(深圳)有限公司 Webpage-side image fixing and stretching method and device, computer equipment and storage medium
CN110764764B (en) * 2019-09-16 2024-03-01 平安科技(深圳)有限公司 Webpage end image fixed stretching method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US9524040B2 (en) Image editing apparatus and method for selecting area of interest
US10061496B2 (en) Snapping of object features via dragging
CN102779008B (en) A kind of screenshot method and system
US8982070B2 (en) Portable information terminal
US10969949B2 (en) Information display device, information display method and information display program
JP6240619B2 (en) Method and apparatus for adjusting the size of an object displayed on a screen
US11003340B2 (en) Display device
JP2005122696A (en) Interactive display system and interactive display method
DE112012007203T5 (en) Information display device, display information operation method
CN103150009A (en) Information processing apparatus, information processing method, and program
TWI485600B (en) Pattern swapping method and multi-touch device thereof
CN104731494A (en) Method and device for magnifying selected area in preview interface
JP2008134918A (en) Image processor and image processing determination method
US20190361603A1 (en) Control method of touch display apparatus
WO2015003544A1 (en) Method and device for refocusing multiple depth intervals, and electronic device
CN102063698A (en) Method and device for obliquely aligning objects in graph and picture treatment
CN104899911A (en) Image editing method and apparatus
CN103927089A (en) Method and device for controlling interactive user interface objects
CN106406681A (en) Electronic device
US9146653B2 (en) Method and apparatus for editing layout of objects
CN105242920A (en) Image capture system, image capture method and electronic device
CN106528130B (en) A kind of Edit button adaptation method and device
US20160028961A1 (en) Visual Media Capture Device For Visual Thinking
JP5731561B2 (en) Input device and image processing method thereof
JP6526851B2 (en) Graphic processing apparatus and graphic processing program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150909