WO2016188199A1 - 图片裁剪方法和装置 - Google Patents

图片裁剪方法和装置 Download PDF

Info

Publication number
WO2016188199A1
WO2016188199A1 PCT/CN2016/076505 CN2016076505W WO2016188199A1 WO 2016188199 A1 WO2016188199 A1 WO 2016188199A1 CN 2016076505 W CN2016076505 W CN 2016076505W WO 2016188199 A1 WO2016188199 A1 WO 2016188199A1
Authority
WO
WIPO (PCT)
Prior art keywords
cropping
cropped
user
picture
cropped image
Prior art date
Application number
PCT/CN2016/076505
Other languages
English (en)
French (fr)
Inventor
常建
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016188199A1 publication Critical patent/WO2016188199A1/zh

Links

Images

Classifications

    • 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
    • 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
    • G06F3/04883Interaction 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 for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04808Several contacts: gestures triggering a specific function, e.g. scrolling, zooming, right-click, when the user establishes several contacts with the surface simultaneously; e.g. using several fingers or a combination of fingers and pen

Definitions

  • This application relates to, but is not limited to, the field of mobile terminal technology.
  • the related art image cropping scheme mainly passes: first, clicking the target image to display the operation menu; then, clicking the operation menu and clicking the edit button in the operation menu to enter the editing mode; Then, in the edit mode, click the crop button to perform the cropping operation; finally, click the save button after the cropping operation is completed to save the image.
  • the related art touch screen triggering mechanism is realized by a capacitive screen, and only a single operation can be performed at a time. Due to such limitations, the process of cropping pictures is complicated and cumbersome, which is not conducive to user operations. In addition, if you need to perform the same cropping process on multiple images, you need to perform the same operation for each image. The operation is cumbersome and time consuming, resulting in a bad user experience.
  • This paper proposes a picture cropping method and device based on pressure sensing technology, which aims to improve the convenience of mobile terminal users for image cropping and image batch cutting.
  • a picture cropping method including:
  • gesture operation instruction matches a preset cropping operation, performing corresponding cropping processing on the first cropped image.
  • the step of performing a corresponding cropping process on the first cropped image includes:
  • the gesture operation is a two-finger weighting operation, obtaining two-finger position information from the two-finger weight pressing operation;
  • the first cropped image is cropped according to the cropping frame, or after the cropping confirmation command of the user is received, the first cropped image is cropped according to the cropping frame;
  • the step of performing a corresponding cropping process on the first cropped image includes:
  • the method before the step of cutting the first cropped image, the method further includes:
  • the position and size of the crop frame are adjusted according to the drag operation instruction.
  • the step of performing a corresponding cropping process on the first cropped image further includes:
  • the gesture operation in the re-received gesture operation instruction includes a three-finger re-press operation
  • the step of performing batch cutting processing on all the pictures between the first cropped picture and the second cropped picture selected by the user includes:
  • Obtaining data of the cropping frame where the data of the cropping frame includes coordinates of an upper left vertex of the cropping frame and width and height information of the cropping frame;
  • a picture cropping device comprises:
  • the first obtaining module is configured to: in response to the user browsing a picture on the screen of the terminal, display a browsing picture, and obtain a first cropped picture selected by the user from the browsing picture;
  • the determining module is configured to: determine, when the gesture operation instruction on the first cropped image is received, whether the gesture operation instruction matches a preset cropping operation;
  • the cropping module is configured to: if the gesture operation instruction matches a preset cropping operation, perform corresponding cropping processing on the first cropped image.
  • the cutting module is configured to: when the gesture operation is a two-finger weighting operation, obtain two-finger position information from the two-finger weight pressing operation; according to the two-finger position information, Displaying, by the first cropped picture, a preset cropping frame; cutting the first cropped image according to the cropping frame, or, after receiving the user's cropping confirmation instruction, according to the cropping box, The first cropped image is cropped; the cropped first cropped image is saved.
  • the cutting module is configured to: obtain the sliding track information from the sliding operation when the gesture operation is a sliding operation; and match the sliding track information with a sliding track preset by the user, If the match is successful, a preset crop frame is displayed on the first cropped image; the first cropped image is cropped according to the cropped frame, or, after receiving the user's cropping confirmation command, according to The cropping frame crops the first cropped image; and saves the cropped first cropped image.
  • the cutting module is further configured to: when receiving a drag operation instruction of the user on the crop frame, adjust the position and size of the crop frame according to the drag operation instruction.
  • the device further includes:
  • a second acquiring module configured to: when the gesture operation instruction of the user is received again, acquire a second cropped image selected by the user in the browsed picture; and the gesture operation in the re-received gesture operation instruction includes three fingers Heavy pressure operation
  • the batch cutting module is configured to: perform batch cutting processing on all the images between the first cropped image and the second cropped image selected by the user.
  • the batch cutting module is configured to: acquire data of the cropping frame, where the data of the cropping frame includes coordinates of an upper left vertex of the cropping frame and width and height information of the cropping frame; and acquiring the first cropping image Location information in the browsing state, and location information of the second cropped image in the browsing state; according to the location information of the first cropped image and the location information of the second cropped image, and the data of the cropping frame, All the pictures between the first cropped picture and the second cropped picture are subjected to the same cropping.
  • a computer readable storage medium storing computer executable instructions for performing the method of any of the above.
  • the embodiment of the invention discloses a picture cropping method and device based on pressure sensing technology, which displays a browsing picture by responding to a picture browsing instruction of a user on a screen of a terminal, and acquires a first cropped picture selected by the user from the browsing picture;
  • the gesture operation instruction on the first cropped picture is used, determining whether the gesture operation instruction matches the preset cropping operation; if the gesture operation instruction matches the preset cropping operation, performing corresponding cropping processing on the first cropped image;
  • the batch cutting process is performed on all the images between the first cropped image and the second cropped image selected by the user, which solves the problem that the mobile terminal user performs the image cropping and the image batch cutting operation in the related art. It realizes the convenience of improving the cropping of pictures and the batch cutting of pictures by mobile terminal users.
  • FIG. 1 is a schematic flow chart of a first embodiment of a picture cropping method based on pressure sensing technology according to the present invention
  • FIG. 2 is a schematic diagram of a multi-picture browsing state in a screen of a mobile terminal according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a single picture browsing state in a screen of a mobile terminal according to an embodiment of the present invention
  • FIG. 4 is a first schematic flowchart of performing a corresponding cropping process on the first cropped image in the embodiment of the present invention
  • FIG. 5 is a second schematic flowchart of performing corresponding cropping processing on the first cropped image in the embodiment of the present invention.
  • FIG. 6 is a third schematic flowchart of performing corresponding cropping processing on the first cropped image in the embodiment of the present invention.
  • FIG. 7 is a schematic flow chart of a second embodiment of a picture cropping method based on pressure sensing technology of the present invention.
  • FIG. 8 is a schematic flowchart of batch cutting processing all the pictures between the first cropped picture and the second cropped picture selected by the user in the embodiment of the present invention.
  • FIG. 9 is a schematic diagram of functional modules of a first embodiment of a picture cropping device based on pressure sensing technology according to the present invention.
  • FIG. 10 is a schematic diagram of functional modules of a second embodiment of a picture cropping apparatus based on pressure sensing technology according to the present invention.
  • the browsing picture in response to the user's picture browsing instruction on the screen of the terminal, in response to the user's picture browsing instruction on the terminal screen, the browsing picture is displayed, and the first cropped picture selected by the user from the browsing picture is obtained;
  • the gesture operation instruction on the picture is cropped, it is determined whether the gesture operation instruction matches the preset cropping operation; if the gesture operation instruction matches the preset cropping operation, the first cropped picture is subjected to corresponding cropping processing; Crop images and user-selected All the images between the second cropped images are batch-cut. Therefore, the problem that the mobile terminal user performs the image cropping and the image batch cutting operation process is too cumbersome in the related art. It realizes the convenience of improving the cropping of pictures and the batch cutting of pictures by mobile terminal users.
  • a first embodiment of the present invention provides a picture cropping method based on a pressure sensing technology, including:
  • step S1 in response to the user's picture browsing instruction on the screen of the terminal, the browsing picture is displayed, and the first cropped picture selected by the user from the browsing picture is obtained.
  • the executor of the method of the embodiment of the present invention may be a smart phone, a tablet computer or a mobile terminal.
  • This embodiment is exemplified by a mobile terminal, and is of course not limited to other portable devices capable of performing picture cropping.
  • the mobile terminal responds to the picture browsing instruction of the user on the screen of the terminal, displays the browsing picture, and acquires the first cropped picture selected by the user from the browsing picture.
  • the user can open the album in the mobile terminal to enter the multi-picture browsing state.
  • the user can select one target picture from the plurality of pictures according to the need, and use the target picture as the first cropping picture, that is,
  • the first cropped picture may be a certain picture selected by the user in the multi-picture browsing state; or, referring to FIG. 3, the user may also select a picture to enter a single picture browsing state after the mobile terminal opens the album to enter the multi-picture browsing state.
  • the target image is used as the first cropped image by sliding left or right to select a target image, that is, the first cropped image may be the current browsing image of the user in the single-picture browsing state.
  • Step S2 When receiving the gesture operation instruction on the first cropped picture, determine whether the gesture operation instruction matches a preset cropping operation.
  • the mobile terminal After successfully acquiring the first cropped picture selected by the user from the browsing picture, the mobile terminal receives a gesture operation instruction on the first cropped picture to determine whether the gesture operation instruction matches the preset cropping operation.
  • the gesture operation is detected by the pressure sensing screen of the mobile terminal, and the pressure sensing screen can sense the gesture operation of the user's finger or other contact points.
  • the finger operation is taken as an example.
  • the finger operation may be a pressing operation, a sliding operation, or other operation formula.
  • the pressing operation may be divided according to the pressing force, for example, may be divided into light pressure and heavy pressure, or may be divided according to the number of fingers, for example, may be divided into single finger pressing and multi-finger pressing.
  • different sliding tracks can be set to match the cutting operation.
  • the finger weight is set as a gesture operation command for triggering the cropping operation, wherein the finger weight pressing can be determined by setting the pressing force to a preset threshold, and determining that the pressure is heavy.
  • the two-finger pressing is set as a gesture operation command for triggering the cropping operation, wherein the determination of the two-finger pressing can be performed in the following manner: when the number of contact points between the finger and the terminal screen is set to 2, the double-finger pressing is determined.
  • Setting a finger sliding that matches the preset sliding track is a gesture operation instruction for triggering the cutting operation, wherein the finger sliding can be determined by: comparing the user's finger sliding track with the preset sliding track, if sliding The track is similar or identical to the preset sliding track, and it is determined that the finger sliding matches the preset sliding track.
  • the two-finger weight is set as a gesture operation command for triggering the cropping operation, wherein the two-finger weighting can be determined by setting the pressing force to a preset threshold, and the number of contact points between the finger and the terminal screen is 2, It is determined to be a two-finger press.
  • Setting the two-finger sliding that matches the preset sliding trajectory is a gesture operation instruction for triggering the cutting operation, wherein the determination of the two-finger sliding can be performed by comparing the sliding path of the user's finger with the preset sliding trajectory. If the sliding track is similar or identical to the preset sliding track, and the number of contact points between the finger and the terminal screen is 2, it is determined that the two-finger sliding matches the preset sliding track.
  • Step S3 If the gesture operation instruction matches a preset cropping operation, perform corresponding cropping processing on the first cropped image.
  • the mobile terminal After determining whether the gesture operation instruction matches the preset cropping operation, if the gesture operation instruction matches the preset cropping operation, the mobile terminal performs corresponding cropping processing on the first cropped image.
  • the mobile terminal performs corresponding cropping processing on the first cropped image, the process includes:
  • the mobile terminal acquires coordinates of the two fingers pressed on the screen of the terminal according to the above-mentioned two-finger weight pressing operation, and the coordinates include the abscissa and the ordinate.
  • the mobile terminal sets the preset cropping frame to the coordinates of the vertex coordinates to the coordinates of the above-mentioned two-finger pressing position according to the coordinates of the two-finger pressing position acquired by the above-mentioned two-finger pressing operation.
  • the cropping frame is positioned and displayed in the double Refers to the rectangle on which the pressed position is diagonal.
  • the cropping frame is positioned and displayed on the axisymmetric rectangle whose axis connected by the two-finger pressing position is the axis of symmetry.
  • the mobile terminal cuts the first cropped image according to the cropped frame that is successfully located and displayed.
  • the following multiple implementation manners may be adopted:
  • the cropping action is performed on the first cropped image as described above.
  • the cutting operation is performed on the first cropped image.
  • the confirming the cropping instruction may be sent after the user presses the confirming the cropping button; or may be performed by the user It is sent after a single-finger heavy-press operation or a multi-finger heavy-press operation; it can also be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • the mobile terminal saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the process of performing the corresponding cropping process on the first cropped image by the mobile terminal may include:
  • the mobile terminal obtains the sliding track information from the sliding operation, and the sliding track is a track for the user to perform a sliding operation using the finger on the terminal screen, and may be a single-finger sliding track or a multi-finger sliding track.
  • the mobile terminal matches the sliding track information with the sliding track preset by the user. If the sliding track information successfully matches the sliding track preset by the user, displaying a preset cutting frame on the first cropped image. .
  • the sliding track preset by the user may be a single-finger sliding track or a multi-finger sliding track; the cutting frame displayed on the first cropped picture may be preset by the user, or may be preset by the system. of.
  • the mobile terminal cuts the first cropped image according to the cropping frame, and actually When implemented, the following implementations can be used:
  • the cropping action is performed on the first cropped image as described above.
  • the cutting operation is performed on the first cropped image.
  • the confirming the cropping instruction may be sent after the user presses the confirming the cropping button; or may be performed by the user It is sent after a single-finger heavy-press operation or a multi-finger heavy-press operation; it can also be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • the mobile terminal saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the embodiment of the invention provides a method for simplifying the image cropping operation, and improves the convenience of the mobile terminal user to perform image cropping.
  • FIG. 1 the first flow chart of the steps of performing the corresponding cropping process on the first cropped image in the embodiment of the present invention is shown in FIG.
  • step S3 includes:
  • Step S31 When the gesture operation is a two-finger re-press operation, the two-finger position information is acquired from the two-finger re-press operation.
  • the mobile terminal acquires the two-finger position information from the two-finger heavy pressing operation.
  • the mobile terminal acquires coordinates of the two fingers pressing on the screen of the mobile terminal according to the above-mentioned two-finger weight pressing operation, and the coordinates include an abscissa and an ordinate.
  • Step S32 displaying a preset cropping frame on the first cropped image according to the two-finger position information.
  • the mobile terminal After the location information of the two fingers is successfully acquired, the mobile terminal locates the preset cropping frame according to the position information of the two fingers, and then displays the cropping frame on the first cropped image.
  • the mobile terminal sets the preset clipping frame to the vertex coordinates to the coordinates of the above-mentioned two-finger pressing position according to the coordinates of the two-finger pressing position obtained by the above-mentioned two-finger pressing operation.
  • the cutting frame is positioned and displayed in the double Refers to the rectangle on which the pressed position is diagonal.
  • the cropping frame is positioned and displayed on the axisymmetric rectangle whose axis connected by the two-finger pressing position is the axis of symmetry.
  • step S33 the first cropped picture is cropped according to the cropping frame, or after receiving the user's cropping confirmation instruction, the first cropped picture is cropped according to the cropping frame.
  • the mobile terminal crops the first cropped image according to the cropping frame; or, after receiving the user's cropping confirmation command, according to the cropping a box for cropping the first cropped image described above.
  • the first cropped image is cropped.
  • the following multiple implementation manners may be adopted:
  • the cropping action is performed on the first cropped image as described above.
  • the cutting operation is performed on the first cropped image.
  • the confirming the cropping instruction may be sent after the user presses the confirming the cropping button; or may be performed by the user It is sent after a single-finger heavy-press operation or a multi-finger heavy-press operation; it can also be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • step S34 the cropped first cropped picture is saved.
  • the mobile terminal After successfully cropping the first cropped image, the mobile terminal saves the cropped first cropped image.
  • the mobile terminal saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the embodiment of the invention provides a method for simplifying the image cropping operation, and improves the convenience of the mobile terminal user to perform image cropping.
  • FIG. 1 the second flowchart of the step of performing the corresponding cropping process on the first cropped image in the embodiment of the present invention is shown in FIG.
  • step S3 further includes:
  • Step S35 When the gesture operation is a sliding operation, the sliding track information is acquired from the sliding operation.
  • the mobile terminal acquires the sliding track information from the sliding operation.
  • the sliding track obtained from the sliding operation is a track for the user to perform a sliding operation using a finger on the terminal screen, and may be a single-finger sliding track or a multi-finger sliding track.
  • step S36 the sliding track information is matched with the sliding track preset by the user. If the matching is successful, a preset cropping frame is displayed on the first cropped picture.
  • the mobile terminal After successfully acquiring the sliding track information from the sliding operation, the mobile terminal matches the sliding track information with the sliding track preset by the user, and if the sliding track information successfully matches the sliding track preset by the user, the first A preset crop frame is displayed on the cropped image.
  • the sliding track preset by the user may be a single-finger sliding track or a multi-finger sliding track; the cutting frame displayed on the first cropped picture may be preset by the user, or may be preset by the system. of.
  • step S33 the first cropped picture is cropped according to the cropping frame, or after receiving the user's cropping confirmation instruction, the first cropped picture is performed according to the cropping frame. Cropped.
  • the mobile terminal After successfully displaying the cropping frame, the mobile terminal clips the first cropped image according to the cropping frame; or, after receiving the cropping confirmation command of the user, the first cropped image according to the cropping frame Make a cut.
  • the first cropped image is cropped.
  • the following multiple implementation manners may be adopted:
  • the cropping action is performed on the first cropped image as described above.
  • the cutting operation is performed on the first cropped image.
  • the confirming the cropping instruction may be sent after the user presses the confirming the cropping button; or may be performed by the user It is sent after a single-finger heavy-press operation or a multi-finger heavy-press operation; it can also be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • step S34 the cropped first cropped picture is saved.
  • the mobile terminal After the first cropped picture is successfully cropped, the mobile terminal saves the cropped first cropped picture.
  • the mobile terminal saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the system presets the time, and after the preset time passes, saves the cropped first cropped image.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the embodiment of the invention provides a method for simplifying the image cropping operation, and improves the convenience of the mobile terminal user to perform image cropping.
  • FIG. 1 the third flowchart of the step of performing the corresponding cropping process on the first cropped image in the embodiment of the present invention is shown in FIG.
  • the method may further include:
  • Step S37 when receiving a drag operation instruction of the user on the crop frame, adjusting the position and size of the crop frame according to the drag operation instruction.
  • the mobile terminal After the display of the cropping frame is successful, the mobile terminal receives the drag operation instruction of the user on the crop frame, and adjusts the position and size of the crop frame according to the drag operation instruction.
  • the adjusting operation of the cropping frame may be that the user uses a single finger to drag the border or the top corner of the cropping frame; or the user may use a multi-finger to drag the border of the cropping frame or The top corner; it may also be a cropping frame of different sizes preset by the user to select a system.
  • step S33 the first cropped picture is cropped according to the cropping frame, or after receiving the user's cropping confirmation instruction, the first cropped picture is cropped according to the cropping frame.
  • the mobile terminal After successfully displaying the cropping frame, the mobile terminal clips the first cropped image according to the cropping frame; or, after receiving the cropping confirmation command of the user, the first cropped image according to the cropping frame Make a cut.
  • the first cropped image is cropped.
  • the following multiple implementation manners may be adopted:
  • the cutting action is performed on the first cropped image.
  • the user confirms the cropping instruction, performing a cropping action on the first cropped image, wherein the confirming the cropping command may be sent after the user presses the confirming the cropping button;
  • the user sends the single-finger heavy-pressing operation or the multi-finger pressing operation; or it can be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • step S34 the cropped first cropped picture is saved.
  • the mobile terminal After the first cropped picture is successfully cropped, the mobile terminal saves the cropped first cropped picture.
  • the mobile terminal saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the embodiment of the invention provides a method for simplifying the image cropping operation, and improves the convenience of the mobile terminal user to perform image cropping.
  • the second embodiment of the present invention provides a picture cropping method based on the pressure sensing technology.
  • the method further includes:
  • Step S4 Acquire a second cropped image selected by the user in the browsed picture when the user's gesture operation instruction is received again; the gesture operation in the re-received gesture operation instruction includes a three-finger weighting operation.
  • the mobile terminal acquires the second cropped picture selected by the user in the browsing picture.
  • the gesture operation in the gesture operation command received again includes but is not limited to the three-finger weight operation.
  • the display interface of the mobile terminal returns to the multi-picture browsing state, and the user can Selecting a target image from multiple images and using the target image as the second cropped image; or, after the display interface of the mobile terminal returns to the multi-image browsing state, the user selects a picture to enter a single-image browsing state, and passes to the left. Or swipe right to select a target image and use the target image as the second cropped image.
  • Step S5 Perform batch cutting processing on all the pictures between the first cropped picture and the second cropped picture selected by the user.
  • the mobile terminal After successfully acquiring the second cropped image selected by the user in the browsing picture, the mobile terminal acquires data of the cropping frame when the first cropped image is cropped.
  • the cropping frame data includes the coordinates of the upper left vertex and the width of the cropping frame of the cropping frame, and is saved by using the data structure as follows:
  • the mobile terminal After successfully acquiring the data of the cropping frame, the mobile terminal acquires the location information of the first cropped image in the browsing state and the location information of the second cropped image in the browse state.
  • the mobile terminal acquires location information of the first cropped picture in a multi-picture browsing state, including line information and column information, and uses (m1, n1) to represent row information and column information of the first cropped picture; and acquires the second cropped picture in The position information in the multi-picture browsing state, including the line information and the column information, uses (m2, n2) to represent the row information and the column information of the second cropped picture, where the rows and columns are counted from 0.
  • m2, n2 uses
  • the mobile terminal After successfully acquiring the first cropped picture and the position information of the second cropped picture in the browsing state, the mobile terminal compares the first cropped picture according to the position information of the first cropped picture and the second cropped picture, and the data of the cropped frame. All the pictures between the second cropped images are cropped the same.
  • the first image between the first cropped image and the second cropped image includes a first cropped image and a second cropped image.
  • the batch cutting process for all the images between the first cropped image and the second cropped image is:
  • the embodiment of the present invention provides a batch cutting method in a process of performing a picture cropping operation by a user, which improves the convenience of the mobile terminal or the mobile terminal user to perform batch cutting of the picture.
  • step S5 includes:
  • Step S51 Acquire data of the cropping frame, where the data of the cropping frame includes coordinates of the upper left vertex of the cropping frame and width and height information of the cropping frame.
  • the mobile terminal After successfully acquiring the second cropped image selected by the user in the browsing picture, the mobile terminal acquires data of the cropping frame when the first cropped image is cropped.
  • the cropping frame data includes the coordinates of the upper left vertex and the width of the cropping frame of the cropping frame, and is saved by using the data structure as follows:
  • Step S52 Obtain location information of the first cropped image in a browse state, and location information of the second cropped image in a browse state.
  • the mobile terminal After the data of the cropping frame is successfully acquired, the mobile terminal acquires the location information of the first cropped image in the browsing state and the location information of the second cropped image in the browse state.
  • the mobile terminal acquires location information of the first cropped picture in a multi-picture browsing state, including line information and column information, and uses (m1, n1) to represent row information and column information of the first cropped picture; and acquires the second cropped picture in The position information in the multi-picture browsing state, including the line information and the column information, uses (m2, n2) to represent the row information and the column information of the second cropped picture, where the rows and columns are counted from 0.
  • m2, n2 uses
  • Step S53 performing, according to the location information of the first cropped picture and the location information of the second cropped picture, and the data of the cropped frame, all the pictures between the first cropped picture and the second cropped picture The same cropping.
  • the mobile terminal After successfully acquiring the first cropped picture and the position information of the second cropped picture in the browsing state, the mobile terminal compares the first cropped picture according to the position information of the first cropped picture and the second cropped picture, and the data of the cropped frame. All the pictures between the second cropped images are cropped the same.
  • the first image between the first cropped image and the second cropped image includes a first cropped image and a second cropped image.
  • the batch cutting process for all the images between the first cropped image and the second cropped image is:
  • the embodiment of the present invention provides a batch cutting method in a process of performing a picture cropping operation by a user, which improves the convenience of the mobile terminal or the mobile terminal user to perform batch cutting of the picture.
  • a first embodiment of the present invention provides a picture cropping device based on a pressure sensing technology, including:
  • the first obtaining module 100 is configured to: in response to the user's picture browsing instruction on the terminal screen, display the browsing picture, and acquire the first cropping picture selected by the user from the browsing picture.
  • the device in the embodiment of the present invention may be a smart phone, a tablet computer or a mobile terminal.
  • This embodiment is exemplified by a mobile terminal, and is of course not limited to other portable devices capable of performing picture cropping.
  • the first obtaining module 100 displays the browsing picture in response to the picture browsing instruction of the user on the screen of the terminal, and acquires the first cropped picture selected by the user from the browsing picture.
  • the user can open the album in the mobile terminal to enter the multi-picture browsing state.
  • the user can select one target picture from the plurality of pictures according to the need, and use the target picture as the first cropping picture, that is,
  • the first cropped picture may be a certain picture selected by the user in the multi-picture browsing state; or, referring to FIG. 3, the user may also select a picture to enter a single picture browsing state after the mobile terminal opens the album to enter the multi-picture browsing state.
  • the target image is used as the first cropped image by sliding left or right to select a target image, that is, the first cropped image may be the current browsing image of the user in the single-picture browsing state.
  • the determining module 200 is configured to: when receiving the gesture operation instruction on the first cropped picture, determine whether the gesture operation instruction matches a preset cropping operation.
  • the determining module 200 receives the gesture operation instruction on the first cropped image, and determines whether the gesture operation instruction matches the preset cropping operation.
  • the gesture operation is detected by the pressure sensing screen of the mobile terminal, and the pressure sensing screen can sense the gesture operation of the user's finger or other contact points.
  • the finger operation may be a pressing operation, a sliding operation, or other operation modes.
  • the pressing operation may be divided according to the pressing force, for example, may be divided into light pressure and heavy pressure, or may be divided according to the number of fingers, for example, may be divided into single finger pressing and multi-finger pressing.
  • different sliding tracks can be set to match the cutting operation.
  • the finger weight is set as a gesture operation command for triggering the cropping operation, wherein the finger weight pressing can be determined by setting the pressing force to a preset threshold, and determining that the pressure is heavy.
  • the two-finger pressing is set as a gesture operation command for triggering the cropping operation, wherein the determination of the two-finger pressing can be performed in the following manner: when the number of contact points between the finger and the terminal screen is set to 2, the double-finger pressing is determined.
  • Setting a finger sliding that matches the preset sliding track is a gesture operation instruction for triggering the cutting operation, wherein the finger sliding can be determined by: comparing the user's finger sliding track with the preset sliding track, if sliding The track is similar or identical to the preset sliding track, and it is determined that the finger sliding matches the preset sliding track.
  • the two-finger weight is set as a gesture operation command for triggering the cropping operation, wherein the two-finger weighting can be determined by setting the pressing force to a preset threshold, and the number of contact points between the finger and the terminal screen is 2, It is determined to be a two-finger press.
  • Setting the two-finger sliding that matches the preset sliding trajectory is a gesture operation instruction for triggering the cutting operation, wherein the determination of the two-finger sliding can be performed by comparing the sliding path of the user's finger with the preset sliding trajectory. If the sliding track is similar or identical to the preset sliding track, and the number of contact points between the finger and the terminal screen is 2, it is determined that the two-finger sliding matches the preset sliding track.
  • the cropping module 300 is configured to perform a corresponding cropping process on the first cropped image if the gesture operation instruction matches a preset cropping operation.
  • the cropping module 300 After determining whether the gesture operation instruction matches the preset cropping operation, if the gesture operation instruction matches the preset cropping operation, the cropping module 300 performs corresponding cropping processing on the first cropping image.
  • the cropping module 300 performs a corresponding cropping process on the first cropped image, and the process includes:
  • the cropping module 300 acquires the coordinates of the two fingers pressed on the screen of the terminal according to the above-mentioned two-finger pressing operation, and the coordinates include the abscissa and the ordinate.
  • the cropping module 300 sets the preset cropping frame to vertex coordinates to the coordinates of the above-mentioned two-finger pressing position according to the coordinates of the two-finger pressing position acquired by the above-mentioned two-finger pressing operation. At this time, the cropping frame is positioned and displayed in the The two fingers press the position on a diagonal rectangle.
  • the cropping frame is positioned and displayed on the axisymmetric rectangle whose axis connected by the two-finger pressing position is the axis of symmetry.
  • the cropping module 300 performs the cropping of the first cropped image according to the cropping frame that is successfully located and displayed.
  • the following various implementation manners may be adopted:
  • the cropping action is performed on the first cropped image as described above.
  • the cutting operation is performed on the first cropped image.
  • the confirming the cropping instruction may be sent after the user presses the confirming the cropping button; or may be performed by the user It is sent after a single-finger heavy-press operation or a multi-finger heavy-press operation; it can also be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • the cropping module 300 saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the cropping module 300 also performs corresponding cropping processing on the first cropped image, and the process includes:
  • the cropping module 300 obtains the sliding track information from the sliding operation, and the sliding track is a track for the user to perform a sliding operation using a finger on the terminal screen, and may be a single-finger sliding track or a multi-finger sliding track.
  • the cropping module 300 matches the sliding track information with the sliding track preset by the user, and if the sliding track information successfully matches the sliding track preset by the user, displaying a preset cropping on the first cropped image. frame.
  • the sliding track preset by the user may be a single-finger sliding track or a multi-finger sliding track; the cutting frame displayed on the first cropped picture may be preset by the user, or may be preset by the system. of.
  • the cropping module 300 crops the first cropped image according to the cropping frame.
  • the following implementation manners can be adopted:
  • the cropping action is performed on the first cropped image as described above.
  • the cutting operation is performed on the first cropped image.
  • the confirming the cropping instruction may be sent after the user presses the confirming the cropping button; or may be performed by the user It is sent after a single-finger heavy-press operation or a multi-finger heavy-press operation; it can also be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • the cropping module 300 saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the embodiment of the invention provides a device for simplifying the image cropping operation, which improves the convenience of the mobile terminal user to perform image cropping.
  • the cropping module 300 is configured to: when the gesture operation is a two-finger heavy pressing operation, the double finger is pressed Obtaining the two-finger position information in the operation; displaying a preset cropping frame on the first cropped image according to the two-finger position information; and cutting the first cropped image according to the cropping frame, or After receiving the cropping confirmation command of the user, the first cropped image is cropped according to the cropping frame; and the cropped first cropped image is saved.
  • the cropping module 300 acquires the two-finger position information from the two-finger weighting operation.
  • the cropping module 300 acquires coordinates of the double finger pressing on the screen of the mobile terminal according to the above-mentioned two-finger weight pressing operation, and the coordinates include an abscissa and an ordinate.
  • the cropping module 300 locates the preset cropping frame according to the position information of the two fingers, and then displays the cropping frame on the first cropped image.
  • the cutting module 300 sets the preset clipping frame to the coordinates of the two fingers to the coordinates of the two-finger pressing position according to the coordinates of the two-finger pressing position acquired by the two-finger pressing operation. At this time, the cutting frame is positioned and displayed in the The two fingers press the position on a diagonal rectangle.
  • the cropping frame is positioned and displayed on the axisymmetric rectangle whose axis connected by the two-finger pressing position is the axis of symmetry.
  • the cropping module 300 crops the first cropped image according to the cropping frame; or, after receiving the cropping confirmation command of the user, according to the cropping frame, the first Crop a picture for cropping.
  • the first cropped image is cropped.
  • the following multiple implementation manners may be adopted:
  • the cropping action is performed on the first cropped image as described above.
  • the cutting operation is performed on the first cropped image.
  • the confirming the cropping instruction may be sent after the user presses the confirming the cropping button; or may be performed by the user It is sent after a single-finger heavy-press operation or a multi-finger heavy-press operation; it can also be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • the cropping module 300 After successfully cropping the first cropped image, the cropping module 300 saves the cropped first cropped image.
  • the mobile terminal saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the embodiment of the invention provides a device for simplifying the image cropping operation, which improves the convenience of the mobile terminal user to perform image cropping.
  • the cropping module 300 is configured to: obtain the sliding track information from the sliding operation when the gesture operation is a sliding operation, in order to improve the convenience of the user to perform the image cropping. And matching the sliding track information with the sliding track preset by the user, and if the matching is successful, displaying a preset cropping frame on the first cropping picture.
  • the cropping module 300 acquires the slide track information from the slide operation.
  • the sliding track obtained from the sliding operation is a track for the user to perform a sliding operation using a finger on the terminal screen, and may be a single-finger sliding track or a multi-finger sliding track.
  • the cutting module 300 After successfully obtaining the sliding track information from the sliding operation, the cutting module 300 matches the sliding track information with the sliding track preset by the user, and if the sliding track information successfully matches the sliding track preset by the user, A preset crop frame is displayed on a cropped image.
  • the sliding track preset by the user may be a single-finger sliding track or a multi-finger sliding track; the cutting frame displayed on the first cropped picture may be preset by the user, or may be preset by the system. of.
  • the cropping module 300 crops the first cropped image according to the cropping frame; or, after receiving the cropping confirmation command of the user, the first cropped image is performed according to the cropping frame. Cropped.
  • the first cropped image is cropped.
  • the following multiple implementation manners may be adopted:
  • the cropping action is performed on the first cropped image as described above.
  • the cutting operation is performed on the first cropped image.
  • the first cropping map is The slice performs a cropping action, wherein the confirming the cropping instruction may be sent after the user presses the confirming the cropping button; or may be sent after the user performs the single-finger heavy pressing operation or the multi-finger pressing operation; or may be performed by the user Sent by a single-finger swipe operation or a multi-finger swipe operation that matches the preset slide trajectory.
  • the cropping module 300 After successfully cropping the first cropped image, the cropping module 300 saves the cropped first cropped image.
  • the mobile terminal saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the embodiment of the invention provides a device for simplifying the image cropping operation, which improves the convenience of the mobile terminal user to perform image cropping.
  • the cropping module 300 is further configured to: according to the drag operation when receiving the drag operation instruction of the user on the crop frame The instruction adjusts the position and size of the crop frame.
  • the cropping module 300 receives the user's Drag the operation instruction to adjust the position and size of the crop frame according to the drag operation instruction.
  • the adjusting operation of the cropping frame may be that the user uses a single finger to drag the border or the top corner of the cropping frame; or the user may use a multi-finger to drag the border of the cropping frame or The top corner; it can also be a cropping frame of various sizes preset by the user to select a system.
  • the cropping module 300 crops the first cropped image according to the cropping frame; or, after receiving the cropping confirmation command of the user, the first cropped image is performed according to the cropping frame. Cropped.
  • the first cropped image is cropped.
  • the following multiple implementation manners may be adopted:
  • the cutting action is performed on the first cropped image.
  • the user confirms the cropping instruction, performing a cropping action on the first cropped image, wherein the confirming the cropping command may be sent after the user presses the confirming the cropping button;
  • the user sends the single-finger heavy-pressing operation or the multi-finger pressing operation; or it can be sent after the user performs a single-finger sliding operation or a multi-finger sliding operation that matches the preset sliding trajectory.
  • the cropping module 300 saves the cropped first cropped image.
  • the mobile terminal saves the cropped first cropped image.
  • the following multiple implementation manners may be adopted:
  • the cropped first cropped image is saved after the preset time elapses according to the preset time of the user or the preset time of the system.
  • the confirmation save command may be sent after the user presses the confirm save button; or may be sent after the user performs the single-finger re-press operation or the multi-finger re-press operation; or may be performed on the user and the preset sliding track A matched single-finger swipe operation or a multi-finger swipe operation.
  • the embodiment of the invention provides a device for simplifying the image cropping operation, which improves the convenience of the mobile terminal user to perform image cropping.
  • a second embodiment of the present invention provides a picture cropping device based on a pressure sensing technology. Based on the device shown in FIG. 9, the device further includes:
  • the second obtaining module 400 is configured to: when the gesture operation instruction of the user is received again, acquire a second cropped image selected by the user in the browsed picture; the gesture operation in the re-received gesture operation instruction includes three Refers to heavy pressure operation;
  • the second obtaining module 400 acquires the second cropped picture selected by the user in the browsing picture when the gesture operation instruction of the user is received again.
  • the gesture operation in the gesture operation command received again includes but is not limited to the three-finger weight operation.
  • the display interface of the mobile terminal returns to the multi-picture browsing state, and the user can Selecting a target image from multiple images and using the target image as the second cropped image; or, after the display interface of the mobile terminal returns to the multi-image browsing state, the user selects a picture to enter a single-image browsing state, and passes to the left. Or swipe right to select a target image and use the target image as the second cropped image.
  • the batch cutting module 500 is configured to perform batch cutting processing on all the images between the first cropped image and the second cropped image selected by the user.
  • the batch cutting module 500 acquires the data of the cropping frame when the first cropped image is cropped.
  • the cropping frame data includes the coordinates of the upper left vertex and the width of the cropping frame of the cropping frame, and is saved by using the data structure as follows:
  • the batch cutting module 500 obtains the location information of the first cropped image in the browse state and the location information of the second cropped image in the browse state.
  • the batch cutting module 500 obtains the position information of the first cropped image in the multi-picture browsing state, including the row information and the column information, and uses (m1, n1) to represent the row information and the column information of the first cropped image; and acquires the second cropping.
  • the position information of the picture in the multi-picture browsing state including the line information and the column information, uses (m2, n2) to represent the line information and column information of the second cropped picture, where the rows and columns are counted from 0.
  • the batch cutting module 500 After successfully acquiring the position information of the first cropped picture and the second cropped picture in the browsing state, the batch cutting module 500 cuts the first crop according to the position information of the first cropped picture and the second cropped picture, and the data of the cropping frame. All images between the picture and the second cropped image are cropped the same.
  • the first image between the first cropped image and the second cropped image includes a first cropped image and a second cropped image.
  • the batch cutting process for all the images between the first cropped image and the second cropped image is:
  • a. first determine all the first cropped images including the first cropped image and the second cropped image and The number of pictures between the second cropped images. The number is: w-n1+n2+1+(m2-m1-1)*w, and the simplification is: (m2-m1)*w+n2-n1+1;
  • the embodiment of the present invention provides a batch cutting device in a process of performing a picture cropping operation by a user, which improves the convenience of the mobile terminal user to perform batch cutting of the picture.
  • the batch cutting module 500 is configured to: acquire the data of the cropping frame, where the data of the cropping frame includes the upper left of the cropping frame, in order to improve the convenience of the user to perform the batch cutting of the image. a vertex coordinate and a width and height information of the cropping frame; acquiring position information of the first cropped image in a browsing state, and position information of the second cropped image in a browsing state; according to the position information of the first cropped image and the first And secondizing the position information of the picture and the data of the crop frame, and performing the same cropping on all the pictures between the first cropped picture and the second cropped picture.
  • the batch cutting module 500 acquires the data of the cropping frame when the first cropped image is cropped.
  • the cropping frame data includes the coordinates of the upper left vertex and the width of the cropping frame of the cropping frame, and is saved by using the data structure as follows:
  • the batch cutting module 500 obtains the location information of the first cropped image in the browse state and the location information of the second cropped image in the browse state.
  • the batch cutting module 500 obtains the position information of the first cropped image in the multi-picture browsing state, including the row information and the column information, and uses (m1, n1) to represent the row information and the column information of the first cropped image; and acquires the second cropping.
  • the position information of the picture in the multi-picture browsing state including the line information and the column information, uses (m2, n2) to represent the line information and column information of the second cropped picture, where the rows and columns are counted from 0.
  • the batch cutting module 500 After successfully acquiring the position information of the first cropped picture and the second cropped picture in the browsing state, the batch cutting module 500 cuts the first crop according to the position information of the first cropped picture and the second cropped picture, and the data of the cropping frame. All images between the picture and the second cropped image are cropped the same.
  • the first image between the first cropped image and the second cropped image includes a first cropped image and a second cropped image.
  • the batch cutting process for all the images between the first cropped image and the second cropped image is:
  • the embodiment of the present invention provides a batch cutting device in a process of performing a picture cropping operation by a user, which improves the convenience of the mobile terminal user to perform batch cutting of the picture.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the embodiment of the invention solves the problem that the mobile terminal user performs too much cumbersome process of image cropping and image batch cutting operation, and improves the convenience of the mobile terminal user to perform image cropping and image batch cutting.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种基于压力感应技术的图片裁剪方法和装置,其方法包括:响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从浏览图片中选择的第一裁剪图片(S1);在接收到第一裁剪图片上的手势操作指令时,判断手势操作指令是否匹配预设的裁剪操作(S2);若手势操作指令匹配预设的裁剪操作,则对第一裁剪图片进行相应的裁剪处理(S3);此外,还包括对第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理。

Description

图片裁剪方法和装置 技术领域
本申请涉及但不限于移动终端技术领域。
背景技术
随着通信技术的发展,电子触摸技术已发展为人机交互最简单和最直接的方式,目前已有大量的手机、智能设备和移动终端等都已经使用触摸屏来进行交互,触摸屏的应用使用户能够方便地在手机、智能设备和移动终端上进行图像编辑。
在相关技术的手机中已经存在图片裁剪方案,相关技术的图片裁剪方案主要是通过:首先,点击目标图片以显示操作菜单;然后,点击操作菜单并在操作菜单中点选编辑按钮进入编辑模式;然后,在编辑模式下点选裁剪按钮进行裁剪操作;最后,在完成裁剪操作后点击保存按钮,对图片进行保存。相关技术的触摸屏触发机制是靠电容屏实现,每次只能进行单一的操作。由于这样的限制,使得图片裁剪的过程复杂、繁琐,不利于用户操作。另外,如果需要对多张图片进行相同的裁剪处理,也需要对每张图片进行同样的操作,操作比较繁琐而且耗时,造成了不良的用户体验。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本文提出一种基于压力感应技术的图片裁剪方法和装置,旨在提高移动终端用户进行图片裁剪和图片批量裁剪的便捷性。
一种图片裁剪方法,包括:
响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从所述浏览图片中选择的第一裁剪图片;
在接收到所述第一裁剪图片上的手势操作指令时,判断所述手势操作指 令是否匹配预设的裁剪操作;
若所述手势操作指令匹配预设的裁剪操作,则对所述第一裁剪图片进行相应的裁剪处理。
可选地,所述对所述第一裁剪图片进行相应的裁剪处理的步骤包括:
当所述手势操作为双指重压操作时,从所述双指重压操作中获取双指位置信息;
根据所述双指位置信息,在所述第一裁剪图片上显示一预设的裁剪框;
根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;
保存裁剪后的第一裁剪图片。
可选地,所述对所述第一裁剪图片进行相应的裁剪处理的步骤包括:
当所述手势操作为滑动操作时,从所述滑动操作中获取滑动轨迹信息;
将所述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框;
根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;;
保存裁剪后的第一裁剪图片。
可选地,在对所述第一裁剪图片进行裁剪的步骤之前还包括:
在接收到用户对裁剪框的拖动操作指令时,根据所述拖动操作指令对所述裁剪框的位置和大小进行调整。
可选地,所述若所述手势操作指令匹配预设的裁剪操作,则对所述第一裁剪图片进行相应的裁剪处理的步骤之后还包括:
当再次接收到用户的手势操作指令时,获取用户在所述浏览图片中选择的第二裁剪图片;所述再次接收到的手势操作指令中的手势操作包括三指重压操作;
对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理。
可选地,所述对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理的步骤包括:
获取所述裁剪框的数据,所述裁剪框的数据包括裁剪框的左上顶点坐标和裁剪框的宽高信息;
获取所述第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息;
根据所述第一裁剪图片的位置信息和第二裁剪图片的位置信息,以及所述裁剪框的数据,对所述第一裁剪图片和所述第二裁剪图片之间的所有图片进行相同的裁剪。
一种图片裁剪装置所述装置包括:
第一获取模块,设置为:响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从所述浏览图片中选择的第一裁剪图片;
判断模块,设置为:在接收到所述第一裁剪图片上的手势操作指令时,判断所述手势操作指令是否匹配预设的裁剪操作;
裁剪模块,设置为:若所述手势操作指令匹配预设的裁剪操作,则对所述第一裁剪图片进行相应的裁剪处理。
可选地,所述裁剪模块,是设置为:当所述手势操作为双指重压操作时,从所述双指重压操作中获取双指位置信息;根据所述双指位置信息,在所述第一裁剪图片上显示一预设的裁剪框;根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;保存裁剪后的第一裁剪图片。
可选地,所述裁剪模块,是设置为:当所述手势操作为滑动操作时,从所述滑动操作中获取滑动轨迹信息;将所述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框;根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;保存裁剪后的第一裁剪图片。
可选地,所述裁剪模块,还设置为:在接收到用户对裁剪框的拖动操作指令时,根据所述拖动操作指令对所述裁剪框的位置和大小进行调整。
可选地,所述装置还包括:
第二获取模块,设置为:当再次接收到用户的手势操作指令时,获取用户在所述浏览图片中选择的第二裁剪图片;所述再次接收到的手势操作指令中的手势操作包括三指重压操作;
批量裁剪模块,设置为:对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理。
可选地,所述批量裁剪模块,是设置为:获取所述裁剪框的数据,所述裁剪框的数据包括裁剪框的左上顶点坐标和裁剪框的宽高信息;获取所述第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息;根据所述第一裁剪图片的位置信息和第二裁剪图片的位置信息,以及所述裁剪框的数据,对所述第一裁剪图片和所述第二裁剪图片之间的所有图片进行相同的裁剪。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一项的方法。
本发明实施例公开了一种基于压力感应技术的图片裁剪方法和装置,通过响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从浏览图片中选择的第一裁剪图片;在接收到第一裁剪图片上的手势操作指令时,判断手势操作指令是否匹配预设的裁剪操作;若手势操作指令匹配预设的裁剪操作,则对第一裁剪图片进行相应的裁剪处理;此外,还通过对第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理,解决了相关技术中移动终端用户进行图片裁剪和图片批量裁剪操作过程过于繁琐的问题。实现了提高移动终端用户进行图片裁剪和图片批量裁剪的便捷性。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1是本发明基于压力感应技术的图片裁剪方法第一实施例的流程示意图;
图2是本发明实施例移动终端屏幕中多图浏览状态的示意图;
图3是本发明实施例移动终端屏幕中单图浏览状态的示意图;
图4是本发明实施例中对所述第一裁剪图片进行相应的裁剪处理的第一种流程示意图;
图5是本发明实施例中对所述第一裁剪图片进行相应的裁剪处理的第二种流程示意图;
图6是本发明实施例中对所述第一裁剪图片进行相应的裁剪处理的第三种流程示意图;
图7是本发明基于压力感应技术的图片裁剪方法第二实施例的流程示意图;
图8是本发明实施例中对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理的一种流程示意图;
图9是本发明基于压力感应技术的图片裁剪装置第一实施例的功能模块示意图;
图10是本发明基于压力感应技术的图片裁剪装置第二实施例的功能模块示意图。
本发明的实施方式
本发明实施例中,响应用户在终端屏幕上的图片浏览指令,响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从浏览图片中选择的第一裁剪图片;在接收到第一裁剪图片上的手势操作指令时,判断手势操作指令是否匹配预设的裁剪操作;若手势操作指令匹配预设的裁剪操作,则对第一裁剪图片进行相应的裁剪处理;此外,还对第一裁剪图片和用户选择的 第二裁剪图片之间的所有图片进行批量裁剪处理。由此,解决了相关技术中移动终端用户进行图片裁剪和图片批量裁剪操作过程过于繁琐的问题。实现了提高移动终端用户进行图片裁剪和图片批量裁剪的便捷性。
如图1所示,本发明第一实施例提出一种基于压力感应技术的图片裁剪方法,包括:
步骤S1,响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从所述浏览图片中选择的第一裁剪图片。
本发明实施例方法的执行主体可以为一种智能手机、平板电脑或移动终端,本实施例以移动终端进行举例,当然也不限定于其他能够实现图片裁剪的便携式设备。
本步骤中,移动终端响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从浏览图片中选择的第一裁剪图片。
其中,参考图2,用户可以在移动终端打开相册,进入多图片浏览状态,此时,用户可以根据需要,从多张图片中选择一张目标图片,将该目标图片作为第一裁剪图片,即第一裁剪图片可以是用户在多图片浏览状态下选择的某一张图片;或者,参考图3,用户还可以在移动终端打开相册进入多图片浏览状态后,选择一张图片进入单图片浏览状态,通过向左或向右滑动选择一张目标图片,将该目标图片作为第一裁剪图片,即第一裁剪图片可以是用户在单图片浏览状态下的当前浏览图片。
步骤S2,在接收到所述第一裁剪图片上的手势操作指令时,判断所述手势操作指令是否匹配预设的裁剪操作。
首先,在成功获取用户从浏览图片中选择的第一裁剪图片后,移动终端接收第一裁剪图片上的手势操作指令,判断手势操作指令是否匹配预设的裁剪操作。
其中,上述手势操作是通过移动终端的压力感应屏进行检测的,压力感应屏能够感知用户手指或者其他接触点的手势操作,本实施例以手指操作为例。其中,手指操作可以是按压操作,也可以是滑动操作,或者其他操作方 式。
其中,按压操作可以根据按压力度进行划分,比如可以分为轻压和重压,或者,还可以根据手指数量进行划分,比如可以分为单指按压和多指按压。而滑动操作,则可以设定不同的滑动轨迹,以匹配裁剪操作。
实际实现时,可以采用如下多种实施方式:
第一种实施方式:
设定手指重压为触发裁剪操作的手势操作指令,其中,手指重压的判断可以采用如下方式:设定按压力度达到预设阈值,则认定为重压。
第二种实施方式:
设定双指按压为触发裁剪操作的手势操作指令,其中,双指按压的判断可以采用如下方式:设定手指与终端屏幕的接触点数量为2,则认定为双指按压。
第三种实施方式:
设定与预设的滑动轨迹相匹配的手指滑动为触发裁剪操作的手势操作指令,其中,手指滑动的判断可以采用如下方式:将用户的手指滑动轨迹与预设的滑动轨迹进行对比,若滑动轨迹与预设的滑动轨迹相似或相同,则认定该手指滑动与预设的滑动轨迹相匹配。
第四种实施方式:
设定双指重压为触发裁剪操作的手势操作指令,其中,双指重压的判断可以采用如下方式:设定按压力度达到预设阈值,且手指与终端屏幕的接触点数量为2,则认定为双指按压。
第五种实施方式:
设定与预设的滑动轨迹相匹配的双指滑动为触发裁剪操作的手势操作指令,其中,双指滑动的判断可以采用如下方式:将用户的手指滑动轨迹与预设的滑动轨迹进行对比,若滑动轨迹与预设的滑动轨迹相似或相同,且手指与终端屏幕的接触点数量为2,则认定该双指滑动与预设的滑动轨迹相匹配。
步骤S3,若所述手势操作指令匹配预设的裁剪操作,则对所述第一裁剪图片进行相应的裁剪处理。
其中,在判断手势操作指令是否匹配预设的裁剪操作后,若上述手势操作指令匹配预设的裁剪操作,则移动终端对上述第一裁剪图片进行相应的裁剪处理。
以双指重压操作为例,当所述手势操作为双指重压操作时,移动终端对上述第一裁剪图片进行相应的裁剪处理,该过程包括:
首先,移动终端根据上述双指重压操作,获取双指按压在终端屏幕上的坐标,该坐标包括横坐标和纵坐标。
然后,移动终端根据上述双指重压操作获取的双指按压位置的坐标,将预设的裁剪框对顶点坐标设置为上述双指按压位置的坐标,此时,裁剪框定位并显示在以双指按压位置为对角线的矩形上。
其中,作为一种特殊情况,当双指按压位置的坐标的横坐标相同或纵坐标相同时,将裁剪框定位并显示在以双指按压位置连成的直线为对称轴的轴对称矩形上。
然后,移动终端根据上述成功定位并显示的裁剪框,对上述第一裁剪图片进行裁剪,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在显示裁剪框时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在显示裁剪框后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在显示裁剪框后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
最后,移动终端对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
作为另一种实施方式,当所述手势操作为滑动操作时,移动终端对上述第一裁剪图片进行相应的裁剪处理的过程可以包括:
首先,移动终端从所述滑动操作中获取滑动轨迹信息,该滑动轨迹为用户在终端屏幕上使用手指进行滑动操作的轨迹,可以是单指滑动轨迹,也可以是多指滑动轨迹。
然后,移动终端将上述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若上述滑动轨迹信息与用户预设的滑动轨迹成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框。
其中,用户预设的滑动轨迹可以是单指滑动轨迹,也可以是多指滑动轨迹;上述在第一裁剪图片上显示的裁剪框,可以是用户预先设定的,也可以是系统预先设定的。
然后,移动终端根据上述裁剪框,对上述第一裁剪图片进行裁剪,实际 实现时,可以采用如下多种实施方式:
第一种实施方式:
在显示裁剪框时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在显示裁剪框后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在显示裁剪框后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
最后,移动终端对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
通过上述方案,本发明实施例提供了一种简化图片裁剪操作的方法,提高了移动终端用户进行图片裁剪的便捷性。
为了更好地提高用户进行图片裁剪的便捷性,参照图4,为本发明实施方式中对所述第一裁剪图片进行相应的裁剪处理的步骤的第一种流程示意图。
作为一种实施方式,上述步骤S3包括:
步骤S31,当所述手势操作为双指重压操作时,从所述双指重压操作中获取双指位置信息。
当用户的手势操作为双指重压操作时,移动终端从双指重压操作中获取双指位置信息。
其中,移动终端根据上述双指重压操作,获取双指按压在移动终端屏幕上的坐标,该坐标包括横坐标和纵坐标。
步骤S32,根据所述双指位置信息,在所述第一裁剪图片上显示一预设的裁剪框。
其中,在成功获取双指位置信息后,移动终端根据双指位置信息,对预设的裁剪框进行定位,然后在第一裁剪图片上显示该裁剪框。
其中,移动终端根据上述双指重压操作获取的双指按压位置的坐标,将预设的裁剪框对顶点坐标设置为上述双指按压位置的坐标,此时,裁剪框定位并显示在以双指按压位置为对角线的矩形上。
其中,作为一种特殊情况,当双指按压位置的坐标的横坐标相同或纵坐标相同时,将裁剪框定位并显示在以双指按压位置连成的直线为对称轴的轴对称矩形上。
步骤S33,根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪。
在成功对裁剪框进行定位和显示后,移动终端根据该裁剪框,对上述第一裁剪图片进行裁剪;或者,在接收到用户的裁剪确认指令后,根据该裁剪 框,对上述第一裁剪图片进行裁剪。
其中,对上述第一裁剪图片进行裁剪,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在显示裁剪框时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在显示裁剪框后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在显示裁剪框后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
步骤S34,保存裁剪后的第一裁剪图片。
在成功对第一裁剪图片进行裁剪后,移动终端保存裁剪后的第一裁剪图片。
其中,移动终端对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
通过上述方案,本发明实施例提供了一种简化图片裁剪操作的方法,提高了移动终端用户进行图片裁剪的便捷性。
为了更好地提高用户进行图片裁剪的便捷性,参照图5,为本发明实施方式中对所述第一裁剪图片进行相应的裁剪处理的步骤的第二种流程示意图。
作为另一种实施方式,上述步骤S3还包括:
步骤S35,当所述手势操作为滑动操作时,从所述滑动操作中获取滑动轨迹信息。
其中,当用户的手势操作为滑动操作时,移动终端从滑动操作中获取滑动轨迹信息。
其中,从所述滑动操作中获取的滑动轨迹,为用户在终端屏幕上使用手指进行滑动操作的轨迹,可以是单指滑动轨迹,也可以是多指滑动轨迹。
步骤S36,将所述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框。
在成功从滑动操作中获取滑动轨迹信息后,移动终端将上述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若上述滑动轨迹信息与用户预设的滑动轨迹成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框。
其中,用户预设的滑动轨迹可以是单指滑动轨迹,也可以是多指滑动轨迹;上述在第一裁剪图片上显示的裁剪框,可以是用户预先设定的,也可以是系统预先设定的。
步骤S33,根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行 裁剪。
其中,在成功对裁剪框进行显示后,移动终端根据该裁剪框,对上述第一裁剪图片进行裁剪;或者,在接收到用户的裁剪确认指令后,根据该裁剪框,对上述第一裁剪图片进行裁剪。
其中,对上述第一裁剪图片进行裁剪,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在显示裁剪框时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在显示裁剪框后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在显示裁剪框后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
步骤S34,保存裁剪后的第一裁剪图片。
其中,在成功对第一裁剪图片进行裁剪后,移动终端保存裁剪后的第一裁剪图片。
其中,移动终端对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或 系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
通过上述方案,本发明实施例提供了一种简化图片裁剪操作的方法,提高了移动终端用户进行图片裁剪的便捷性。
为了更好地提高用户进行图片裁剪的便捷性,参照图6,为本发明实施方式中对所述第一裁剪图片进行相应的裁剪处理的步骤的第三种流程示意图。
作为另一种实施方式,在上述步骤S33之前,还可以包括:
步骤S37,在接收到用户对裁剪框的拖动操作指令时,根据所述拖动操作指令对所述裁剪框的位置和大小进行调整。
其中,在成功对裁剪框进行显示后,移动终端接收用户对裁剪框的拖动操作指令,根据拖动操作指令对裁剪框的位置和大小进行调整。
其中,上述用户对裁剪框的拖动操作中,对裁剪框的调整操作,可以是用户使用单指拖动裁剪框的边框或顶角;还可以是用户使用多指拖动裁剪框的边框或顶角;还可以是用户选择系统预先设定的不同大小的裁剪框。
步骤S33,根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪。
其中,在成功对裁剪框进行显示后,移动终端根据该裁剪框,对上述第一裁剪图片进行裁剪;或者,在接收到用户的裁剪确认指令后,根据该裁剪框,对上述第一裁剪图片进行裁剪。
其中,对上述第一裁剪图片进行裁剪,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成裁剪框的调整时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在完成裁剪框的调整后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在完成裁剪框的调整后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
步骤S34,保存裁剪后的第一裁剪图片。
其中,在成功对第一裁剪图片进行裁剪后,移动终端保存裁剪后的第一裁剪图片。
其中,移动终端对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指 令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
通过上述方案,本发明实施例提供了一种简化图片裁剪操作的方法,提高了移动终端用户进行图片裁剪的便捷性。
如图7所示,本发明第二实施例提出一种基于压力感应技术的图片裁剪方法,在基于图1所示的步骤S3之后,还包括:
步骤S4,当再次接收到用户的手势操作指令时,获取用户在所述浏览图片中选择的第二裁剪图片;所述再次接收到的手势操作指令中的手势操作包括三指重压操作。
其中,当再次接收到用户的手势操作指令时,移动终端获取用户在浏览图片中选择的第二裁剪图片。
其中,上述再次接收到的手势操作指令中的手势操作包括但不限于三指重压操作,当接收三指重压操作时,移动终端的显示界面返回多图片浏览状态,此时用户可以根据需要,从多张图片中选择一张目标图片,将该目标图片作为第二裁剪图片;或者,移动终端的显示界面返回多图片浏览状态后,用户选择一张图片进入单图片浏览状态,通过向左或向右滑动选择一张目标图片,将该目标图片作为第二裁剪图片。
步骤S5,对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理。
首先,在成功获取获取用户在浏览图片中选择的第二裁剪图片后,移动终端获取对第一裁剪图片进行裁剪时的裁剪框的数据。
其中,上述裁剪框数据包括裁剪框左上顶点坐标和裁剪框宽高信息,以如下所示的数据结构进行保存:
cutFragmentDate{
float xPoint;//左上顶点x坐标
float yPoint;//左上顶点y坐标
float fragmentWide;//裁剪框宽度
float fragmentHight};//裁剪框高度
在成功获取上述裁剪框的数据后,移动终端获取第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息。
其中,移动终端获取第一裁剪图片在多图片浏览状态下的位置信息,包括行信息和列信息,用(m1,n1)表示第一裁剪图片的行信息与列信息;获取第二裁剪图片在多图片浏览状态下的位置信息,包括行信息和列信息,用(m2,n2)表示第二裁剪图片的行信息与列信息,这里的行和列均从0开始计数。同时,假设在多图片浏览状态下,每行有w张预览图片。
在成功获取第一裁剪图片以及第二裁剪图片在浏览状态下的位置信息后,移动终端根据第一裁剪图片和第二裁剪图片的位置信息,以及上述裁剪框的数据,对第一裁剪图片和第二裁剪图片之间的所有图片进行相同的裁剪。
其中,上述第一裁剪图片和第二裁剪图片之间的所有图片包括了第一裁剪图片和第二裁剪图片。
其中,对第一裁剪图片和第二裁剪图片之间的所有图片的批量裁剪过程为:
a.先确定包括第一裁剪图片和第二裁剪图片在内的所有第一裁剪图片和第二裁剪图片之间的图片个数。个数为:w-n1+n2+1+(m2-m1-1)*w,化简为:(m2-m1)*w+n2-n1+1;
b.针对其中每一个照片,直接进入裁剪模式;
c.针对每张照片,导入已经保存的裁剪框数据cutFragmentDate,然后按照此数据生成裁剪框。保持左上顶点及裁剪框的宽高与用户手动选择的一致;
d.裁剪图片保存;
e.开始下一张图片,返回b处处重新执行,直到包括第一裁剪图片和第二裁剪图片在内的所有第一裁剪图片和第二裁剪图片之间的图片全部裁剪完成。
通过上述方案,本发明实施例提供了一种用户进行图片裁剪操作过程中的批量裁剪方法,提高移动终端或移动终端用户进行图片批量裁剪的便捷性。
为了更好地提高用户进行图片批量裁剪的便捷性,参照图8,为本发明实际实施方式中对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理的一种流程示意图。
作为一种实施方式,上述步骤S5包括:
步骤S51,获取所述裁剪框的数据,所述裁剪框的数据包括裁剪框的左上顶点坐标和裁剪框的宽高信息。
其中,在成功获取获取用户在浏览图片中选择的第二裁剪图片后,移动终端获取对第一裁剪图片进行裁剪时的裁剪框的数据。
其中,上述裁剪框数据包括裁剪框左上顶点坐标和裁剪框宽高信息,以如下所示的数据结构进行保存:
cutFragmentDate{
float xPoint;//左上顶点x坐标
float yPoint;//左上顶点y坐标
float fragmentWide;//裁剪框宽度
float fragmentHight};//裁剪框高度
步骤S52,获取所述第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息。
其中,在成功获取上述裁剪框的数据后,移动终端获取第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息。
其中,移动终端获取第一裁剪图片在多图片浏览状态下的位置信息,包括行信息和列信息,用(m1,n1)表示第一裁剪图片的行信息与列信息;获取第二裁剪图片在多图片浏览状态下的位置信息,包括行信息和列信息,用(m2,n2)表示第二裁剪图片的行信息与列信息,这里的行和列均从0开始计数。同时,假设在多图片浏览状态下,每行有w张预览图片。
步骤S53,根据所述第一裁剪图片的位置信息和第二裁剪图片的位置信息,以及所述裁剪框的数据,对所述第一裁剪图片和所述第二裁剪图片之间的所有图片进行相同的裁剪。
在成功获取第一裁剪图片以及第二裁剪图片在浏览状态下的位置信息后,移动终端根据第一裁剪图片和第二裁剪图片的位置信息,以及上述裁剪框的数据,对第一裁剪图片和第二裁剪图片之间的所有图片进行相同的裁剪。
其中,上述第一裁剪图片和第二裁剪图片之间的所有图片包括了第一裁剪图片和第二裁剪图片。
其中,对第一裁剪图片和第二裁剪图片之间的所有图片的批量裁剪过程为:
a.先确定包括第一裁剪图片和第二裁剪图片在内的所有第一裁剪图片和第二裁剪图片之间的图片个数。个数为:w-n1+n2+1+(m2-m1-1)*w,化简为:(m2-m1)*w+n2-n1+1;
b.针对其中每一个照片,直接进入裁剪模式;
c.针对每张照片,导入已经保存的裁剪框数据cutFragmentDate,然后按照此数据生成裁剪框。保持左上顶点及裁剪框的宽高与用户手动选择的一致;
d.裁剪图片保存;
e.开始下一张图片,返回b处处重新执行,直到包括第一裁剪图片和第二裁剪图片在内的所有第一裁剪图片和第二裁剪图片之间的图片全部裁剪完 成。
通过上述方案,本发明实施例提供了一种用户进行图片裁剪操作过程中的批量裁剪方法,提高移动终端或移动终端用户进行图片批量裁剪的便捷性。
如图9所示,本发明第一实施例提出一种基于压力感应技术的图片裁剪装置,包括:
第一获取模块100,设置为:响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从所述浏览图片中选择的第一裁剪图片。
本发明实施例装置可以为一种智能手机、平板电脑或移动终端,本实施例以移动终端进行举例,当然也不限定于其他能够实现图片裁剪的便携式设备。
第一获取模块100响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从浏览图片中选择的第一裁剪图片。
其中,参考图2,用户可以在移动终端打开相册,进入多图片浏览状态,此时,用户可以根据需要,从多张图片中选择一张目标图片,将该目标图片作为第一裁剪图片,即第一裁剪图片可以是用户在多图片浏览状态下选择的某一张图片;或者,参考图3,用户还可以在移动终端打开相册进入多图片浏览状态后,选择一张图片进入单图片浏览状态,通过向左或向右滑动选择一张目标图片,将该目标图片作为第一裁剪图片,即第一裁剪图片可以是用户在单图片浏览状态下的当前浏览图片。
判断模块200,设置为:在接收到所述第一裁剪图片上的手势操作指令时,判断所述手势操作指令是否匹配预设的裁剪操作。
首先,在成功获取用户从浏览图片中选择的第一裁剪图片后,判断模块200接收第一裁剪图片上的手势操作指令,判断手势操作指令是否匹配预设的裁剪操作。
其中,上述手势操作是通过移动终端的压力感应屏进行检测的,压力感应屏能够感知用户手指或者其他接触点的手势操作,本实施例以手指操作为 例。其中,手指操作可以是按压操作,也可以是滑动操作,或者其他操作方式。
其中,按压操作可以根据按压力度进行划分,比如可以分为轻压和重压,或者,还可以根据手指数量进行划分,比如可以分为单指按压和多指按压。而滑动操作,则可以设定不同的滑动轨迹,以匹配裁剪操作。
实际实现时,可以采用如下多种实施方式:
第一种实施方式:
设定手指重压为触发裁剪操作的手势操作指令,其中,手指重压的判断可以采用如下方式:设定按压力度达到预设阈值,则认定为重压。
第二种实施方式:
设定双指按压为触发裁剪操作的手势操作指令,其中,双指按压的判断可以采用如下方式:设定手指与终端屏幕的接触点数量为2,则认定为双指按压。
第三种实施方式:
设定与预设的滑动轨迹相匹配的手指滑动为触发裁剪操作的手势操作指令,其中,手指滑动的判断可以采用如下方式:将用户的手指滑动轨迹与预设的滑动轨迹进行对比,若滑动轨迹与预设的滑动轨迹相似或相同,则认定该手指滑动与预设的滑动轨迹相匹配。
第四种实施方式:
设定双指重压为触发裁剪操作的手势操作指令,其中,双指重压的判断可以采用如下方式:设定按压力度达到预设阈值,且手指与终端屏幕的接触点数量为2,则认定为双指按压。
第五种实施方式:
设定与预设的滑动轨迹相匹配的双指滑动为触发裁剪操作的手势操作指令,其中,双指滑动的判断可以采用如下方式:将用户的手指滑动轨迹与预设的滑动轨迹进行对比,若滑动轨迹与预设的滑动轨迹相似或相同,且手指与终端屏幕的接触点数量为2,则认定该双指滑动与预设的滑动轨迹相匹配。
裁剪模块300,设置为:若所述手势操作指令匹配预设的裁剪操作,则对所述第一裁剪图片进行相应的裁剪处理。
其中,在判断手势操作指令是否匹配预设的裁剪操作后,若上述手势操作指令匹配预设的裁剪操作,则裁剪模块300对上述第一裁剪图片进行相应的裁剪处理。
当所述手势操作为双指重压操作时,裁剪模块300对上述第一裁剪图片进行相应的裁剪处理,该过程包括:
首先,裁剪模块300根据上述双指重压操作,获取双指按压在终端屏幕上的坐标,该坐标包括横坐标和纵坐标。
然后,裁剪模块300根据上述双指重压操作获取的双指按压位置的坐标,将预设的裁剪框对顶点坐标设置为上述双指按压位置的坐标,此时,裁剪框定位并显示在以双指按压位置为对角线的矩形上。
其中,作为一种特殊情况,当双指按压位置的坐标的横坐标相同或纵坐标相同时,将裁剪框定位并显示在以双指按压位置连成的直线为对称轴的轴对称矩形上。
然后,裁剪模块300根据上述成功定位并显示的裁剪框,对上述第一裁剪图片进行裁剪,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在显示裁剪框时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在显示裁剪框后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在显示裁剪框后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
最后,裁剪模块300对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
另外,当所述手势操作为滑动操作时,裁剪模块300也对上述第一裁剪图片进行相应的裁剪处理,该过程包括:
首先,裁剪模块300从所述滑动操作中获取滑动轨迹信息,该滑动轨迹为用户在终端屏幕上使用手指进行滑动操作的轨迹,可以是单指滑动轨迹,也可以是多指滑动轨迹。
然后,裁剪模块300将上述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若上述滑动轨迹信息与用户预设的滑动轨迹成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框。
其中,用户预设的滑动轨迹可以是单指滑动轨迹,也可以是多指滑动轨迹;上述在第一裁剪图片上显示的裁剪框,可以是用户预先设定的,也可以是系统预先设定的。
然后,裁剪模块300根据上述裁剪框,对上述第一裁剪图片进行裁剪, 实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在显示裁剪框时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在显示裁剪框后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在显示裁剪框后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
最后,裁剪模块300对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
通过上述方案,本发明实施例提供了一种简化图片裁剪操作的装置,提高了移动终端用户进行图片裁剪的便捷性。
为了更好地提高用户进行图片裁剪的便捷性,作为第一种实施方式,所述裁剪模块300,是设置为:当所述手势操作为双指重压操作时,从所述双指重压操作中获取双指位置信息;根据所述双指位置信息,在所述第一裁剪图片上显示一预设的裁剪框;根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;保存裁剪后的第一裁剪图片。
首先,当用户的手势操作为双指重压操作时,裁剪模块300从双指重压操作中获取双指位置信息。
其中,裁剪模块300根据上述双指重压操作,获取双指按压在移动终端屏幕上的坐标,该坐标包括横坐标和纵坐标。
在成功获取双指位置信息后,裁剪模块300根据双指位置信息,对预设的裁剪框进行定位,然后在第一裁剪图片上显示该裁剪框。
其中,裁剪模块300根据上述双指重压操作获取的双指按压位置的坐标,将预设的裁剪框对顶点坐标设置为上述双指按压位置的坐标,此时,裁剪框定位并显示在以双指按压位置为对角线的矩形上。
其中,作为一种特殊情况,当双指按压位置的坐标的横坐标相同或纵坐标相同时,将裁剪框定位并显示在以双指按压位置连成的直线为对称轴的轴对称矩形上。
在成功对裁剪框进行定位和显示后,根据该裁剪框,裁剪模块300对上述第一裁剪图片进行裁剪;或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪。
其中,对上述第一裁剪图片进行裁剪,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在显示裁剪框时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在显示裁剪框后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在显示裁剪框后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
在成功对第一裁剪图片进行裁剪后,裁剪模块300保存裁剪后的第一裁剪图片。
其中,移动终端对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
通过上述方案,本发明实施例提供了一种简化图片裁剪操作的装置,提高了移动终端用户进行图片裁剪的便捷性。
为了更好地提高用户进行图片裁剪的便捷性,作为第二种实施方式,所述裁剪模块300,是设置为:当所述手势操作为滑动操作时,从所述滑动操作中获取滑动轨迹信息;将所述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框。
首先,当用户的手势操作为滑动操作时,裁剪模块300从滑动操作中获取滑动轨迹信息。
其中,从所述滑动操作中获取的滑动轨迹,为用户在终端屏幕上使用手指进行滑动操作的轨迹,可以是单指滑动轨迹,也可以是多指滑动轨迹。
在成功从滑动操作中获取滑动轨迹信息后,裁剪模块300将上述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若上述滑动轨迹信息与用户预设的滑动轨迹成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框。
其中,用户预设的滑动轨迹可以是单指滑动轨迹,也可以是多指滑动轨迹;上述在第一裁剪图片上显示的裁剪框,可以是用户预先设定的,也可以是系统预先设定的。
在成功对裁剪框进行显示后,裁剪模块300根据该裁剪框,对上述第一裁剪图片进行裁剪;或者,在接收到用户的裁剪确认指令后,根据该裁剪框,对上述第一裁剪图片进行裁剪。
其中,对上述第一裁剪图片进行裁剪,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在显示裁剪框时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在显示裁剪框后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在显示裁剪框后,当接收到用户的确认裁剪指令时,对上述第一裁剪图 片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
在成功对第一裁剪图片进行裁剪后,裁剪模块300保存裁剪后的第一裁剪图片。
其中,移动终端对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
通过上述方案,本发明实施例提供了一种简化图片裁剪操作的装置,提高了移动终端用户进行图片裁剪的便捷性。
为了更好地提高用户进行图片裁剪的便捷性,作为第三种实施方式,所述裁剪模块300,还设置为:在接收到用户对裁剪框的拖动操作指令时,根据所述拖动操作指令对所述裁剪框的位置和大小进行调整。
首先,在成功对裁剪框进行显示后,裁剪模块300接收用户对裁剪框的 拖动操作指令,根据拖动操作指令对裁剪框的位置和大小进行调整。
其中,上述用户对裁剪框的拖动操作中,对裁剪框的调整操作,可以是用户使用单指拖动裁剪框的边框或顶角;还可以是用户使用多指拖动裁剪框的边框或顶角;还可以是用户选择系统预先设定的多种大小的裁剪框。
在成功对裁剪框进行显示后,裁剪模块300根据该裁剪框,对上述第一裁剪图片进行裁剪;或者,在接收到用户的裁剪确认指令后,根据该裁剪框,对上述第一裁剪图片进行裁剪。
其中,对上述第一裁剪图片进行裁剪,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成裁剪框的调整时,立即对上述第一裁剪图片执行裁剪动作。
第二种实施方式:
在完成裁剪框的调整后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对上述第一裁剪图片执行裁剪动作。
第三种实施方式:
在完成裁剪框的调整后,当接收到用户的确认裁剪指令时,对上述第一裁剪图片执行裁剪动作,其中,确认裁剪指令可以是在用户按下确认裁剪按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
成功对第一裁剪图片进行裁剪后,裁剪模块300保存裁剪后的第一裁剪图片。
其中,移动终端对裁剪后的第一裁剪图片进行保存,实际实现时,可以采用如下多种实施方式:
第一种实施方式:
在完成对上述第一裁剪图片的裁剪动作时,立即对裁剪后的第一裁剪图片进行保存。
第二种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,根据用户预先设定的时间或系统预先设定的时间,在经过该预设时间后,对裁剪后的第一裁剪图片进行保存。
第三种实施方式:
在完成对上述第一裁剪图片的裁剪动作后,当接收到用户的确认保存指令时,对裁剪后的第一裁剪图片进行保存。其中,确认保存指令可以是在用户按下确认保存按钮后发送的;也可以是在用户进行单指重压操作或多指重压操作后发送的;还可以是在用户进行与预设滑动轨迹相匹配的单指滑动操作或多指滑动操作后发送的。
通过上述方案,本发明实施例提供了一种简化图片裁剪操作的装置,提高了移动终端用户进行图片裁剪的便捷性。
如图10所示,本发明第二实施例提出一种基于压力感应技术的图片裁剪装置,在如图9所示装置的基础上,该装置还包括:
第二获取模块400,设置为:当再次接收到用户的手势操作指令时,获取用户在所述浏览图片中选择的第二裁剪图片;所述再次接收到的手势操作指令中的手势操作包括三指重压操作;
其中,当再次接收到用户的手势操作指令时,第二获取模块400获取用户在浏览图片中选择的第二裁剪图片。
其中,上述再次接收到的手势操作指令中的手势操作包括但不限于三指重压操作,当接收三指重压操作时,移动终端的显示界面返回多图片浏览状态,此时用户可以根据需要,从多张图片中选择一张目标图片,将该目标图片作为第二裁剪图片;或者,移动终端的显示界面返回多图片浏览状态后,用户选择一张图片进入单图片浏览状态,通过向左或向右滑动选择一张目标图片,将该目标图片作为第二裁剪图片。
批量裁剪模块500,设置为:对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理。
首先,在成功获取获取用户在浏览图片中选择的第二裁剪图片后,批量裁剪模块500获取对第一裁剪图片进行裁剪时的裁剪框的数据。
其中,上述裁剪框数据包括裁剪框左上顶点坐标和裁剪框宽高信息,以如下所示的数据结构进行保存:
cutFragmentDate{
float xPoint;//左上顶点x坐标
float yPoint;//左上顶点y坐标
float fragmentWide;//裁剪框宽度
float fragmentHight};//裁剪框高度
在成功获取上述裁剪框的数据后,批量裁剪模块500获取第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息。
其中,批量裁剪模块500获取第一裁剪图片在多图片浏览状态下的位置信息,包括行信息和列信息,用(m1,n1)表示第一裁剪图片的行信息与列信息;获取第二裁剪图片在多图片浏览状态下的位置信息,包括行信息和列信息,用(m2,n2)表示第二裁剪图片的行信息与列信息,这里的行和列均从0开始计数。同时,假设在多图片浏览状态下,每行有w张预览图片。
在成功获取第一裁剪图片以及第二裁剪图片在浏览状态下的位置信息后,批量裁剪模块500根据第一裁剪图片和第二裁剪图片的位置信息,以及上述裁剪框的数据,对第一裁剪图片和第二裁剪图片之间的所有图片进行相同的裁剪。
其中,上述第一裁剪图片和第二裁剪图片之间的所有图片包括了第一裁剪图片和第二裁剪图片。
其中,对第一裁剪图片和第二裁剪图片之间的所有图片的批量裁剪过程为:
a.先确定包括第一裁剪图片和第二裁剪图片在内的所有第一裁剪图片和 第二裁剪图片之间的图片个数。个数为:w-n1+n2+1+(m2-m1-1)*w,化简为:(m2-m1)*w+n2-n1+1;
b.针对其中每一个照片,直接进入裁剪模式;
c.针对每张照片,导入已经保存的裁剪框数据cutFragmentDate,然后按照此数据生成裁剪框。保持左上顶点及裁剪框的宽高与用户手动选择的一致;
d.裁剪图片保存;
e.开始下一张图片,返回b处处重新执行,直到包括第一裁剪图片和第二裁剪图片在内的所有第一裁剪图片和第二裁剪图片之间的图片全部裁剪完成。
通过上述方案,本发明实施例提供了一种用户进行图片裁剪操作过程中的批量裁剪装置,提高移动终端用户进行图片批量裁剪的便捷性。
为了更好地提高用户进行图片批量裁剪的便捷性,作为一种实施方式,所述批量裁剪模块500,是设置为:获取所述裁剪框的数据,所述裁剪框的数据包括裁剪框的左上顶点坐标和裁剪框的宽高信息;获取所述第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息;根据所述第一裁剪图片的位置信息和第二裁剪图片的位置信息,以及所述裁剪框的数据,对所述第一裁剪图片和所述第二裁剪图片之间的所有图片进行相同的裁剪。
首先,在成功获取获取用户在浏览图片中选择的第二裁剪图片后,批量裁剪模块500获取对第一裁剪图片进行裁剪时的裁剪框的数据。
其中,上述裁剪框数据包括裁剪框左上顶点坐标和裁剪框宽高信息,以如下所示的数据结构进行保存:
cutFragmentDate{
float xPoint;//左上顶点x坐标
float yPoint;//左上顶点y坐标
float fragmentWide;//裁剪框宽度
float fragmentHight};//裁剪框高度
在成功获取上述裁剪框的数据后,批量裁剪模块500获取第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息。
其中,批量裁剪模块500获取第一裁剪图片在多图片浏览状态下的位置信息,包括行信息和列信息,用(m1,n1)表示第一裁剪图片的行信息与列信息;获取第二裁剪图片在多图片浏览状态下的位置信息,包括行信息和列信息,用(m2,n2)表示第二裁剪图片的行信息与列信息,这里的行和列均从0开始计数。同时,假设在多图片浏览状态下,每行有w张预览图片。
在成功获取第一裁剪图片以及第二裁剪图片在浏览状态下的位置信息后,批量裁剪模块500根据第一裁剪图片和第二裁剪图片的位置信息,以及上述裁剪框的数据,对第一裁剪图片和第二裁剪图片之间的所有图片进行相同的裁剪。
其中,上述第一裁剪图片和第二裁剪图片之间的所有图片包括了第一裁剪图片和第二裁剪图片。
其中,对第一裁剪图片和第二裁剪图片之间的所有图片的批量裁剪过程为:
a.先确定包括第一裁剪图片和第二裁剪图片在内的所有第一裁剪图片和第二裁剪图片之间的图片个数。个数为:w-n1+n2+1+(m2-m1-1)*w,化简为:(m2-m1)*w+n2-n1+1;
b.针对其中每一个照片,直接进入裁剪模式;
c.针对每张照片,导入已经保存的裁剪框数据cutFragmentDate,然后按照此数据生成裁剪框。保持左上顶点及裁剪框的宽高与用户手动选择的一致;
d.裁剪图片保存;
e.开始下一张图片,返回b处处重新执行,直到包括第一裁剪图片和第二裁剪图片在内的所有第一裁剪图片和第二裁剪图片之间的图片全部裁剪完成。
通过上述方案,本发明实施例提供了一种用户进行图片裁剪操作过程中的批量裁剪装置,提高移动终端用户进行图片批量裁剪的便捷性。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
本发明实施例解决了移动终端用户进行图片裁剪和图片批量裁剪操作过程过于繁琐的问题,提高了移动终端用户进行图片裁剪和图片批量裁剪的便捷性。

Claims (13)

  1. 一种图片裁剪方法,所述方法包括:
    响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从所述浏览图片中选择的第一裁剪图片;
    在接收到所述第一裁剪图片上的手势操作指令时,判断所述手势操作指令是否匹配预设的裁剪操作;
    若所述手势操作指令匹配预设的裁剪操作,则对所述第一裁剪图片进行相应的裁剪处理。
  2. 根据权利要求1所述的方法,其中,所述对所述第一裁剪图片进行相应的裁剪处理的步骤包括:
    当所述手势操作为双指重压操作时,从所述双指重压操作中获取双指位置信息;
    根据所述双指位置信息,在所述第一裁剪图片上显示一预设的裁剪框;
    根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;
    保存裁剪后的第一裁剪图片。
  3. 根据权利要求1所述的方法,其中,所述对所述第一裁剪图片进行相应的裁剪处理的步骤包括:
    当所述手势操作为滑动操作时,从所述滑动操作中获取滑动轨迹信息;
    将所述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框;
    根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;
    保存裁剪后的第一裁剪图片。
  4. 根据权利要求2或3所述的方法,其中,在对所述第一裁剪图片进行裁剪的步骤之前还包括:
    在接收到用户对裁剪框的拖动操作指令时,根据所述拖动操作指令对所 述裁剪框的位置和大小进行调整。
  5. 根据权利要求1所述的方法,其中,所述若所述手势操作指令匹配预设的裁剪操作,则对所述第一裁剪图片进行相应的裁剪处理的步骤之后还包括:
    当再次接收到用户的手势操作指令时,获取用户在所述浏览图片中选择的第二裁剪图片;所述再次接收到的手势操作指令中的手势操作包括三指重压操作;
    对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理。
  6. 根据权利要求5所述的方法,其中,所述对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理的步骤包括:
    获取所述裁剪框的数据,所述裁剪框的数据包括裁剪框的左上顶点坐标和裁剪框的宽高信息;
    获取所述第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息;
    根据所述第一裁剪图片的位置信息和第二裁剪图片的位置信息,以及所述裁剪框的数据,对所述第一裁剪图片和所述第二裁剪图片之间的所有图片进行相同的裁剪。
  7. 一种图片裁剪装置,所述装置包括:
    第一获取模块,设置为:响应用户在终端屏幕上的图片浏览指令,显示浏览图片,获取用户从所述浏览图片中选择的第一裁剪图片;
    判断模块,设置为:在接收到所述第一裁剪图片上的手势操作指令时,判断所述手势操作指令是否匹配预设的裁剪操作;
    裁剪模块,设置为:若所述手势操作指令匹配预设的裁剪操作,则对所述第一裁剪图片进行相应的裁剪处理。
  8. 根据权利要求7所述的装置,其中,
    所述裁剪模块,是设置为:当所述手势操作为双指重压操作时,从所述 双指重压操作中获取双指位置信息;根据所述双指位置信息,在所述第一裁剪图片上显示一预设的裁剪框;根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;保存裁剪后的第一裁剪图片。
  9. 根据权利要求7所述的装置,其中,
    所述裁剪模块,是设置为:当所述手势操作为滑动操作时,从所述滑动操作中获取滑动轨迹信息;将所述滑动轨迹信息与用户预设的滑动轨迹进行匹配,若成功匹配,则在所述第一裁剪图片上显示一预设的裁剪框;根据所述裁剪框,对所述第一裁剪图片进行裁剪,或者,在接收到用户的裁剪确认指令后,根据所述裁剪框,对所述第一裁剪图片进行裁剪;保存裁剪后的第一裁剪图片。
  10. 根据权利要求8或9所述的装置,其中,
    所述裁剪模块,还设置为:在接收到用户对裁剪框的拖动操作指令时,根据所述拖动操作指令对所述裁剪框的位置和大小进行调整。
  11. 根据权利要求7所述的装置,所述装置还包括:
    第二获取模块,设置为:当再次接收到用户的手势操作指令时,获取用户在所述浏览图片中选择的第二裁剪图片;所述再次接收到的手势操作指令中的手势操作包括三指重压操作;
    批量裁剪模块,设置为:对所述第一裁剪图片和用户选择的第二裁剪图片之间的所有图片进行批量裁剪处理。
  12. 根据权利要求11所述的装置,其中,
    所述批量裁剪模块,是设置为:获取所述裁剪框的数据,所述裁剪框的数据包括裁剪框的左上顶点坐标和裁剪框的宽高信息;获取所述第一裁剪图片在浏览状态下的位置信息,以及第二裁剪图片在浏览状态下的位置信息;根据所述第一裁剪图片的位置信息和第二裁剪图片的位置信息,以及所述裁剪框的数据,对所述第一裁剪图片和所述第二裁剪图片之间的所有图片进行相同的裁剪。
  13. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机 可执行指令用于执行权利要求1-6任一项的方法。
PCT/CN2016/076505 2015-11-25 2016-03-16 图片裁剪方法和装置 WO2016188199A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510831208.2A CN106775342A (zh) 2015-11-25 2015-11-25 基于压力感应技术的图片裁剪方法和装置
CN201510831208.2 2015-11-25

Publications (1)

Publication Number Publication Date
WO2016188199A1 true WO2016188199A1 (zh) 2016-12-01

Family

ID=57392589

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076505 WO2016188199A1 (zh) 2015-11-25 2016-03-16 图片裁剪方法和装置

Country Status (2)

Country Link
CN (1) CN106775342A (zh)
WO (1) WO2016188199A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309233A (zh) * 2020-02-25 2020-06-19 西安闻泰电子科技有限公司 图片处理方法、装置、设备和存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107340909B (zh) * 2017-06-26 2020-07-21 努比亚技术有限公司 一种图像处理方法、设备及计算机可读存储介质
CN108334273B (zh) * 2018-02-09 2020-08-25 网易(杭州)网络有限公司 信息显示方法及装置、存储介质、处理器、终端

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100007675A1 (en) * 2008-07-08 2010-01-14 Kang Seong-Hoon Method and apparatus for editing image using touch interface for mobile device
CN102789444A (zh) * 2011-05-16 2012-11-21 联想(北京)有限公司 一种传输处理方法、装置及电子设备
CN103885623A (zh) * 2012-12-24 2014-06-25 腾讯科技(深圳)有限公司 一种将滑动事件处理成编辑手势的方法、系统及移动终端
CN104216626A (zh) * 2013-06-03 2014-12-17 联想(北京)有限公司 一种图像获取方法及电子设备
CN104932827A (zh) * 2015-06-29 2015-09-23 北京金山安全软件有限公司 一种图片裁剪方法、装置及终端

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646258B (zh) * 2011-02-21 2016-01-06 腾讯科技(深圳)有限公司 图像裁剪方法及系统
CN102156953A (zh) * 2011-03-17 2011-08-17 深圳市五巨科技有限公司 一种实现图片批量处理的方法和装置
CN103037102B (zh) * 2012-12-21 2015-01-07 广东欧珀移动通信有限公司 一种触屏手机的自由截屏方法及手机
CN103747362B (zh) * 2013-12-30 2017-02-08 广州华多网络科技有限公司 一种截取视频片段的方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100007675A1 (en) * 2008-07-08 2010-01-14 Kang Seong-Hoon Method and apparatus for editing image using touch interface for mobile device
CN102789444A (zh) * 2011-05-16 2012-11-21 联想(北京)有限公司 一种传输处理方法、装置及电子设备
CN103885623A (zh) * 2012-12-24 2014-06-25 腾讯科技(深圳)有限公司 一种将滑动事件处理成编辑手势的方法、系统及移动终端
CN104216626A (zh) * 2013-06-03 2014-12-17 联想(北京)有限公司 一种图像获取方法及电子设备
CN104932827A (zh) * 2015-06-29 2015-09-23 北京金山安全软件有限公司 一种图片裁剪方法、装置及终端

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309233A (zh) * 2020-02-25 2020-06-19 西安闻泰电子科技有限公司 图片处理方法、装置、设备和存储介质

Also Published As

Publication number Publication date
CN106775342A (zh) 2017-05-31

Similar Documents

Publication Publication Date Title
US11128802B2 (en) Photographing method and mobile terminal
CN108089788B (zh) 一种缩略图显示控制方法及移动终端
US20180077361A1 (en) Method and apparatus for creating motion effect for image
EP3547218B1 (en) File processing device and method, and graphical user interface
US9582172B2 (en) Display control apparatus and method, image display apparatus, and non-transitory computer readable medium
CN112954210B (zh) 拍照方法、装置、电子设备及介质
WO2014183537A1 (zh) 一种终端截图的方法及装置
US20140240540A1 (en) Apparatus and method for processing an image in device
US9880721B2 (en) Information processing device, non-transitory computer-readable recording medium storing an information processing program, and information processing method
WO2014054249A1 (en) Information processing apparatus, information processing method, and program
CN112954193B (zh) 拍摄方法、装置、电子设备及介质
WO2023284639A1 (zh) 显示控制方法、装置
WO2016188199A1 (zh) 图片裁剪方法和装置
US20200363947A1 (en) Electronic album apparatus, and operation method and operation program for the same
US11770603B2 (en) Image display method having visual effect of increasing size of target image, mobile terminal, and computer-readable storage medium
CN105808145A (zh) 一种实现图像处理的方法及终端
CN106896995B (zh) 移动终端的壁纸配置方法和装置
TW201413640A (zh) 具有圖片切換功能的裝置及圖片切換方法
CN108009273B (zh) 图像显示方法、装置及计算机可读存储介质
JP2023544544A (ja) スクリーンキャプチャ方法、装置及び電子機器
CN112333395A (zh) 对焦控制方法、装置及电子设备
CN105824522A (zh) 一种拍照方法及移动终端
US20130097543A1 (en) Capture-and-paste method for electronic device
US20120256964A1 (en) Information processing device, information processing method, and program storage medium
CN108108098B (zh) 一种图像选取方法及移动终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16799088

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16799088

Country of ref document: EP

Kind code of ref document: A1