Image cropping method and apparatus, and device and storage medium
AssigneeBeijing Bytedance Network Technology Co., Ltd.
InventorLinxing Li
Life of this patent
Estimating the term…
Abstract
Provided are an image cropping method, an image cropping device, an apparatus and storage medium. The method includes: adjusting a size of an image in a cropping area of a cropping block in a case that a border of the cropping block reaches a first target position of an image display area and a dragging event for the cropping block continues; and displaying, on a second target position of the image display area, an image in a current cropping area of the cropping block according to a current size ratio of the image in the cropping area of the cropping block when the dragging event for the cropping block ends.
Claims17
An image cropping method, comprising:
- adjusting a size of an image in a cropping area of a cropping block in response to determining that a border of the cropping block reaches a first target position of an image display area and a same dragging event for the cropping block continues, wherein the image in the cropping area of the cropping block is a part of a target image, and wherein the adjusting a size of an image in a cropping area of a cropping block in response to determining that a border of the cropping block reaches a first target position of an image display area and a same dragging event for the cropping block continues further comprises:
- increasing or reducing the size of the image in the cropping area of the cropping block based on determining whether the border of the cropping block coincides with a boundary of the target image or not when the same dragging event for the cropping block starts;
- displaying, on a second target position of the image display area, an image in a current cropping area of the same cropping block according to a current size ratio of the image in the current cropping area of the same cropping block in response to determining that the same dragging event for the same cropping block ends;
- and
- wherein the adjusting a size of an image in a cropping area of a cropping block further comprises:
- determining an image size adjustment speed based on a parameter of the same dragging event for the cropping block, and
- adjusting the size of the image in the cropping area of the cropping block based on the image size adjustment speed;
- or
- wherein the method further comprises adjusting, when the same dragging event for the cropping block continues, a display position of a target image to make a center of the target image always coincide with a center of the cropping area of the cropping block or make the center of the target image approach the center of the cropping area of the cropping block according to a specified path.
An image cropping device, comprising:
- one or more processors;
- and
- a storage device storing one or more programs,
- wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
- adjusting a size of an image in a cropping area of a cropping block in response to determining that a border of the cropping block reaches a first target position of an image display area and a same dragging event for the cropping block continues, wherein the image in the cropping area of the cropping block is a part of a target image, and wherein the adjusting a size of an image in a cropping area of a cropping block in response to determining that a border of the cropping block reaches a first target position of an image display area and a same dragging event for the cropping block continues further comprises:
- increasing or reducing the size of the image in the cropping area of the cropping block based on determining whether the border of the cropping block coincides with a boundary of the target image or not when the same dragging event for the cropping block starts;
- displaying, on a second target position of the image display area, an image in a current cropping area of the same cropping block according to a current size ratio of the image in the current cropping area of the same cropping block in response to determining that the same dragging event for the same cropping block ends;
- and
- wherein the adjusting a size of an image in a cropping area of a cropping block further comprises:
- determining an image size adjustment speed based on a parameter of the same dragging event for the cropping block, and
- adjusting the size of the image in the cropping area of the cropping block based on the image size adjustment speed;
- or
- wherein the operations further comprise adjusting, when the same dragging event for the cropping block continues, a display position of a target image to make a center of the target image always coincide with a center of the cropping area of the cropping block or make the center of the target image approach the center of the cropping area of the cropping block according to a specified path.
A non-transitory computer-readable storage medium, storing one or more programs for executing operations comprising:
- adjusting a size of an image in a cropping area of a cropping block in response to determining that a border of the cropping block reaches a first target position of an image display area and a same dragging event for the cropping block continues, wherein the image in the cropping area of the cropping block is a part of a target image, and wherein the adjusting a size of an image in a cropping area of a cropping block in response to determining that a border of the cropping block reaches a first target position of an image display area and a same dragging event for the cropping block continues further comprises:
- increasing or reducing the size of the image in the cropping area of the cropping block based on determining whether the border of the cropping block coincides with a boundary of the target image or not when the same dragging event for the cropping block starts;
- displaying, on a second target position of the image display area, an image in a current cropping area of the same cropping block according to a current size ratio of the image in the current cropping area of the same cropping block in response to determining that the same dragging event for the same cropping block ends;
- and
- wherein the adjusting a size of an image in a cropping area of a cropping block further comprises:
- determining an image size adjustment speed based on a parameter of the same dragging event for the cropping block, and
- adjusting the size of the image in the cropping area of the cropping block based on the image size adjustment speed;
- or
- wherein the operations further comprise adjusting, when the same dragging event for the cropping block continues, a display position of a target image to make a center of the target image always coincide with a center of the cropping area of the cropping block or make the center of the target image approach the center of the cropping area of the cropping block according to a specified path.
Dependencies are inferred from the claim text.