CN114610222A - Method and device for generating vertical screen handwritten signature, terminal equipment and storage medium - Google Patents

Method and device for generating vertical screen handwritten signature, terminal equipment and storage medium Download PDF

Info

Publication number
CN114610222A
CN114610222A CN202210294141.3A CN202210294141A CN114610222A CN 114610222 A CN114610222 A CN 114610222A CN 202210294141 A CN202210294141 A CN 202210294141A CN 114610222 A CN114610222 A CN 114610222A
Authority
CN
China
Prior art keywords
canvas
signature
length
image
signature image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210294141.3A
Other languages
Chinese (zh)
Inventor
祝红瑞
杨振燕
王志辉
马广伟
李一帆
曾祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Digital Certificate Authority Center Co ltd
Original Assignee
Shenzhen Digital Certificate Authority Center Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Digital Certificate Authority Center Co ltd filed Critical Shenzhen Digital Certificate Authority Center Co ltd
Priority to CN202210294141.3A priority Critical patent/CN114610222A/en
Publication of CN114610222A publication Critical patent/CN114610222A/en
Pending legal-status Critical Current

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
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • 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/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Landscapes

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

Abstract

The application is applicable to the technical field of internet, and provides a method, a device, terminal equipment and a medium for generating a vertical screen handwritten signature, wherein the method comprises the following steps: if a handwritten signature request is received, creating a first canvas, and displaying the first canvas in a horizontal screen mode; the width of the first canvas is larger than the length of the short edge of the display screen of the terminal equipment and smaller than or equal to the length of the long edge of the display screen, and the height of the first canvas is smaller than the length of the short edge; determining a signature character input by a user in a first canvas, and generating a first signature image according to the signature character and the first canvas; rotating the first signature image by 90 degrees, and zooming the first signature image to enable the width of the first signature image to be smaller than or equal to the length of the short edge of the display screen; and creating a second canvas, and generating a target signature image according to the second canvas and the rotated and scaled first signature image, so that a long signature can be completely written without causing a crowding phenomenon among handwritten signature characters.

Description

Method and device for generating vertical screen handwritten signature, terminal equipment and storage medium
Technical Field
The application belongs to the technical field of internet, and particularly relates to a method and a device for generating a vertical screen handwritten signature, terminal equipment and a storage medium.
Background
With the continuous development of internet technology, many businesses are gradually changed from off-line business to on-line business, for example, the signing of a contract is gradually changed from signing of an off-line paper contract to signing of an on-line electronic contract, and based on the change, a handwritten signature link in the off-line business handling process is also changed into an on-line electronic handwritten signature. With the wide application of touch technology to terminal equipment, a user can input an electronic handwritten signature on the terminal equipment by performing touch operation.
In order to adapt to the holding habit of the user, the prior art generally provides a vertical screen handwritten signature interface for the user so that the user inputs an electronic handwritten signature in the vertical screen handwritten signature interface. However, the width of the terminal device is limited, and the adoption of the scheme can cause that a long signature cannot be completely written, or cause that written handwritten signature characters are crowded, and the accuracy of subsequent handwritten signature recognition is influenced.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for generating a vertical screen handwritten signature, a terminal device, and a storage medium, so as to solve the technical problem that a long signature cannot be completely written or written handwritten signature characters are crowded due to the existing electronic handwritten signature method.
In a first aspect, an embodiment of the present application provides a method for generating a portrait screen handwritten signature, including:
if a handwritten signature request is received, creating a first canvas, and displaying the first canvas in a horizontal screen mode; the width of the first canvas is larger than the length of a short edge of a display screen of the terminal equipment and smaller than or equal to the length of a long edge of the display screen, and the height of the first canvas is smaller than the length of the short edge;
determining a signature character input by a user in the first canvas, and generating a first signature image according to the signature character and the first canvas;
rotating the first signature image by 90 degrees, and scaling the first signature image to enable the width of the first signature image to be smaller than or equal to the length of the short side of the display screen;
creating a second canvas, and generating a target signature image according to the second canvas and the first signature image after rotation and scaling; the width of the second canvas is less than or equal to the length of the short side, and the height of the second canvas is less than the length of the long side.
In an optional implementation manner of the first aspect, the determining the signature character input by the user in the first canvas includes:
if the touch operation is detected to exist in the first canvas, identifying a character handwriting corresponding to the touch operation;
and if a signature completion instruction is received, determining the signature character according to the character handwriting.
In an optional implementation manner of the first aspect, if it is detected that a touch operation exists in the first canvas, a content obtaining function is called to obtain a character script corresponding to the touch operation.
In an optional implementation manner of the first aspect, the creating the second canvas includes:
and rotating the first canvas by 90 degrees to obtain the second canvas.
In an optional implementation manner of the first aspect, the generating a target signature image according to the second canvas and the rotated and scaled first signature image includes:
inserting the rotated and scaled first signature image into the second canvas;
and converting the second canvas inserted with the first signature image into a picture format to obtain the target signature image.
In an optional implementation manner of the first aspect, after the creating the first canvas if the handwritten signature request is received, the method further includes:
setting a color value of the first canvas to a first color value;
after the creating the second canvas, the method further comprises:
setting a color value of the second canvas to the first color value.
In an optional implementation manner of the first aspect, after the creating the first canvas if the handwritten signature request is received, the method further includes:
receiving a color setting instruction for a signature character; the color setting instruction carries a target color value;
and configuring the target color value as the handwriting color of the signature character of the first canvas.
In a second aspect, an embodiment of the present application provides an apparatus for generating a portrait screen handwritten signature, including:
the device comprises a first creating unit, a second creating unit and a display unit, wherein the first creating unit is used for creating a first canvas and displaying the first canvas in a horizontal screen mode if a handwritten signature request is received; the width of the first canvas is larger than the length of a short edge of a display screen of the terminal equipment and smaller than or equal to the length of a long edge of the display screen, the height of the first canvas is smaller than the length of the short edge, and the first canvas is used for a user to input a handwritten signature;
the first image generation unit is used for determining a signature character input in the first canvas by a user and generating a first signature image according to the signature character and the first canvas;
the image processing unit is used for rotating the first signature image by 90 degrees and scaling the first signature image to enable the width of the first signature image to be smaller than or equal to the length of the short edge of the display screen;
the second image generation unit is used for creating a second canvas and generating a target signature image according to the second canvas and the first signature image after rotation and scaling; the width of the second canvas is less than or equal to the length of the short side, and the height of the second canvas is less than the length of the long side.
In a third aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor, when executing the computer program, implements the method according to the first aspect or any one of the optional manners of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the method according to the first aspect or any one of the alternatives of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, which, when run on a terminal device, causes the terminal device to perform the method according to the first aspect or any one of the alternatives of the first aspect.
The method, the device, the terminal equipment, the computer readable storage medium and the computer program product for generating the vertical screen handwritten signature have the following advantages that:
according to the method for generating the vertical screen handwritten signature, the first canvas is created when the handwritten signature request is received, and the first canvas is displayed in a horizontal screen mode, so that a user can place the terminal device in a horizontal screen state, handwritten signatures are input in the horizontal screen state, and a longer horizontal handwritten signature space can be provided for the user due to the fact that the width of the first canvas is larger than the length of the short edge of the display screen, long signatures can be completely written, and the phenomenon that crowding occurs among handwritten signature characters can be avoided; further, the terminal device generates a first signature image from the first canvas and signature characters entered by the user in the first canvas, and processing the first signature image to make the width of the first signature image less than or equal to the length of the short side of the display screen, therefore, the terminal equipment can conveniently convert the handwritten signature into a vertical screen format so as to completely display the first signature image in the vertical screen state, meanwhile, the terminal device generates a target signature image according to the second canvas and the processed first signature image by creating the second canvas, since the width of the second canvas is less than or equal to the length of the short side of the display screen, the height of the second canvas is less than the length of the long side of the display screen, the target signature image obtained based on the second canvas is used for the terminal device to perform vertical screen display, therefore, the user can conveniently check the handwritten signature in a common vertical screen state, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a method for generating a portrait handwritten signature according to an embodiment of the present disclosure;
fig. 2 is an interface schematic diagram of a handwritten signature interface provided in an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating dimensions of a first canvas provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a first signature image according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a method for generating a portrait handwritten signature according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of a device for generating a portrait screen handwritten signature according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
It is to be understood that the terminology used in the embodiments of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the application. In the description of the embodiments of the present application, "plurality" means two or more than two, "at least one", "one or more" means one, two or more than two, unless otherwise specified. The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a definition of "a first" or "a second" feature may explicitly or implicitly include one or more of the features.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
According to the method for generating the vertical screen handwritten signature, an execution main body is terminal equipment, including but not limited to a computer terminal or a mobile communication terminal, such as a personal computer, a mobile phone or a tablet computer. In a specific application, a target script file may be configured for a terminal device, and the target script file describes the method for generating the vertical screen handwritten signature provided in the embodiment of the present application, so that the terminal device executes the target script file when the vertical screen handwritten signature needs to be generated, and further executes each step in the method for generating the vertical screen handwritten signature provided in the embodiment of the present application.
Referring to fig. 1, a schematic flowchart of a method for generating a portrait handwritten signature according to an embodiment of the present application is provided. As shown in fig. 1, the method for generating the vertical screen handwritten signature includes S11 to S14, which are detailed as follows:
s11: and if a handwritten signature request is received, creating a first canvas, and displaying the first canvas in a horizontal screen mode.
In an embodiment of the present application, as shown in fig. 2, a handwritten signature control 201 may be disposed in the handwritten signature interface 20 of the terminal device. When a user needs to input a handwritten signature on a terminal device, for example, the user needs to input the handwritten signature on the terminal device in order to sign an electronic contract, or to confirm identity information of the user, or to read some important document contents, the user may click the handwritten signature control 201 in the handwritten signature interface 20. The terminal device determines that a handwritten signature request is received when detecting that the handwritten signature control 201 in the handwritten signature interface 20 is clicked. The handwritten signature interface 20 may be different according to different handwritten signature scenes, for example, if the handwritten signature scene is a signing scene of an electronic contract, the handwritten signature interface may be an interface displaying a tail page of the contract; if the handwritten signature scene is a confirmation scene of the user identity information, the handwritten signature interface may be an interface for displaying the user identity information.
In another embodiment of the present application, a handwritten signature box 202 may be disposed in the handwritten signature interface 20 of the terminal device, and the handwritten signature box 202 is used for a user to input a handwritten signature. When a user needs to input a handwritten signature on the terminal device, the user can directly write the name of the signature to be signed in the handwritten signature box 202 by a finger or a touch pen. When detecting that a touch operation exists in the handwritten signature box 202, the terminal device determines that a handwritten signature request is received. The touch operation may include a hand touch operation, a pen touch operation, and the like. The hand touch operation finger is a touch operation performed by a hand, and the pen touch operation finger is a touch operation performed by a stylus.
The terminal device creates a first canvas upon receiving a handwritten signature request. The first canvas is for a user to enter handwritten signatures. The width of the first canvas is larger than the length of the short edge of the display screen of the terminal equipment, the width of the first canvas is smaller than or equal to the length of the long edge of the display screen, and the height of the first canvas is smaller than the length of the short edge of the display screen.
In one embodiment of the present application, only the first canvas may be included in the interface for displaying the first canvas, excluding any other interface elements other than the first canvas.
Based on this, in one possible implementation manner of this embodiment, as shown in (a) in fig. 3, the width w of the first canvas may be the length of the long side 31 of the display screen, and the height h of the first canvas may be the length of the short side 32 of the display screen, that is, the size of the first canvas may be the same as the size of the display screen, so that after the terminal device displays the first canvas, the first canvas may occupy the entire display screen.
In another possible implementation manner of this embodiment, as shown in (b) in fig. 3, the width w of the first canvas may be a difference between the length of the long side 31 of the display screen and a first preset length, and the height h of the first canvas may be a difference between the length of the short side 32 of the display screen and a second preset length, so that after the terminal device displays the first canvas, the first canvas does not occupy the entire display screen. The first preset length and the second preset length may be equal or unequal, and may be specifically set according to actual requirements, and are not particularly limited herein. In order to provide a larger handwritten signature space for the user, the first preset length and the second preset length may be set to be smaller, for example, the first preset length and the second preset length may both be 2 mm.
In yet another embodiment of the present application, the interface for displaying the first canvas may include other interface elements, such as a handwritten signature control and/or a signature completion control, in addition to the first canvas. Based on this, as shown in (c) of fig. 3, the width w of the first canvas may be determined according to the length of the long side 31 of the display screen and the length of other interface elements (e.g., the signature completion control 203) in the long side direction of the display screen.
And after the terminal equipment creates the first canvas, displaying the first canvas in a horizontal screen mode. After the terminal device displays the first canvas in a horizontal screen mode, the user can place the terminal device in a horizontal screen state and input a handwritten signature in the first canvas. For example, a user may enter a handwritten signature by performing a touch operation in a first canvas.
S12: and determining a signature character input by a user in the first canvas, and generating a first signature image according to the signature character and the first canvas.
In the embodiment of the application, when the terminal device detects that the touch operation exists in the first canvas, it is determined that the user starts inputting the handwritten signature in the first canvas, and then, the terminal device can identify the touch operation executed by the user in the first canvas and determine the signature character corresponding to the touch operation.
In an embodiment of the application, in S12, the step of determining the signature character input by the user in the first canvas may specifically include the following steps:
if the touch operation is detected to exist in the first canvas, identifying a character handwriting corresponding to the touch operation;
and if a signature completion instruction is received, determining the signature character according to the character handwriting.
In a possible implementation manner, when detecting that a touch operation exists in the first canvas, the terminal device may call a content obtaining function getContext () to obtain a character script corresponding to the touch operation.
In one possible implementation manner, the terminal device may determine that the signature completion instruction is received when the terminal device detects that the signature completion control is clicked. In another possible implementation manner, after detecting that the touch operation exists in the first canvas, if it is detected that the touch operation disappears and the touch operation is not re-detected within a preset time period, the terminal device determines that the signature completion instruction is received.
When the terminal equipment receives a signature completion instruction, signature characters can be generated according to all the acquired character scripts corresponding to the touch operation, and a first canvas comprising the signature characters is converted into a picture format to obtain a first signature image. It will be appreciated that the width of the first signature image is equal to the width of the first canvas and the height of the first signature image is equal to the height of the first canvas.
For example, the format of the first signature image may be a Portable Network Graphics (PNG) format or a Joint Photographic Experts Group (JPEG) format, and the specific format of the first signature image is not particularly limited in this embodiment of the application.
S13: and rotating the first signature image by 90 degrees, and scaling the first signature image to enable the width of the first signature image to be smaller than or equal to the length of the short side of the display screen.
After the terminal device generates the first signature image, the first signature image is a horizontal screen image and is inconvenient for a user to check in a vertical screen mode, so that the terminal device can rotate the first signature image by 90 degrees according to a preset direction to obtain the signature image for vertical screen display. The preset direction may include a counterclockwise direction and a clockwise direction. The preset direction may be determined according to a landscape display direction of the first canvas. In particular, the preset direction may coincide with a landscape display direction of the first canvas.
In a specific application, the landscape display direction of the first canvas may be determined by a rotation operation performed on the terminal device by the user when the terminal device is transitioned from the portrait state to the landscape state. For example, if the user selects 90 degrees counterclockwise from the terminal device in the vertical screen state and changes the terminal device into the landscape screen state, the landscape screen display direction of the first canvas is counterclockwise, then the preset direction is also counterclockwise, and at this time, the terminal device rotates the first signature image 90 degrees counterclockwise.
In the embodiment of the application, after the terminal device rotates the first signature image by 90 degrees according to the preset direction, the first signature image may be scaled in an equal proportion, so that the width of the first signature image is less than or equal to the length of the short edge of the display screen, and the processed first signature image may be completely displayed in a vertical screen state.
Illustratively, as shown in fig. 4, the first signature image generated by the terminal device according to the signature characters and the first canvas may be shown as 41 in (a) of fig. 4, and the first signature image after being rotated and scaled may be shown as 41 in (b) of fig. 4.
S14: and creating a second canvas, and generating a target signature image according to the second canvas and the first signature image after rotation and scaling.
In the embodiment of the application, the width of the second canvas is smaller than or equal to the length of the short side of the display screen of the terminal device, and the height of the second canvas is smaller than the length of the long side of the display screen.
In a possible implementation manner of this embodiment, the width of the second canvas may be equal to the height of the first canvas, and the height of the second canvas may be equal to the width of the first canvas, and based on this, the step of creating the second canvas in S14 may specifically include the following steps:
and rotating the first canvas by 90 degrees to obtain the second canvas.
In a possible implementation manner of this embodiment, the step of generating the target signature image according to the second canvas and the rotated and scaled first signature image in S14 may specifically include the following steps:
inserting the rotated and scaled first signature image into the second canvas;
and converting the second canvas inserted with the first signature image into a picture format to obtain the target signature image.
In this implementation, the terminal device may call an image drawing function canvas, draw the rotated and scaled first signature image in the second canvas, and then insert the rotated and scaled first signature image into the second canvas.
Because the width of the second canvas is equal to the height of the first canvas, and the height of the second canvas is equal to the width of the first canvas, the width of the target signature image obtained after the second canvas is converted into the picture format is also equal to the height of the first canvas, and the height of the target signature image is also equal to the width of the first canvas. Therefore, the target signature image can be used for vertical screen display of the terminal equipment.
As can be seen from the above, in the method for generating a vertical-screen handwritten signature provided in this embodiment, a first canvas is created when a handwritten signature request is received, and a canvas is displayed in a horizontal-screen manner, so that a user can place a terminal device in a horizontal-screen state and input a handwritten signature in the horizontal-screen state, and since the width of the first canvas is greater than the length of a short edge of a display screen, a longer horizontal handwritten signature space can be provided for the user, so that a longer signature can be completely written, and a crowding phenomenon between handwritten signature characters is not caused; in addition, the terminal device generates a first signature image from the first canvas and signature characters entered by the user in the first canvas, and processing the first signature image so that the width of the first signature image is less than or equal to the length of the short side of the display screen, therefore, the terminal equipment can conveniently convert the handwritten signature into a vertical screen format so as to completely display the first signature image in the vertical screen state, meanwhile, the terminal device generates a target signature image from the second canvas and the processed first signature image by creating the second canvas, since the width of the second canvas is less than or equal to the length of the short side of the display screen, the height of the second canvas is less than the length of the long side of the display screen, the target signature image obtained based on the second canvas is used for the terminal device to perform vertical screen display, therefore, the user can conveniently check the handwritten signature in a common vertical screen state, and the user experience is improved.
In another embodiment of the application, after the terminal device creates the first canvas, the color of the first canvas may also be configured. The color of the first canvas can be preset by a user, and the terminal device can store a first color value corresponding to the color of the first canvas set by the user. For example, the color of the first canvas preset by the user may be white, and since the color value corresponding to white is # FFFFFF, the first color value may be # FFFFFF.
Based on this, in this embodiment, after the step of creating the first canvas in S12, the method for generating the portrait handwritten signature may further include the steps of:
setting a color value of the first canvas to a first color value.
Since the terminal device is to insert the first signature image generated based on the first canvas into the second canvas to obtain the final target signature image, the color of the second canvas needs to be the same as the color of the first canvas, and based on this, after the step of creating the second canvas in S14, the method for generating the portrait handwritten signature may further include the following steps:
setting a color value of the second canvas to the first color value.
It can be seen from the above that, in this embodiment, after the terminal device creates the first canvas and the second canvas, the color of the first canvas and the color of the second canvas are configured based on the first color value preset by the user, so that the handwritten signature interface can be set according to the preference of the user, that is, the color configuration function of the handwritten signature interface can be provided for the user in this embodiment, so that the user experience can be improved.
Referring to fig. 5, a schematic flow chart of a method for generating a portrait handwritten signature according to another embodiment of the present application is provided. The difference between this embodiment and the embodiment corresponding to fig. 1 is that after S11, the method for generating a portrait handwritten signature may further include S51 to S52, which are described in detail below;
s51: receiving a color setting instruction for a signature character; the color setting instruction carries a target color value, the target color value being different from the first color value.
S52: configuring the target color value to be a script color of a signature character of the first canvas.
In this embodiment, before the user inputs the handwritten signature in the first canvas, the handwriting color of the signature character may be set. For example, the terminal device may set the handwriting color by clicking a handwriting color setting control in a display interface for displaying the first canvas. Based on this, when the terminal device detects that the handwriting color setting control is clicked, the terminal device determines that a color setting instruction for the signature character is received, the user acquires the handwriting color selected by the user, determines the target color value corresponding to the handwriting color selected by the user, and arranges the target color value to the handwriting color of the signature character of the first canvas.
In order to be able to normally display the handwritten signature entered by the user, the target color value is different from the first color value.
It can be seen from the above that, the generation method of the vertical-screen handwritten signature provided by this embodiment can provide a handwriting color setting function of the handwritten signature for the user, so that the handwritten signature experience of the user can be improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Based on the method for generating a vertical screen handwritten signature provided by the above embodiment, the embodiment of the present invention further provides an embodiment of a device for generating a vertical screen handwritten signature, which implements the above method embodiment. Please refer to fig. 6, which is a schematic structural diagram of a device for generating a vertical screen handwritten signature according to an embodiment of the present application. For convenience of explanation, only the portions related to the present embodiment are shown. As shown in fig. 6, the generation device 60 for portrait handwritten signature may include: a first creation unit 61, a first image generation unit 62, an image processing unit 63, and a second image generation unit 64. Wherein:
the first creating unit 61 is configured to create a first canvas if a handwritten signature request is received, and display the first canvas in a horizontal screen manner; the width of first canvas is greater than the length of the minor face of terminal equipment's display screen, and is less than or equal to the length of the long limit of display screen, the height of first canvas is less than the length of minor face, first canvas is used for the user to input handwritten signature.
The first image generation unit 62 is configured to determine a signature character input by a user in the first canvas, and generate a first signature image according to the signature character and the first canvas.
The image processing unit 63 is configured to rotate the first signature image by 90 degrees, and scale the first signature image so that the width of the first signature image is smaller than or equal to the length of the short side of the display screen.
The second image generation unit 64 is configured to create a second canvas and generate a target signature image according to the second canvas and the rotated and scaled first signature image; the width of the second canvas is less than or equal to the length of the short side, and the height of the second canvas is less than the length of the long side.
In an alternative implementation, the first image generation unit 62 may include a character recognition unit and a character determination unit. Wherein:
the character recognition unit is used for recognizing the character handwriting corresponding to the touch operation if the touch operation is detected to exist in the first canvas.
And the character determining unit is used for determining the signature character according to the character handwriting if a signature finishing instruction is received.
In an alternative implementation, the character recognition unit is specifically configured to: and if the touch operation is detected to exist in the first canvas, calling a content acquisition function to acquire the character handwriting corresponding to the touch operation.
In an optional implementation manner, the second image generation unit is specifically configured to: and rotating the first canvas by 90 degrees to obtain the second canvas.
In an alternative implementation, the second image generation unit may include an image insertion unit and a format conversion unit. Wherein:
an image insertion unit is to insert the rotated and scaled first signature image into the second canvas.
The format conversion unit is used for converting the second canvas inserted with the first signature image into a picture format to obtain the target signature image.
In an alternative implementation, the generation apparatus 60 for portrait handwritten signature may further include a first color setting unit and a second color setting unit. Wherein:
the first color setting unit is used for setting the color value of the first canvas to be a first color value.
The second color setting unit is used for setting the color value of the second canvas to be the first color value.
In an alternative implementation, the generation apparatus 60 of the portrait handwritten signature may further include an instruction receiving unit and a third color setting unit. Wherein:
the instruction receiving unit is used for receiving a color setting instruction for the signature character; the color setting instruction carries a target color value, the target color value being different from the first color value.
The third color setting unit is used for configuring the target color value to be the handwriting color of the signature character of the first canvas.
It should be noted that, for the information interaction, the execution process, and other contents between the above units, the specific functions and the technical effects brought by the method embodiments of the present application are based on the same concept, and specific reference may be made to the method embodiment part, which is not described herein again.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of each functional unit is merely used as an example, and in practical applications, the foregoing function distribution may be performed by different functional units according to needs, that is, the internal structure of the device for generating a vertical screen handwritten signature is divided into different functional units to perform all or part of the above-described functions. Each functional unit in the embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application. The specific working process of the units in the system may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure. As shown in fig. 7, the terminal device 7 provided in this embodiment may include: a processor 70, a memory 71 and a computer program 72 stored in the memory 71 and executable on the processor 70, for example a program corresponding to a method of generating a portrait handwritten signature. The steps in the above-described embodiment of the method for generating a portrait handwritten signature, e.g., S11-S14 shown in fig. 1, are implemented when the processor 70 executes the computer program 72. Alternatively, the processor 70, when executing the computer program 72, implements the functions of the modules/units in the above-described embodiment of the apparatus for generating a portrait handwritten signature, such as the functions of the units 61-64 shown in fig. 6.
Illustratively, the computer program 72 may be divided into one or more modules/units, which are stored in the memory 71 and executed by the processor 70 to accomplish the present application. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 72 in the terminal device 7. For example, the computer program 72 may be divided into a first creating unit, a first image generating unit, an image processing unit and a second image generating unit, and specific functions of each unit refer to the description in the embodiment corresponding to fig. 6, which is not described herein again.
It will be appreciated by those skilled in the art that fig. 7 is merely an example of a terminal device 7 and does not constitute a limitation of the terminal device 7 and may include more or less components than those shown, or some components may be combined, or different components.
The processor 70 may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, or a flash memory card (flash card) provided on the terminal device 7. Further, the memory 71 may also include both an internal storage unit of the terminal device 7 and an external storage device. The memory 71 is used for storing computer programs and other programs and data required by the terminal device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
Embodiments of the present application provide a computer program product, which, when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments.
In the above embodiments, the description of each embodiment has its own emphasis, and parts that are not described or illustrated in a certain embodiment may refer to the description of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for generating a vertical screen handwritten signature is characterized by comprising the following steps:
if a handwritten signature request is received, creating a first canvas, and displaying the first canvas in a horizontal screen mode; the width of the first canvas is larger than the length of a short edge of a display screen of the terminal equipment and smaller than or equal to the length of a long edge of the display screen, and the height of the first canvas is smaller than the length of the short edge;
determining a signature character input by a user in the first canvas, and generating a first signature image according to the signature character and the first canvas;
rotating the first signature image by 90 degrees, and scaling the first signature image to enable the width of the first signature image to be smaller than or equal to the length of the short side of the display screen;
creating a second canvas, and generating a target signature image according to the second canvas and the first signature image after rotation and scaling; the width of the second canvas is less than or equal to the length of the short side, and the height of the second canvas is less than the length of the long side.
2. The method of claim 1, wherein determining the signature characters entered by the user in the first canvas comprises:
if the touch operation is detected to exist in the first canvas, identifying a character handwriting corresponding to the touch operation;
and if a signature completion instruction is received, determining the signature character according to the character handwriting.
3. The method according to claim 2, wherein if it is detected that a touch operation exists in the first canvas, identifying a character script corresponding to the touch operation comprises:
and if the touch operation is detected to exist in the first canvas, calling a content acquisition function to acquire the character handwriting corresponding to the touch operation.
4. The method of claim 1, wherein creating the second canvas comprises:
and rotating the first canvas by 90 degrees to obtain the second canvas.
5. The method of claim 1, wherein generating a target signature image from the second canvas and the rotated and scaled first signature image comprises:
inserting the rotated and scaled first signature image into the second canvas;
and converting the second canvas inserted with the first signature image into a picture format to obtain the target signature image.
6. The method of claim 1, wherein after creating the first canvas if the handwritten signature request is received, further comprising:
setting a color value of the first canvas to a first color value;
after the creating the second canvas, the method further comprises:
setting a color value of the second canvas to the first color value.
7. The method according to any one of claims 1 to 6, wherein after creating the first canvas if the handwritten signature request is received, further comprising:
receiving a color setting instruction for a signature character; the color setting instruction carries a target color value, the target color value being different from the first color value;
configuring the target color value to be a script color of a signature character of the first canvas.
8. An apparatus for generating a handwritten signature on a vertical screen, comprising:
the device comprises a first creating unit, a second creating unit and a display unit, wherein the first creating unit is used for creating a first canvas and displaying the first canvas in a horizontal screen mode if a handwritten signature request is received; the width of the first canvas is larger than the length of a short edge of a display screen of the terminal equipment and smaller than or equal to the length of a long edge of the display screen, the height of the first canvas is smaller than the length of the short edge, and the first canvas is used for a user to input a handwritten signature;
the first image generation unit is used for determining a signature character input in the first canvas by a user and generating a first signature image according to the signature character and the first canvas;
the image processing unit is used for rotating the first signature image by 90 degrees and scaling the first signature image to enable the width of the first signature image to be smaller than or equal to the length of the short edge of the display screen;
the second image generation unit is used for creating a second canvas and generating a target signature image according to the second canvas and the first signature image after rotation and scaling; the width of the second canvas is less than or equal to the length of the short side, and the height of the second canvas is less than the length of the long side.
9. A terminal device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor implementing the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202210294141.3A 2022-03-24 2022-03-24 Method and device for generating vertical screen handwritten signature, terminal equipment and storage medium Pending CN114610222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210294141.3A CN114610222A (en) 2022-03-24 2022-03-24 Method and device for generating vertical screen handwritten signature, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210294141.3A CN114610222A (en) 2022-03-24 2022-03-24 Method and device for generating vertical screen handwritten signature, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114610222A true CN114610222A (en) 2022-06-10

Family

ID=81865543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210294141.3A Pending CN114610222A (en) 2022-03-24 2022-03-24 Method and device for generating vertical screen handwritten signature, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114610222A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763320A (en) * 2018-04-28 2018-11-06 广东蜂助手网络技术股份有限公司 A kind of writing note data storage method, device, terminal and storage medium
CN108932413A (en) * 2017-05-22 2018-12-04 腾讯科技(北京)有限公司 A kind of digital signature generation method, device and storage medium
CN111176543A (en) * 2019-12-25 2020-05-19 数字广东网络建设有限公司 Method, device, computer equipment and storage medium for realizing electronic signature
CN112669403A (en) * 2020-12-23 2021-04-16 广州佰锐网络科技有限公司 Image generation method and device for handwritten signature, terminal equipment and storage medium
CN113311978A (en) * 2021-07-29 2021-08-27 江苏荣泽信息科技股份有限公司 Enterprise credit information service management system based on block chain
CN113722031A (en) * 2021-07-09 2021-11-30 广州南方仕通网络科技有限公司 Dynamic display method, device, medium and product of electronic signature
CN215679328U (en) * 2021-09-23 2022-01-28 深圳市美至科技有限公司 Electromagnetic liquid crystal sign screen supporting vertical screen horizontal display
CN114089932A (en) * 2020-06-29 2022-02-25 华为技术有限公司 Multi-screen display method and device, terminal equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932413A (en) * 2017-05-22 2018-12-04 腾讯科技(北京)有限公司 A kind of digital signature generation method, device and storage medium
CN108763320A (en) * 2018-04-28 2018-11-06 广东蜂助手网络技术股份有限公司 A kind of writing note data storage method, device, terminal and storage medium
CN111176543A (en) * 2019-12-25 2020-05-19 数字广东网络建设有限公司 Method, device, computer equipment and storage medium for realizing electronic signature
CN114089932A (en) * 2020-06-29 2022-02-25 华为技术有限公司 Multi-screen display method and device, terminal equipment and storage medium
CN112669403A (en) * 2020-12-23 2021-04-16 广州佰锐网络科技有限公司 Image generation method and device for handwritten signature, terminal equipment and storage medium
CN113722031A (en) * 2021-07-09 2021-11-30 广州南方仕通网络科技有限公司 Dynamic display method, device, medium and product of electronic signature
CN113311978A (en) * 2021-07-29 2021-08-27 江苏荣泽信息科技股份有限公司 Enterprise credit information service management system based on block chain
CN215679328U (en) * 2021-09-23 2022-01-28 深圳市美至科技有限公司 Electromagnetic liquid crystal sign screen supporting vertical screen horizontal display

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HAO_0413: "《canvas实现电子签名》", pages 1 - 5, Retrieved from the Internet <URL:《https://blog.csdn.net/weixin_41977619/article/details/121020280》> *
XUEYYYYYYYYYYYYYY: "《canvas签字版强制横屏,签字完成竖屏下回显签名》", pages 1 - 5, Retrieved from the Internet <URL:《https://blog.csdn.net/weixin_39812195/article/details/111953200》> *

Similar Documents

Publication Publication Date Title
CN109766879B (en) Character detection model generation method, character detection device, character detection equipment and medium
US20120287070A1 (en) Method and apparatus for notification of input environment
CN110659633A (en) Image text information recognition method and device and storage medium
CN111290684B (en) Image display method, image display device and terminal equipment
JP7389824B2 (en) Object identification method and device, electronic equipment and storage medium
CN113627428A (en) Document image correction method and device, storage medium and intelligent terminal device
CN112597940B (en) Certificate image recognition method and device and storage medium
WO2009029449A1 (en) User interface method for skew correction
CN108989704B (en) Image generation method and device and terminal equipment
CN112417899A (en) Character translation method, device, computer equipment and storage medium
US10049268B2 (en) Selective, user-mediated content recognition using mobile devices
US7280693B2 (en) Document information input apparatus, document information input method, document information input program and recording medium
CN114495146A (en) Image text detection method and device, computer equipment and storage medium
CN111414914A (en) Image recognition method and device, computer equipment and storage medium
CN107679222B (en) Picture processing method, mobile terminal and computer readable storage medium
CN111027533B (en) Click-to-read coordinate transformation method, system, terminal equipment and storage medium
CN114610222A (en) Method and device for generating vertical screen handwritten signature, terminal equipment and storage medium
US11074392B2 (en) Information processing apparatus and non-transitory computer readable medium for switching between an attribute information mode and an image information mode
CN111079771B (en) Method, system, terminal equipment and storage medium for extracting characteristics of click-to-read image
US10762344B2 (en) Method and system for using whiteboard changes as interactive directives for vectorization software
JP6676121B2 (en) Data input device and data input program
CN111582143A (en) Student classroom attendance method and device based on image recognition and storage medium
CN111078351B (en) Loading method and system for dynamic demonstration interface
CN110875875B (en) Electronic red packet message detection method and device and terminal equipment
CN110895698B (en) Electronic red packet identification method, electronic red packet identification device and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination