CN111540030A - Image editing method, image editing device, electronic equipment and computer readable storage medium - Google Patents

Image editing method, image editing device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111540030A
CN111540030A CN202010331212.3A CN202010331212A CN111540030A CN 111540030 A CN111540030 A CN 111540030A CN 202010331212 A CN202010331212 A CN 202010331212A CN 111540030 A CN111540030 A CN 111540030A
Authority
CN
China
Prior art keywords
image editing
image
sliding
adjusting
size
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
CN202010331212.3A
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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010331212.3A priority Critical patent/CN111540030A/en
Publication of CN111540030A publication Critical patent/CN111540030A/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
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to an image editing method, an image editing device, an electronic device and a computer readable storage medium. The method comprises the following steps: displaying an image editing interface, wherein the image editing interface comprises an image to be processed and an editing element added to the image to be processed; acquiring and displaying input numbers, and acquiring a first sliding track triggered on an image editing interface; and adjusting the numerical value of the input number according to the first sliding track, and adjusting the size of the editing element according to the adjusted number. The triggered sliding track can be visually displayed through the numerical value of the displayed number, the size of the editing element can be accurately adjusted to a proper size according to the displayed number, and the accuracy of size adjustment of the adding element during image editing is improved.

Description

Image editing method, image editing device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image editing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of image processing technology, the phenomenon of adding elements such as characters, stickers, mosaics, doodles and the like in images through image editing software is more and more common. At present, in order to make the added elements meet the required size, the size of the added elements can be adjusted by a two-finger dragging manner.
However, in the conventional image editing method, the two-finger dragging often cannot perform precise size adjustment on the added elements, and the problem of low accuracy exists.
Disclosure of Invention
The embodiment of the application provides an image editing method and device, electronic equipment and a computer readable storage medium, which can improve the accuracy of image editing.
An image editing method comprising:
displaying an image editing interface, wherein the image editing interface comprises an image to be processed and an editing element added to the image to be processed;
acquiring and displaying input numbers, and acquiring a first sliding track triggered on the image editing interface;
and adjusting the numerical value of the input number according to the first sliding track, and adjusting the size of the editing element according to the adjusted number.
An image editing apparatus comprising:
the display module is used for displaying an image editing interface, and the image editing interface comprises an image to be processed and editing elements added to the image to be processed;
the operation acquisition module is used for acquiring and displaying the input number and acquiring a first sliding track triggered on the image editing interface;
and the adjusting module is used for adjusting the numerical value of the input number according to the first sliding track and adjusting the size of the editing element according to the adjusted number.
An electronic device comprising a memory and a processor, the memory having a computer program stored thereon, wherein the computer program, when executed by the processor, causes the processor to perform the steps of:
displaying an image editing interface, wherein the image editing interface comprises an image to be processed and an editing element added to the image to be processed;
acquiring and displaying input numbers, and acquiring a first sliding track triggered on the image editing interface;
and adjusting the numerical value of the input number according to the first sliding track, and adjusting the size of the editing element according to the adjusted number.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
displaying an image editing interface, wherein the image editing interface comprises an image to be processed and an editing element added to the image to be processed;
acquiring and displaying input numbers, and acquiring a first sliding track triggered on the image editing interface;
and adjusting the numerical value of the input number according to the first sliding track, and adjusting the size of the editing element according to the adjusted number.
The image editing method, the image editing device, the electronic equipment and the computer equipment readable storage medium can display the image to be processed and the editing elements added to the image to be processed, acquire and display the input number, acquire the first sliding track triggered on the image editing interface, adjust the numerical value of the input number according to the first sliding track, and adjust the size of the editing elements according to the adjusted number. The triggered sliding track can be visually displayed through the numerical value of the displayed number, the size of the editing element can be accurately adjusted to a proper size according to the displayed number, and the accuracy of size adjustment of the adding element during image editing is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram showing an internal structure of an electronic apparatus according to an embodiment;
FIG. 2 is a flow diagram of a method for image editing in one embodiment;
FIG. 3 is a flowchart of an image editing method in another embodiment;
FIG. 4 is a flowchart of an image editing method in yet another embodiment;
FIG. 5 is a diagram illustrating changes to an image editing interface in one embodiment;
FIG. 6 is a block diagram showing the configuration of an image editing apparatus according to an embodiment;
fig. 7 is a block diagram showing a configuration of an image editing apparatus according to another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that the terms "first," "second," and the like, as used herein, may be used herein to describe various elements and parameters, but these elements and parameters are not limited by these terms. These terms are only used to distinguish one element from another element, or to distinguish one parameter from another. For example, the first slide trajectory may be referred to as a second slide trajectory, and similarly, the second slide trajectory may be referred to as a first slide trajectory, without departing from the scope of the present application. Both the first sliding trajectory and the second sliding trajectory are sliding trajectories, but they are not the same sliding trajectory.
Fig. 1 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 1, the electronic device includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor for implementing an image editing method provided in the following embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The electronic device may be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a Point of Sales (POS), a vehicle-mounted computer, and a wearable device.
FIG. 2 is a flow diagram of a method for image editing in one embodiment. The image editing method in this embodiment is described by taking the electronic device in fig. 1 as an example. As shown in fig. 2, the image editing method includes steps 202 to 206.
Step 202, displaying an image editing interface, wherein the image editing interface comprises an image to be processed and an editing element added to the image to be processed.
The image to be processed can be an image acquired by the electronic equipment through a camera; the images may be obtained by network download, screen capture, or the like. The editing elements refer to elements selected in the image editing interface and added to the image. The editing elements may include, but are not limited to, at least one of text, stickers, graffiti, mosaics, and the like.
The electronic equipment displays an image editing interface comprising an image to be processed and editing elements, and particularly can acquire editing operation on a selected image to be processed, display the image to be processed and an editing tool provided by the image editing interface on the image editing interface according to the editing operation, so as to acquire a selection instruction of the editing elements provided by the editing tool, and add and display corresponding editing elements above the image to be processed on the image editing interface according to the selection instruction. Optionally, the electronic device may also obtain an image editing operation for generating an image to be processed on the image display interface, generate a start instruction of the image editor according to the image editing operation and the selected image editing program, and open the corresponding image editing program according to the start instruction, so as to display the image editing interface including the image to be processed.
And step 204, acquiring and displaying the input number, and acquiring a first sliding track triggered on the image editing interface.
The entered number refers to a number received by the electronic device that was entered by the user. The input number may be displayed on the image editing interface, specifically, may be displayed above the image to be processed, or may be displayed in another position of the image editing interface outside the display area of the image to be processed. Optionally, when the electronic device acquires the input number, the input number may be displayed according to a cursor position or a touch position in the input.
The entered number is used to evoke a modification of the dimensions of the editing element. After the electronic equipment acquires the input number, the operation of the image editing interface is monitored, and whether the size of the editing element is adjusted or not is determined according to the monitoring result. Specifically, when the electronic device acquires a sliding operation triggered on an image editing interface, performing subsequent size adjustment operation of an editing element based on a first sliding track corresponding to the sliding operation; optionally, when the operation triggered by the electronic device in the image editing interface is not a sliding operation, it may be determined that the size of the editing element does not need to be adjusted, and further, the input number may be eliminated from the image editing interface, that is, the input text is not displayed.
The sliding operation may include a long-press sliding operation and a single-click sliding operation. In some embodiments, the swipe operation may be a long press swipe operation triggered for an entered number or edit element.
And step 206, adjusting the numerical value of the input number according to the first sliding track, and adjusting the size of the editing element according to the adjusted number.
The electronic equipment adjusts the input number according to the first sliding track, and the adjusted number is the value of the input number. For example, if the input number is 8, the electronic device may adjust the input number 8 to 5, 7, 9, 10, 11, and the like according to the first sliding trajectory. And adjusting the editing element according to the adjusted number, wherein the adjustment is the size of the editing element. For example, if the size of the edit element on the image is 200 × 200 pixels, the size of the edit element may be 100 × 100, 150 × 150, 250 × 250, 300 × 300, or the like according to the adjusted number. It will be appreciated that the value of the adjusted number is generally positively correlated with the size of the editing element, i.e. the larger the value of the number, the larger the size of the editing element.
The electronic equipment can adjust the numerical value of the input number in real time according to the first sliding track and adjust the size of the editing element according to the adjusted number. Specifically, the electronic device may preset a correspondence between the sliding length and the adjustment value and a correspondence between the adjustment value and the adjustment size, acquire a corresponding adjustment value according to the sliding length of the first sliding track, adjust the value of the input number according to the corresponding adjustment value, acquire an adjusted number, acquire a corresponding adjustment size according to a difference between the adjusted number and the input number, and adjust the size of the editing element according to the corresponding size. For example, the electronic device may have adjustment values of 1, 2, and 3 corresponding to sliding lengths of 2mm, 4mm, and 6mm, respectively; the adjustment sizes corresponding to the adjustment values of 1, 2 and 3 are respectively 5 pixels, 10 pixels and 15 pixels; the electronic device may adjust the input number to 14 and the size of the editing element to 110 × 110 pixels when the input number is 12, the size of the editing element is 100 × 100 pixels, and the sliding length of the first sliding track is 4 mm.
In some embodiments, the size of the edit element can be expressed in different ways. The electronic device may obtain a correspondence between the adjustment value and the adjustment size according to the type of the editing element. For example, for an edit element of type text, the resizing may be the font size of the text; for editing elements of type graffiti, the resizing can be the width of the graffiti pen corresponding to the graffiti, and so on.
In some embodiments, there are editing elements with fixed width or height, and the electronic device may obtain, according to the adjustment category of the editing element, a corresponding adjustable size direction, and adjust the size of the editing element in the direction. The directions of the resizable sizes of the editing elements belonging to the same adjustment category are the same.
The method and the device for displaying the image editing element can display the image editing interface comprising the image to be processed and the editing element added to the image to be processed, acquire and display the input number, acquire the first sliding track triggered on the image editing interface, adjust the numerical value of the input number according to the first sliding track, and adjust the size of the editing element according to the adjusted number. The triggered sliding track can be visually displayed through the numerical value of the displayed number, the size of the editing element can be accurately adjusted to a proper size according to the displayed number, and the accuracy of size adjustment of the adding element during image editing is improved.
In one embodiment, an image editing method is provided, in which a value of an input number is adjusted according to a first sliding trajectory, including: acquiring a preset unit sliding length and a corresponding unit adjusting numerical value; and increasing the unit sliding length at each sliding length of the first sliding track, and adjusting the numerical value of the input number according to the unit adjusting numerical value.
The unit slide length refers to a numerical adjustment of a number in units of the length. The corresponding unit adjustment value represents the adjustment width of the value corresponding to the unit sliding length. Specifically, when the unit adjustment values are the same, the smaller the unit sliding length is, the higher the sensitivity of the value adjustment is; conversely, the greater the unit sliding length, the lower the sensitivity of numerical adjustment. The electronic device may set a preset unit sliding length and a corresponding unit adjustment value according to information such as a length and a width of a display screen of the electronic device, an adjustable range of a size of an editing element, and a practical application requirement, which is not limited herein. For example, the unit sliding length is 1mm, and the corresponding unit adjustment value is 1; the unit sliding length is 3mm, and the corresponding unit adjustment value is 1; the unit sliding length is 3mm, and the corresponding unit adjustment value is 2.
And the electronic equipment adjusts the numerical value of the input number according to the unit adjustment numerical value when the unit sliding length is increased by the sliding length of the first sliding track each time. For example, when the input number is 15, the unit slide length is 2mm, and for that, the unit adjustment value is 1; increasing the input number 15 by 1 every 2mm on the first sliding track; if the first sliding track is 4mm, the input number is adjusted to be 17; when the first sliding track is 6mm, the input number is adjusted to be 18; when the first sliding trajectory is 8mm, the input number is adjusted to 19, and the like. Furthermore, after the electronic device adjusts the numerical value of the input number each time, the electronic device adjusts the size of the editing element according to the adjusted number.
The method comprises the steps of obtaining a preset unit sliding length and a corresponding unit adjusting numerical value, increasing the unit sliding length at each sliding length of a first sliding track, adjusting the numerical value of an input number according to the unit adjusting numerical value, adjusting the size of an editing element according to the number adjusted each time, feeding back the length change of the sliding track in real time, adjusting the size of the editing element in real time, stopping sliding when the editing element is adjusted to be in a proper size, and improving simplicity and accuracy of editing.
In one embodiment, an image editing method is provided in which a value of an input number is adjusted by a unit adjustment value, including: acquiring a corresponding unit adjustment size according to the type of the editing element; and when the numerical value of the input number is adjusted by the unit adjusting numerical value, adjusting the size of the editing element according to the unit adjusting size.
The electronic device can preset unit adjustment sizes corresponding to different types of editing elements. For example, for an edit element of type text, the unit resizing may be the text font size; for editing elements with types of doodling, the unit adjustment size can be the pixel width of a doodling pen corresponding to the doodling, and the like; for edit elements of type sticker, the unit resize may be an image pixel, or a length value.
And when the electronic equipment adjusts the numerical value of the input number according to the unit adjustment numerical value each time, adjusting the size of the editing element according to the unit adjustment size corresponding to the type of the editing element. It will be appreciated that after each adjustment to the input number, the adjusted number is used as the input number for the next numerical adjustment.
The preset unit sliding length and the corresponding unit adjusting numerical value are obtained, the unit sliding length is increased according to the sliding length of the first sliding track each time, the numerical value of the input number is adjusted according to the unit adjusting numerical value, and meanwhile, the size of the editing element is adjusted according to the unit adjusting size, so that the adjusting requirements of different types of editing elements can be met.
In one embodiment, there is provided an image editing method in which a value of an input number is adjusted by a unit adjustment value, including: when the direction of the first sliding track is the first direction, increasing the numerical value of the number according to the unit adjustment numerical value; when the direction of the first sliding track is a second direction, the numerical value is reduced according to the unit adjustment numerical value; wherein the first direction is opposite to the second direction.
The first direction is opposite to the second direction. For example, the first direction may be a direction pointing towards the top of the electronic device; the second direction may be a direction pointing towards the top of the electronic device; alternatively, the first direction may be a direction pointing to the left side of the electronic device, and the second direction may be a direction pointing to the right side of the electronic device, which is not limited herein.
The direction of the first sliding track refers to the direction of the first sliding track which increases the unit sliding length at this time, that is, the position before increasing the unit sliding length is taken as a starting point, and points to the position after increasing the unit sliding scene. The electronic equipment determines the direction of the first sliding track, specifically, the electronic equipment may preset a first angle range of the first direction relative to the designated direction and a second angle range of the second direction relative to the designated direction, so as to obtain an angle value between the direction of the first sliding track increasing the unit sliding length and the designated direction, and when the angle value is in the first angle range, the direction of the first sliding track is determined to be the first direction; when the angle value is in the second angle range, a second direction of the second sliding trajectory is determined. Wherein the same angle value does not exist in the first and second angle ranges.
When the direction of the first sliding track is the first direction, the electronic equipment increases the numerical value according to the unit adjustment numerical value, and when the direction of the first sliding track is the second direction, the electronic equipment decreases the numerical value according to the unit adjustment numerical value. For example, if the input number is 8, the unit sliding track is 3mm, and the unit adjustment value is 1; when the direction of the first sliding track increased by 3mm for the first time is the first direction, the input number is adjusted to 9; when the direction in which the first sliding track increases by 3mm for the second time is the first direction, the input number is adjusted to 10, and when the direction in which the first sliding track increases by 3mm for the third time is the second direction, the input number is adjusted to 9.
Optionally, in some embodiments, when the angle value is not in the first angle range and not in the second angle range, the electronic device may determine that the sliding trajectory is invalid, and then not adjust the value of the input number.
When the direction of the first sliding track is determined to be the first direction, the numerical value of the number is increased by adjusting the numerical value according to the unit, and then the size of the editing element can be increased according to the increased number; when the direction of the first sliding track is determined to be the second direction, the numerical value is adjusted according to the unit to reduce the numerical value, and then the size of the editing element is reduced according to the reduced numerical value, namely the numerical value of the number can be increased or reduced through sliding in different directions, so that the size of the editing element is increased or reduced, and the size of the editing element is convenient to adjust.
In one embodiment, an image editing method is provided for acquiring and displaying input numbers, comprising: acquiring the number input by a numeric keyboard and displaying the input number; or acquiring a second sliding track triggered on the image editing interface, and generating and displaying the input number according to the shape of the second sliding track.
Specifically, after the editing elements are added to the image to be processed, the electronic device receives an evoking instruction of the numeric keyboard, displays the numeric keyboard on the image editing interface according to the evoking instruction, acquires the numbers input in the numeric keyboard, and displays the input numbers on the image editing interface.
The electronic device may also add the editing element to the image to be processed, acquire a second sliding track triggered on the image editing interface, and generate and display the input number according to the shape of the second sliding track. The electronic device may determine the number corresponding to the shape of the second sliding track in a shape matching manner. For example, when the shape of the second sliding trajectory is a vertical line, it may be determined that the input number is 1; when the shape of the second sliding trajectory is the shape of the alaba number 8, it is determined that the input number is 8.
The input numbers are generated and displayed according to the shape of the second sliding track, various different number input modes can be provided, the input numbers are generated according to the sliding track triggered by the image editing interface, the operation is convenient, and the convenience of image editing can be improved.
FIG. 3 is a flow diagram of a method for image editing in one embodiment. As shown in fig. 3, in an embodiment, in the provided image editing method, the editing element is a text, and the image editing method may include:
step 302, displaying an image editing interface, wherein the image editing interface comprises an image to be processed and characters added to the image to be processed.
The characters added to the image to be processed may be characters input by the user and acquired by the electronic device, or characters selected by the user and acquired by the electronic device from a character template provided by the electronic device. The text added to the image to be processed is displayed above the image to be processed.
Optionally, the electronic device may display the input text according to the position of the cursor when the text is input; or the selected characters are displayed according to the preset position, the dragging operation of the characters can be acquired, and the characters are displayed at the position when the dragging operation is released. For example, the selected character may be displayed at the center position of the image to be processed, or the like.
And step 304, acquiring and displaying the input number, and acquiring a first sliding track triggered on the image editing interface.
The input numbers can be numbers input through a numeric keyboard, or the numbers can be numbers generated by the electronic equipment according to the shape of a second sliding track triggered by the image editing interface.
In some embodiments, the electronic device may further obtain a text added to the image to be processed, and generate the input number according to a preset font size of the text.
The preset font size refers to a default font size of characters which are preset by the electronic equipment and are added to the image to be processed. The electronic equipment adds the selected or input characters to the image to be processed, and the added characters can be displayed on the image editing interface according to the preset font sizes. In this embodiment, the electronic device may generate the entered number according to a preset font size.
Specifically, if the preset font size is represented by an arabic number, the electronic device may use the preset font size as the input number; if the preset font size is expressed in a Chinese font size manner, the electronic device may convert the preset font size into a corresponding arabic numeral in pounds, and use the converted numeral as the input numeral. For example, when the preset font size is four, the input number is 14; when the preset word size is small four, the input number is 12. Optionally, the electronic device may also preset a corresponding relationship between a font size and a number, so that a number matching the preset font size is used as an input number.
And step 306, adjusting the numerical value of the input number according to the first sliding track, and adjusting the font size of the character according to the adjusted number.
The electronic equipment adjusts the numerical value of the input number according to the first sliding track and adjusts the font size of the character according to the adjusted number. For example, when the first sliding track slides to the first direction, the numerical value of the input number and the word size of the character can be increased synchronously; and when the first sliding track slides to the second direction, the numerical value of the input number and the character size of the character are reduced synchronously.
Specifically, the electronic device may be preset with a unit sliding length and a corresponding unit adjustment value, and a corresponding unit adjustment font size. And when the unit sliding length is increased in the first sliding track each time, adjusting the numerical value of the input number according to the unit adjusting numerical value, and adjusting the character size of the character according to the unit adjusting character size. Alternatively, the unit sliding length is 3mm, the unit adjustment value is 1, and the unit adjustment font size is 1 font size unit; if the preset font size of the character is 16, the electronic equipment can display the number 16 on the image editing interface; and when the first sliding track is increased by 3mm each time, increasing the numerical value of the displayed number by 1, and simultaneously increasing the character size of the character by 1.
The method comprises the steps of obtaining and displaying input numbers by displaying an image editing interface comprising an image to be processed and characters added to the image to be processed, obtaining a first sliding track triggered on the image editing interface, adjusting numerical values of the input numbers according to the first sliding track, and adjusting character sizes of the characters according to the adjusted numbers. The change of the sliding track can be directly fed back through the displayed numbers, so that the word size of the words can be accurately adjusted to a proper size according to the displayed numbers, and the accuracy of image editing and word size adjustment is improved. Moreover, the input numbers are generated according to the preset word sizes of the characters, the word sizes of the characters can be directly and conveniently adjusted without manually inputting the numbers by a user, and convenience in word size adjustment during image editing can be improved.
FIG. 4 is a flow diagram of a method for image editing in one embodiment. As shown in fig. 4, in one embodiment, an image editing method is provided that includes:
step 402, displaying an image editing interface, wherein the image editing interface comprises an image to be processed and an editing element added to the image to be processed.
Step 404, the input number is acquired and displayed.
Step 406, starting timing from the end of the last trigger operation, and judging whether the sliding operation on the image editing interface is received within a preset time length; if yes, go to step 408, otherwise go to step 412.
The preset time duration can be set according to the actual application requirement, and is not limited herein. For example, the preset time period may be 1.5s, 2s, 2.5s, 3s, or the like. It is generally considered that if the sliding operation is not received after the timing exceeds the preset time period, it indicates that the user does not need to adjust the size of the editing element. Alternatively, in some embodiments, the electronic device may determine the preset time period according to an interval time period between the sliding operations of the user for continuous size adjustment by counting and analyzing the interval time period.
The trigger operation includes all operations triggered at the image editing interface. The electronic equipment starts timing from the end of the last trigger operation, namely, the electronic equipment starts timing when the user triggers the operation of the image editing interface to end and the finger or other parts leave the image editing interface; if the sliding operation of the image editing interface is received within the preset time length, a first sliding track corresponding to the sliding operation is obtained. Optionally, in some embodiments, the electronic device receives a trigger operation on the image editing interface within a preset time length, determines that the trigger operation is a sliding operation if a trajectory of the trigger operation exceeds a unit sliding length, and acquires a first sliding trajectory corresponding to the sliding operation.
And step 408, acquiring a first sliding track corresponding to the sliding operation.
Step 410, adjusting the numerical value of the input number according to the first sliding track, and adjusting the size of the editing element according to the adjusted number; and returns to step 406.
The electronic equipment continuously obtains a first sliding track corresponding to the sliding operation, adjusts the numerical value of the input number according to the first sliding track, and adjusts the size of the editing element according to the adjusted number until the sliding operation is finished; and restarting timing to further judge whether the sliding operation of the image editing interface is received within the preset time length.
In step 412, the numbers displayed on the image editing interface are cleared.
When the sliding operation of the image editing interface is not received within the preset time length, clearing the number displayed by the image editing interface; the exposed digital clear is used to end the resizing of the editing element. Further, the electronic device saves the size of the editing element in the current image editing interface.
The input numbers are displayed on the image editing interface, timing is started from the end of the last triggering operation, when the sliding operation of the image editing interface is received within the preset time length, the input numbers are adjusted according to the first sliding track corresponding to the sliding operation, the size of the editing elements is adjusted according to the adjusted numbers, if the sliding operation of the image editing interface is not received within the preset time length, the numbers displayed on the image editing interface are cleared, and the size of the editing elements can be adjusted conveniently during image editing.
In one embodiment, there is provided an image editing method including the steps of:
first, the electronic device displays an image editing interface including an image to be processed and an editing element added to the image to be processed.
And then, the electronic equipment acquires and displays the input number and acquires a first sliding track triggered on the image editing interface.
Optionally, the electronic device acquires the number input on the numeric keyboard and displays the input number; or acquiring a second sliding track triggered on the image editing interface, and generating and displaying the input number according to the shape of the second sliding track.
Optionally, when the editing element includes a text, the electronic device may acquire the text added to the image to be processed; and generating input numbers according to the preset word size of the characters.
And then, the electronic equipment adjusts the numerical value of the input number according to the first sliding track and adjusts the size of the editing element according to the adjusted number.
Optionally, the electronic device obtains a preset unit sliding length and a corresponding unit adjustment value; and increasing the unit sliding length at each sliding length of the first sliding track, and adjusting the numerical value of the input number according to the unit adjusting numerical value.
Optionally, the electronic device obtains a corresponding unit adjustment size according to the type of the editing element; each time the numerical value of the input number is adjusted according to the unit adjustment numerical value, the size of the editing element is adjusted according to the unit adjustment size.
Optionally, when the direction of the first sliding track is the first direction, the electronic device adjusts the numerical value by a unit and increases the numerical value by a number; when the direction of the first sliding track is a second direction, the electronic equipment adjusts the numerical value according to the unit to reduce the numerical value of the number; wherein the first direction is opposite to the second direction.
Optionally, the editing element comprises text; and the electronic equipment adjusts the font size of the characters according to the adjusted numbers.
Optionally, the electronic device starts timing from the end of the last trigger operation, and determines whether a sliding operation on the image editing interface is received within a preset time length; when sliding operation on an image editing interface is received within a preset time length, a first sliding track corresponding to the sliding operation is obtained; and executing the operation of adjusting the numerical value of the input number according to the first sliding track and adjusting the size of the editing element according to the adjusted number. Further, when the sliding operation on the image editing interface is not received within the preset time length, the electronic equipment clears the number displayed by the image editing interface.
FIG. 5 is an interface diagram of an image editing interface, under an embodiment. To illustrate by taking the example of increasing the font size by sliding upward and decreasing the font size by sliding downward, as shown in fig. 5, the picture (1) is an image editing interface in which the sliding operation is not acquired, the image editing interface shows the image to be processed 502, the text 504 added to the image to be processed, and the input number 506 is 36. The first sliding track received by the electronic device slides from the first position 511 to the second position 512, and then slides from the second position 512 to the position 513. The picture (2) is a schematic diagram of an image editing interface when the electronic equipment receives sliding operation, and the word size of the input numbers and characters is not adjusted at the moment; the picture (3) is a schematic diagram of the image editing interface when the first sliding track slides to the second position 512, and at this time, the electronic equipment increases the numerical value of the input number and the character size of the character according to the direction of the first sliding track, namely upwards; the picture (4) is a schematic diagram of the image editing interface when the first sliding track slides to the third position 513, and at this time, the electronic device reduces the numerical value of the input number and the font size of the character according to the direction of the first sliding track, that is, downward. The picture (5) is a schematic diagram of the image editing interface with the displayed characters eliminated, and the word size of the last character 504 in the adjustment is reserved in the image to be processed 502.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Fig. 6 is a block diagram showing the configuration of an image editing apparatus according to an embodiment. As shown in fig. 6, the embodiment of the image editing apparatus includes a display module 602, an operation obtaining module 604, and an adjusting module 606. Wherein the content of the first and second substances,
the display module 602 is configured to display an image editing interface, where the image editing interface includes an image to be processed and an editing element added to the image to be processed.
The operation obtaining module 604 is configured to obtain and display the input number, and obtain a first sliding track triggered on the image editing interface.
The adjusting module 606 is configured to adjust a numerical value of the input number according to the first sliding track, and adjust a size of the editing element according to the adjusted number.
The image editing device provided by the embodiment of the application can be used for displaying an image editing interface comprising an image to be processed and an editing element added to the image to be processed, acquiring and displaying an input number, acquiring a first sliding track triggered on the image editing interface, adjusting the numerical value of the input number according to the first sliding track, and adjusting the size of the editing element according to the adjusted number. The triggered sliding track can be visually displayed through the numerical value of the displayed number, the size of the editing element can be accurately adjusted to a proper size according to the displayed number, and the accuracy of size adjustment of the adding element during image editing is improved.
In one embodiment, the adjusting module 606 may be further configured to obtain a preset unit sliding length and a corresponding unit adjusting value; and increasing the unit sliding length at each sliding length of the first sliding track, and adjusting the numerical value of the input number according to the unit adjusting numerical value.
In one embodiment, the adjusting module 606 may be further configured to increase the numerical value by a unit adjusting numerical value when the direction of the first sliding track is the first direction; when the direction of the first sliding track is a second direction, the numerical value is reduced according to the unit adjustment numerical value; wherein the first direction is opposite to the second direction.
In one embodiment, the adjusting module 606 may be further configured to obtain a corresponding unit adjustment size according to the type of the editing element; each time the numerical value of the input number is adjusted according to the unit adjustment numerical value, the size of the editing element is adjusted according to the unit adjustment size.
As shown in fig. 7, in one embodiment, the image editing apparatus provided further includes a number input module 608, and the number input module 608 is configured to acquire the number input on the number keyboard and display the input number.
In one embodiment, the number input module 608 may be further configured to obtain a second sliding track triggered on the image editing interface, and generate and display the input number according to a shape of the second sliding track.
In one embodiment, when the editing element includes a text, the adjusting module 606 may be further configured to adjust the font size of the text according to the adjusted number.
In one embodiment, the text input module 608 may also be used to obtain text added to the image to be processed; and generating input numbers according to the preset word size of the characters.
In an embodiment, the operation obtaining module 604 may be further configured to start timing from the end of the last trigger operation, and determine whether a sliding operation on the image editing interface is received within a preset time period; when the sliding operation of the image editing interface is received within a preset time length, a first sliding track corresponding to the sliding operation is obtained.
In one embodiment, the provided image editing module may further include a text elimination module 610; the text removal module 610 is configured to remove the number displayed on the image editing interface when the sliding operation on the image editing interface is not received within the preset duration.
The division of the modules in the image editing apparatus is merely for illustration, and in other embodiments, the image editing apparatus may be divided into different modules as needed to complete all or part of the functions of the image editing apparatus.
For specific definition of the image editing apparatus, reference may be made to the above definition of the image editing method, which is not described herein again. The modules in the image editing apparatus may be wholly or partially implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
The implementation of each module in the image editing apparatus provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. Program modules constituted by such computer programs may be stored on the memory of the electronic device. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the image editing method.
A computer program product comprising instructions which, when run on a computer, cause the computer to perform an image editing method.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. An image editing method, comprising:
displaying an image editing interface, wherein the image editing interface comprises an image to be processed and an editing element added to the image to be processed;
acquiring and displaying input numbers, and acquiring a first sliding track triggered on the image editing interface;
and adjusting the numerical value of the input number according to the first sliding track, and adjusting the size of the editing element according to the adjusted number.
2. The method of claim 1, wherein the adjusting the value of the input number according to the first sliding trajectory comprises:
acquiring a preset unit sliding length and a corresponding unit adjusting numerical value; and increasing the unit sliding length every time the sliding length of the first sliding track is increased, and adjusting the numerical value of the input number according to the unit adjusting numerical value.
3. The method of claim 2, wherein the adjusting the value of the input number by the unit adjustment value comprises:
obtaining a corresponding unit adjustment size according to the type of the editing element;
and adjusting the size of the editing element according to the unit adjustment size each time the numerical value of the input number is adjusted according to the unit adjustment numerical value.
4. The method of claim 2, wherein the adjusting the value of the input number by the unit adjustment value comprises:
when the direction of the first sliding track is a first direction, increasing the numerical value of the number according to the unit adjustment numerical value;
when the direction of the first sliding track is a second direction, reducing the numerical value of the number according to the unit adjustment numerical value;
wherein the first direction is opposite to the second direction.
5. The method of claim 1, wherein said obtaining and presenting the entered number comprises:
acquiring numbers input on a numeric keyboard, and displaying the input numbers; or
And acquiring a second sliding track triggered on the image editing interface, and generating and displaying the input number according to the shape of the second sliding track.
6. The method of claim 1, wherein the edit element comprises text;
the adjusting the size of the editing element according to the adjusted number includes:
and adjusting the font size of the characters according to the adjusted numbers.
7. The method of claim 6, wherein prior to said obtaining and presenting the entered number, comprising:
acquiring characters added to the image to be processed;
and generating the input number according to the preset word size of the character.
8. The method according to any one of claims 1 to 7, wherein the acquiring a first sliding track triggered at the image editing interface comprises:
starting timing from the end of the last trigger operation, and judging whether the sliding operation on the image editing interface is received within a preset time length;
when the sliding operation of the image editing interface is received within the preset time length, a first sliding track corresponding to the sliding operation is obtained;
the method further comprises the following steps:
and when the sliding operation of the image editing interface is not received within the preset time length, clearing the number displayed by the image editing interface.
9. An image editing apparatus characterized by comprising:
the display module is used for displaying an image editing interface, and the image editing interface comprises an image to be processed and editing elements added to the image to be processed;
the operation acquisition module is used for acquiring and displaying the input number and acquiring a first sliding track triggered on the image editing interface;
and the adjusting module is used for adjusting the numerical value of the input number according to the first sliding track and adjusting the size of the editing element according to the adjusted number.
10. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the computer program, when executed by the processor, causes the processor to perform the steps of the image editing method as claimed in any one of claims 1 to 8.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
CN202010331212.3A 2020-04-24 2020-04-24 Image editing method, image editing device, electronic equipment and computer readable storage medium Pending CN111540030A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010331212.3A CN111540030A (en) 2020-04-24 2020-04-24 Image editing method, image editing device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010331212.3A CN111540030A (en) 2020-04-24 2020-04-24 Image editing method, image editing device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111540030A true CN111540030A (en) 2020-08-14

Family

ID=71980030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010331212.3A Pending CN111540030A (en) 2020-04-24 2020-04-24 Image editing method, image editing device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111540030A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113671855A (en) * 2021-08-20 2021-11-19 广东好太太智能家居有限公司 Clothes airing equipment control method, device and system and clothes airing equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102460364A (en) * 2009-06-10 2012-05-16 高通股份有限公司 User interface methods providing continuous zoom functionality
CN104850329A (en) * 2015-04-29 2015-08-19 小米科技有限责任公司 Method and device for adjusting parameters
CN105843474A (en) * 2016-03-23 2016-08-10 努比亚技术有限公司 Volume adjustment system and method
CN107369197A (en) * 2017-07-05 2017-11-21 腾讯科技(深圳)有限公司 Image processing method, device and equipment
CN110851107A (en) * 2019-10-31 2020-02-28 维沃移动通信有限公司 Control method of electronic equipment and electronic equipment
CN110908517A (en) * 2019-11-29 2020-03-24 维沃移动通信有限公司 Image editing method, image editing device, electronic equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102460364A (en) * 2009-06-10 2012-05-16 高通股份有限公司 User interface methods providing continuous zoom functionality
CN104850329A (en) * 2015-04-29 2015-08-19 小米科技有限责任公司 Method and device for adjusting parameters
CN105843474A (en) * 2016-03-23 2016-08-10 努比亚技术有限公司 Volume adjustment system and method
CN107369197A (en) * 2017-07-05 2017-11-21 腾讯科技(深圳)有限公司 Image processing method, device and equipment
CN110851107A (en) * 2019-10-31 2020-02-28 维沃移动通信有限公司 Control method of electronic equipment and electronic equipment
CN110908517A (en) * 2019-11-29 2020-03-24 维沃移动通信有限公司 Image editing method, image editing device, electronic equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113671855A (en) * 2021-08-20 2021-11-19 广东好太太智能家居有限公司 Clothes airing equipment control method, device and system and clothes airing equipment

Similar Documents

Publication Publication Date Title
US10489047B2 (en) Text processing method and device
US20220366711A1 (en) Method for processing text in image, electronic device, and storage medium
US8610672B2 (en) Device and method for stroke based graphic input
CN109712218B (en) Electronic book note processing method, handwriting reading equipment and storage medium
US9880721B2 (en) Information processing device, non-transitory computer-readable recording medium storing an information processing program, and information processing method
CN110286840B (en) Gesture zooming control method and device of touch equipment and related equipment
CN110109590B (en) Automatic reading method and device
EP3866475A1 (en) Image text broadcasting method and device, electronic circuit, and computer program product
EP3751448A1 (en) Text detecting method, reading assisting device and medium
CN111540030A (en) Image editing method, image editing device, electronic equipment and computer readable storage medium
CN110443772B (en) Picture processing method and device, computer equipment and storage medium
CN110245570B (en) Scanned text segmentation method and device, computer equipment and storage medium
CN111124111A (en) Processing method and electronic equipment
US10832100B2 (en) Target recognition device
CN111223155A (en) Image data processing method, image data processing device, computer equipment and storage medium
JP4661909B2 (en) Information display device and program
US10796187B1 (en) Detection of texts
US20120256964A1 (en) Information processing device, information processing method, and program storage medium
CN108415890B (en) Method for setting top display unit cell, terminal equipment and computer readable storage medium
US11776286B2 (en) Image text broadcasting
CN112506597B (en) Software interface color matching method and device, computer equipment and storage medium
CN114879872A (en) Display method, display device, electronic equipment and storage medium
CN115454365A (en) Picture processing method and device, electronic equipment and medium
CN113835598A (en) Information acquisition method and device and electronic equipment
CN111367449A (en) Picture processing method and device, computer equipment and storage medium

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