Image control method and system
By collecting and analyzing mouse events to determine the sliding direction and speed, efficient and precise control of image size is achieved, which solves the problem of insufficiently efficient and precise user operations in the existing technology and improves the user experience of image resizing.
Patent Information
- Application Number
- CN202410789449.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-10
AI Technical Summary
In the image size control of the existing technology, the user operation is not efficient and precise enough, the number of clicks is high, the slider is difficult to operate to adjust the unit size, the shortcut keys cannot accurately locate the single-digit change percentage, and there is a lack of accurate and fast fixed percentage interaction form.
By collecting click events and long-press sliding events, the sliding trajectory and sliding time are obtained, the sliding direction and speed are determined, the image size changes are controlled according to the preset threshold, and the mouse long-pressing evokes image percentage control and movement speed judgment to increase or decrease the display ratio.
Quickly and accurately position the image size within a limited operating range, improve the user's control efficiency and accuracy within the interface, and support the user's precise positioning of graphic size and positioning operations.
Smart Images

Figure CN118625978A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image control technology, and in particular to an image control method and system. Background Art
[0002] At present, users control the zooming in and out of images and adjust the specific percentage by operating plus and minus buttons at fixed positions in the user interface, dragging a slider, or using shortcut keys to zoom in and out. In actual applications, the existing methods have the following shortcomings: users zoom in and out by clicking plus and minus buttons, which will cause the user to click too many times; users zoom in and out by adjusting the slider, which is not easy to operate in a limited operating space and is very easy to miss a specific size; users zoom in and out by using shortcut keys, usually increasing the percentage by multiples of 10%, and cannot accurately locate the percentage change of the single digit. In addition, there is no interactive form on the market that integrates precise and fast fixed percentages, so that users can accurately locate the appropriate size in all directions.
[0003] Therefore, how to provide a more efficient and accurate image size control method has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, in order to overcome the deficiencies of the prior art, the present invention aims to provide an image control method and system.
[0005] According to a first aspect of the present invention, there is provided an image control method, the method comprising:
[0006] Collect click events, and wake up image control according to the click events and preset control wake-up thresholds;
[0007] Collect long press and slide events, and obtain the slide track and slide time based on the long press and slide events;
[0008] Determine the sliding direction and sliding speed according to the obtained sliding trajectory and sliding time;
[0009] Control the size change of the image according to the sliding direction and sliding speed.
[0010] Preferably, in the image control method of the present invention, click events are collected, and image control is awakened according to the click events and a preset control wake-up threshold, including: collecting click events, obtaining the click-long-press time and click coordinates according to the click events, comparing the obtained click-long-press time with the preset long-press wake-up threshold, when the click-long-press time is greater than the preset long-press wake-up threshold, locating and highlighting the clicked image area according to the obtained click coordinates, and displaying the display percentage of the current image in the clicked image area.
[0011] Preferably, in the image control method of the present invention, a long press sliding event is collected, and the sliding trajectory and sliding time are obtained according to the long press sliding event, including: obtaining the starting sliding coordinates and ending sliding coordinates of the long press sliding as well as the starting sliding time and the ending sliding time according to the long press sliding event.
[0012] Preferably, in the image control method of the present invention, the sliding direction and sliding speed are determined according to the acquired sliding trajectory and sliding time, including: determining the sliding direction according to the start sliding coordinates and the end sliding coordinates, when the value of the ordinate of the start sliding coordinates is less than the value of the ordinate of the end sliding coordinates, determining the sliding direction of the long press sliding as an upward sliding, and when the value of the ordinate of the start sliding coordinates is greater than the value of the ordinate of the end sliding coordinates, determining the sliding direction of the long press sliding as a downward sliding.
[0013] Preferably, in the image control method of the present invention, the sliding direction and sliding speed are determined according to the acquired sliding trajectory and sliding time, including: calculating the sliding displacement value according to the starting sliding coordinates and the ending sliding coordinates, calculating the sliding time value according to the starting sliding time and the ending sliding time, and taking the ratio of the sliding displacement value to the sliding time value as the sliding speed.
[0014] Preferably, in the image control method of the present invention, controlling the size change of the image according to the sliding direction and the sliding speed includes:
[0015] When the sliding direction is upward sliding and the sliding speed is greater than a preset sliding threshold, the display percentage of the current image is increased by a first percentage value within a first time value;
[0016] When the sliding direction is upward sliding and the sliding speed is less than a preset sliding threshold, the display percentage of the current image is increased by a second percentage value within a second time value.
[0017] Preferably, in the image control method of the present invention, the first time value is less than or equal to the second time value, and the first percentage value is greater than the second percentage value.
[0018] Preferably, in the image control method of the present invention, controlling the size change of the image according to the sliding direction and the sliding speed includes:
[0019] When the sliding direction is downward sliding and the sliding speed is greater than a preset sliding threshold, reducing the display percentage of the current image by a third percentage value within a third time value;
[0020] When the sliding direction is downward sliding and the sliding speed is less than a preset sliding threshold, the display percentage of the current image is increased by a fourth percentage value within a fourth time value.
[0021] Preferably, in the image control method of the present invention, the third time value is less than or equal to the third time value, and the fourth percentage value is greater than the fourth percentage value.
[0022] According to a second aspect of the present invention, there is provided an image control system, which includes an image control server, which is used to: collect click events, and wake up the image control according to the click events and a preset control wake-up threshold; collect long press and slide events, and obtain a slide track and a slide time according to the long press and slide events; determine a slide direction and a slide speed according to the obtained slide track and slide time; and control the size change of the image according to the slide direction and the slide speed.
[0023] According to a third aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect of the present invention when executing the program.
[0024] The image control method and system of the present invention locates a point as the center point, quickly and accurately locates the image size within a limited operating range, invokes image percentage control by long pressing the mouse, and determines the increase and decrease speed of the image display ratio by the speed of mouse movement. At the same time, the graphic size can also be quickly located by input, which is beneficial for users to accurately locate the graphics and locate the graphics of special sizes, so that users can control the image size and locate the operation position in the interface more efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 An exemplary system applicable to the image control method of an embodiment of the present invention is shown;
[0027] Figure 2 is a flowchart of a method for controlling an image according to an embodiment of the present invention;
[0028] Figure 3 This is a first application example diagram of an image control method according to an embodiment of the present invention in a specific scenario;
[0029] Figure 4 A second application example diagram of an image control method according to an embodiment of the present invention in a specific scenario;
[0030] Figure 5A third application example diagram of an image control method according to an embodiment of the present invention in a specific scenario;
[0031] Figure 6 A fourth application example diagram of an image control method according to an embodiment of the present invention in a specific scenario;
[0032] Figure 7 A fifth application example diagram of an image control method according to an embodiment of the present invention in a specific scenario;
[0033] Figure 8 A sixth application example diagram of an image control method according to an embodiment of the present invention in a specific scenario;
[0034] Fig. 9 A schematic diagram of the structure of the device provided by the present invention. DETAILED DESCRIPTION
[0035] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0036] It should be noted that the following embodiments and features in the embodiments may be combined with each other in the absence of conflict; and, based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of protection of the present disclosure.
[0037] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0038] Figure 1 An exemplary system suitable for the image control method of an embodiment of the present invention is shown. Figure 1 As shown, the system may include an image control server 101, a communication network 102 and / or one or more image control clients 103. Figure 1 The example shown is a plurality of image control clients 103 .
[0039] The image control server 101 can be any suitable server for storing information, data, programs and / or any other suitable type of content. In some embodiments, the image control server 101 can perform appropriate functions. For example, in some embodiments, the image control server 101 can be used for image control. As an optional example, in some embodiments, the image control server 101 can be used to: collect click events, wake up image control according to the click events and a preset control wake-up threshold; collect long press sliding events, obtain sliding tracks and sliding time according to the long press sliding events; determine the sliding direction and sliding speed according to the obtained sliding track and sliding time; control the size change of the image according to the sliding direction and sliding speed.
[0040] As another example, in some embodiments, the image control server 101 may send the image control method to the image control client 103 for the user to use according to the request of the image control client 103 .
[0041] As an optional example, in some embodiments, the image control client 103 is used to provide a visual control interface, which is used to receive a selection input operation of a user's image control, and, in response to the selection input operation, to obtain a control interface corresponding to the option selected by the selection input operation from the image control server 101 and display the control interface, wherein the control interface displays at least image control information and operation options for the image control information.
[0042] In some embodiments, the communication network 102 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 102 can include any one or more of the following: the Internet, an intranet, a wide area network (WAN), a local area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN), and / or any other suitable communication network. The image control client 103 can be connected to the communication network 102 through one or more communication links (e.g., communication link 104), and the communication network 102 can be linked to the image control server 101 via one or more communication links (e.g., communication link 105). The communication link can be any communication link suitable for transmitting data between the image control client 103 and the image control server 101, such as a network link, a dial-up link, a wireless link, a hard-wired link, any other suitable communication link, or any suitable combination of such links.
[0043] The image control client 103 may include any one or more clients that present an interface related to high-speed access to an ORC external table in an appropriate form for use and operation by a user. In some embodiments, the image control client 103 may include any suitable type of device. For example, in some embodiments, the image control client 103 may include a mobile device, a tablet computer, a laptop computer, a desktop computer, and / or any other suitable type of client device.
[0044] Although the image control server 101 is illustrated as one device, in some embodiments, any suitable number of devices may be used to perform the functions performed by the image control server 101. For example, in some embodiments, multiple devices may be used to implement the functions performed by the image control server 101. Alternatively, the functions of the image control server 101 may be implemented using a cloud service.
[0045] Based on the above system, an embodiment of the present application provides an image control method, which is described below through the following embodiments.
[0046] Figure 2 FIG. 1 is a flowchart of steps of an image control method according to an embodiment of the present invention. The image control method of this embodiment can be executed at the image control server end, such as Figure 2 As shown, the image control method includes the following steps:
[0047] Step S201: collecting click events, and waking up image control according to the click events and a preset control wake-up threshold.
[0048] As an optional example, in this embodiment, a click event is collected, the click-long-press time and click coordinates are obtained based on the click event, the obtained click-long-press time is compared with the preset long-press wake-up threshold, and when the click-long-press time is greater than the preset long-press wake-up threshold, the clicked image area is located and highlighted based on the obtained click coordinates, and the display percentage of the current image is displayed in the clicked image area.
[0049] Step S202: Collect the long press and slide event, and obtain the slide track and slide time according to the long press and slide event.
[0050] As an optional example, in this embodiment, the start sliding coordinates and the end sliding coordinates of the long press sliding as well as the start sliding time and the end sliding time are obtained according to the long press sliding event.
[0051] Step S203: Determine the sliding direction and sliding speed according to the acquired sliding track and sliding time.
[0052] As an optional example, in the method of this embodiment, the sliding direction is determined based on the starting sliding coordinates and the ending sliding coordinates. When the value of the vertical coordinate of the starting sliding coordinates is smaller than the value of the vertical coordinate of the ending sliding coordinates, the sliding direction of the long press sliding is determined to be an upward slide. When the value of the vertical coordinate of the starting sliding coordinates is greater than the value of the vertical coordinate of the ending sliding coordinates, the sliding direction of the long press sliding is determined to be a downward slide.
[0053] As an optional example, in the method of this embodiment, the sliding displacement value is calculated according to the starting sliding coordinates and the ending sliding coordinates, the sliding time value is calculated according to the starting sliding time and the ending sliding time, and the ratio of the sliding displacement value to the sliding time value is used as the sliding speed.
[0054] Step S204: controlling the size change of the image according to the sliding direction and sliding speed.
[0055] As an optional example, in the method of this embodiment, when the sliding direction is upward sliding and the sliding speed is greater than the preset sliding threshold, the display percentage of the current image is increased by a first percentage value within a first time value; when the sliding direction is upward sliding and the sliding speed is less than the preset sliding threshold, the display percentage of the current image is increased by a second percentage value within a second time value. It should be noted that in this embodiment, the first time value is less than or equal to the second time value, and the first percentage value is greater than the second percentage value.
[0056] As an optional example, in the method of this embodiment, when the sliding direction is downward sliding and the sliding speed is greater than the preset sliding threshold, the display percentage of the current image is reduced by a third percentage value within a third time value; when the sliding direction is downward sliding and the sliding speed is less than the preset sliding threshold, the display percentage of the current image is increased by a fourth percentage value within a fourth time value. It should be noted that in the method of this embodiment, the third time value is less than or equal to the third time value, and the fourth percentage value is greater than the fourth percentage value.
[0057] The image control method of this embodiment is described in detail in a specific scenario below. Figure 3 This is a first application example diagram of an image control method according to an embodiment of the present invention in a specific scenario; Figure 4 A second application example diagram of an image control method according to an embodiment of the present invention in a specific scenario; Figure 5 A third application example diagram of an image control method according to an embodiment of the present invention in a specific scenario; Figure 6 A fourth application example diagram of an image control method according to an embodiment of the present invention in a specific scenario; Figure 7 A fifth application example diagram of an image control method according to an embodiment of the present invention in a specific scenario; Figure 8FIG. 6 is a sixth application example diagram of an image control method according to an embodiment of the present invention in a specific scenario. Figures 3 to 8 As shown, click and hold the mouse Figure 3 The yellow "28" icon area in the middle shows the location of the area and the display percentage of the current image, such as Figure 4 shown in Figure 4 Continue to hold the mouse and slide upward at a speed greater than 10 cm / s. The current image will increase in display percentage by 5% within 0.5 seconds. Figure 5 shown in Figure 5 Continue to hold down the mouse and slide upward at a speed less than 10 cm / s. The current image will increase in display percentage by 1% within 0.5 seconds. Figure 6 shown in Figure 6 Continue to hold down the mouse and slide downward at a speed greater than 10 cm / s. The current image will be reduced by 5% within 0.5 seconds. Figure 7 shown in Figure 7 Continue to hold down the mouse and slide downward at a speed less than 10 cm / s. The current image will be reduced by 1% within 0.5 seconds. Figure 8 shown.
[0058] According to the image control method and system of the embodiments of the present invention, by locating a point as the center point, the image size can be quickly and accurately located within a limited operating range, the image percentage control can be evoked by long pressing the mouse, and the speed of increase or decrease of the image display ratio can be determined by the speed of mouse movement. At the same time, the graphic size can also be quickly located by input, which is beneficial for users to accurately locate the graphics and locate the graphics of special sizes, allowing users to control the image size and locate the operation position in the interface more efficiently and accurately.
[0059] like Fig. 9 As shown, the present invention further provides a device, including a processor 310, a communication interface 320, a memory 330 for storing a computer program executable by the processor, and a communication bus 340. The processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 implements the above-mentioned image control method by running the executable computer program.
[0060] Among them, the computer program in the memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0061] The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected based on actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0062] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0063] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. An image control method, It is characterized in that The method comprises: Collect click events, and wake up image control according to the click events and preset control wake-up thresholds; Collect long press and slide events, and obtain the slide track and slide time based on the long press and slide events; Determine the sliding direction and sliding speed according to the obtained sliding trajectory and sliding time; Control the size change of the image according to the sliding direction and sliding speed.
2. The image control method according to claim 1, It is characterized in that Collect click events, and wake up image control according to the click events and the preset control wake-up threshold, including: collecting click events, obtaining the click-long-press time and click coordinates according to the click events, comparing the obtained click-long-press time with the preset long-press wake-up threshold, when the click-long-press time is greater than the preset long-press wake-up threshold, locating and highlighting the clicked image area according to the obtained click coordinates, and displaying the display percentage of the current image in the clicked image area.
3. The image control method according to claim 1, It is characterized in that The long press sliding event is collected, and the sliding track and sliding time are obtained according to the long press sliding event, including: obtaining the start sliding coordinates and the end sliding coordinates of the long press sliding according to the long press sliding event as well as the start sliding time and the end sliding time.
4. The image control method according to claim 3, It is characterized in that The sliding direction and sliding speed are determined according to the acquired sliding trajectory and sliding time, including: determining the sliding direction according to the starting sliding coordinates and the ending sliding coordinates, when the value of the vertical coordinate of the starting sliding coordinates is less than the value of the vertical coordinate of the ending sliding coordinates, determining the sliding direction of the long press sliding as an upward slide, and when the value of the vertical coordinate of the starting sliding coordinates is greater than the value of the vertical coordinate of the ending sliding coordinates, determining the sliding direction of the long press sliding as a downward slide.
5. The image control method according to claim 3, It is characterized in that The sliding direction and sliding speed are determined according to the obtained sliding trajectory and sliding time, including: calculating the sliding displacement value according to the starting sliding coordinates and the ending sliding coordinates, calculating the sliding time value according to the starting sliding time and the ending sliding time, and taking the ratio of the sliding displacement value to the sliding time value as the sliding speed.
6. The image control method according to claim 1, It is characterized in that Control the size of the image according to the sliding direction and sliding speed, including: When the sliding direction is upward sliding and the sliding speed is greater than a preset sliding threshold, the display percentage of the current image is increased by a first percentage value within a first time value; When the sliding direction is upward sliding and the sliding speed is less than a preset sliding threshold, the display percentage of the current image is increased by a second percentage value within a second time value.
7. The image control method according to claim 6, It is characterized in that The first time value is less than or equal to the second time value, and the first percentage value is greater than the second percentage value.
8. The image control method according to claim 1, It is characterized in that Control the size of the image according to the sliding direction and sliding speed, including: When the sliding direction is downward sliding and the sliding speed is greater than a preset sliding threshold, reducing the display percentage of the current image by a third percentage value within a third time value; When the sliding direction is downward sliding and the sliding speed is less than a preset sliding threshold, the display percentage of the current image is increased by a fourth percentage value within a fourth time value.
9. The image control method according to claim 1, It is characterized in that The third time value is less than or equal to the third time value, and the fourth percentage value is greater than the fourth percentage value.
10. An image control system, It is characterized in that The system includes an image control server, which is used to: collect click events, wake up the image control according to the click events and a preset control wake-up threshold; collect long-press sliding events, and obtain sliding tracks and sliding time according to the long-press sliding events; The sliding direction and sliding speed are determined according to the acquired sliding track and sliding time; and the size change of the image is controlled according to the sliding direction and sliding speed.
