[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110244889B - Picture scaling method, device, terminal and storage medium - Google Patents

Picture scaling method, device, terminal and storage medium Download PDF

Info

Publication number
CN110244889B
CN110244889B CN201910523714.3A CN201910523714A CN110244889B CN 110244889 B CN110244889 B CN 110244889B CN 201910523714 A CN201910523714 A CN 201910523714A CN 110244889 B CN110244889 B CN 110244889B
Authority
CN
China
Prior art keywords
operation signal
picture
signal
duration
target
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.)
Active
Application number
CN201910523714.3A
Other languages
Chinese (zh)
Other versions
CN110244889A (en
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910523714.3A priority Critical patent/CN110244889B/en
Publication of CN110244889A publication Critical patent/CN110244889A/en
Application granted granted Critical
Publication of CN110244889B publication Critical patent/CN110244889B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Landscapes

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

Abstract

The embodiment of the application discloses a picture zooming method, a picture zooming device, a terminal and a storage medium, and belongs to the field of man-machine interaction. The method comprises the following steps: receiving a first operation signal for the picture in a picture browsing state, wherein the first operation signal is a signal triggered during single-finger operation; if the first operation signal is a zooming mode trigger signal, amplifying the picture according to the first operation signal; receiving a second operation signal for the picture after the first operation signal is received; and if the second operation signal is a zoom mode switching signal, zooming out the picture according to a third operation signal received after the second operation signal, wherein the second operation signal and the third operation signal are signals triggered during single-finger operation. In the embodiment of the application, the picture can be amplified and reduced through the operation signal triggered by the single finger operation, so that convenience is brought to a user to zoom the picture by using one hand under the condition that two hands are not used conveniently, and convenience and efficiency of zooming the picture are improved.

Description

Picture scaling method, device, terminal and storage medium
Technical Field
The embodiment of the application relates to the field of human-computer interaction, in particular to a picture zooming method, a picture zooming device, a terminal and a storage medium.
Background
In browsing pictures, a user often needs to zoom in and out of the picture using a specific gesture in order to observe the details of the picture.
In the related art, the specific gesture may be a two-finger zoom. The user can slide the two fingers on the touch display screen in the reverse direction to enlarge the picture, and can also slide the two fingers on the touch display screen in the opposite direction to reduce the picture.
Disclosure of Invention
The embodiment of the application provides a picture zooming method, a picture zooming device, a terminal and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for scaling an image, where the method includes:
receiving a first operation signal for a picture in a picture browsing state, wherein the first operation signal is a signal triggered during single-finger operation;
if the first operation signal is a zooming mode trigger signal, amplifying the picture according to the first operation signal;
receiving a second operation signal for the picture after the first operation signal is received;
and if the second operation signal is a zoom mode switching signal, carrying out zoom-out processing on the picture according to a third operation signal received after the second operation signal, wherein the second operation signal and the third operation signal are signals triggered during single-finger operation.
In another aspect, an embodiment of the present application provides an apparatus for scaling a picture, where the apparatus includes:
the first receiving module is used for receiving a first operation signal for the picture in a picture browsing state, wherein the first operation signal is a signal triggered during single-finger operation;
the amplifying module is used for amplifying the picture according to the first operation signal when the first operation signal is a zooming mode trigger signal;
the second receiving module is used for receiving a second operation signal of the picture after the first operation signal is received;
and the zooming-out module is used for zooming out the picture according to a third operation signal received after the second operation signal when the second operation signal is a zooming mode switching signal, wherein the second operation signal and the third operation signal are signals triggered during single-finger operation.
On the other hand, an embodiment of the present application provides a terminal, where the terminal includes: the terminal comprises a processor and a memory; the memory stores at least one instruction for execution by the processor to implement the picture scaling method as described in the above aspect.
In another aspect, a computer-readable storage medium is provided, the storage medium storing at least one instruction for execution by a processor to implement the picture scaling method according to the above aspect.
In another aspect, a computer program product is provided, which stores at least one instruction that is loaded and executed by a processor to implement the picture scaling method of the above aspect.
By adopting the image zooming method provided by the embodiment of the application, in the image browsing state, when a first operation signal for the image is received and the first operation signal is a zooming mode trigger signal, the terminal amplifies the image according to the first operation signal; when a second operation signal after receiving the first operation signal is a zoom mode switching signal, the terminal receives a third operation signal after receiving the second operation signal to perform zoom-out processing on the picture; compared with the prior art that the image can be zoomed only by using two fingers and cannot be zoomed by using one hand, in the embodiment of the application, the image can be zoomed and zoomed out by using the operation signal triggered by the operation of the one finger, so that a user can zoom the image by using one hand under the condition that the user does not use two hands conveniently, and the convenience and the efficiency of zooming the image are improved.
Drawings
Fig. 1 and 2 are block diagrams illustrating a structure of a terminal according to an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of a picture scaling method shown in an exemplary embodiment of the present application;
FIG. 4 is a schematic interface diagram of an implementation process of the picture scaling method shown in FIG. 3;
FIG. 5 illustrates a flow chart of a picture scaling method shown in an exemplary embodiment of the present application;
FIG. 6 is a schematic interface diagram of an implementation process of the picture scaling method shown in FIG. 5;
FIG. 7 illustrates a flow chart of a picture scaling method shown in an exemplary embodiment of the present application;
FIG. 8 is a schematic interface diagram of an implementation process of the picture scaling method shown in FIG. 7;
fig. 9 shows a block diagram of a picture scaling apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Referring to fig. 1 and 2, a block diagram of a terminal 100 according to an exemplary embodiment of the present application is shown. The terminal 100 may be a mobile phone, a tablet computer, a notebook computer, an e-book, etc. The terminal 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and a display 130.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall terminal 100 using various interfaces and lines, and performs various functions of the terminal 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Neural-Network Processing Unit (NPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content to be displayed by the touch display screen 130; the NPU is used for realizing an Artificial Intelligence (AI) function; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a single chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 120 includes a non-transitory computer-readable medium. The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like; the storage data area may store data (such as audio data, a phonebook) created according to the use of the terminal 100, and the like.
Taking an operating system as an Android (Android) system as an example, programs and data stored in the memory 120 are shown in fig. 1, and a Linux kernel layer 220, a system runtime layer 240, an application framework layer 260, and an application layer 280 are stored in the memory 120. The Linux kernel layer 220 provides underlying drivers for various hardware of the terminal 100, such as a display driver, an audio driver, a camera driver, a bluetooth driver, a Wi-Fi driver, power management, and the like. The system runtime library layer 240 provides the main feature support for the Android system through some C/C + + libraries. For example, the SQLite library provides support for a database, the OpenGL/ES library provides support for 3D drawing, the Webkit library provides support for a browser kernel, and the like. Also provided in the system Runtime layer 240 is an Android Runtime library 242(Android Runtime), which mainly provides some core libraries and can allow developers to write Android applications using the Java language. The application framework layer 260 provides various APIs that may be used in building applications, and developers may build their own applications by using these APIs, such as activity management, window management, view management, notification management, content provider, package management, session management, resource management, and location management. At least one application program runs in the application layer 280, and the application programs may be a contact program, a short message program, a clock program, a camera application, etc. of the operating system; or an application program developed by a third-party developer, such as an instant messaging program, a photo beautification program, and the like.
Taking an operating system as an IOS system as an example, programs and data stored in the memory 120 are shown in fig. 2, and the IOS system includes: a Core operating system Layer 320(Core OS Layer), a Core Services Layer 340(Core Services Layer), a Media Layer 360(Media Layer), and a touchable Layer 380(Cocoa Touch Layer). The kernel operating system layer 320 includes an operating system kernel, drivers, and underlying program frameworks that provide functionality closer to hardware for use by program frameworks located in the kernel services layer 340. The core services layer 340 provides system services and/or program frameworks, such as a Foundation framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a motion framework, and so forth, that are needed by the application. The media layer 360 provides audiovisual interfaces for applications, such as graphics-related interfaces, audio-related interfaces, video-related interfaces, and audio/video transmission technology wireless broadcast (AirPlay) interfaces. The touchable layer 380 provides various common interface-related frameworks for application development, and the touchable layer 380 is responsible for user touch interaction operations on the terminal 100. Such as a local notification service, a remote push service, an advertising framework, a game tool framework, a messaging User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
In the framework shown in FIG. 2, the framework associated with most applications includes, but is not limited to: a base framework in the core services layer 340 and a UIKit framework in the touchable layer 380. The base framework provides many basic object classes and data types, provides the most basic system services for all applications, and is UI independent. While the class provided by the UIKit framework is a basic library of UI classes for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides an infrastructure for applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, and the like.
The display screen 130 is used to display the display components of the user interface. Optionally, the display screen 130 in the embodiment of the present application further has a touch function, and is configured to receive a touch operation of a user on or near the display screen by using any suitable object, such as a finger, a touch pen, and the like. The display 130 is generally disposed on a front panel of the terminal 130. The display screen 130 may be designed as a full-face screen, a curved screen, a contoured screen, a double-face screen, or a folding screen. The display 130 may also be designed as a combination of a full-screen and a curved-screen, and a combination of a non-flat screen and a curved-screen, which is not limited in this embodiment.
Optionally, the terminal 100 further has a fingerprint identification function, and the fingerprint identification function is implemented by a fingerprint acquisition component. Optionally, the fingerprint collection assembly may be an independently arranged fingerprint collection assembly (for example, arranged at a physical key or a back cover), or may be arranged below the screen, so as to be an off-screen fingerprint collection assembly.
In addition, those skilled in the art will appreciate that the configuration of terminal 100 as illustrated in the above-described figures is not intended to be limiting of terminal 100, and that terminals may include more or less components than those illustrated, or some components may be combined, or a different arrangement of components. For example, the terminal 100 further includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a Wireless Fidelity (WiFi) module, a power supply, a bluetooth module, and other components, which are not described herein again.
In the related art, when a user zooms in and out a picture by using a two-finger gesture, the user needs to hold the terminal with one hand and zoom in and out the picture by using the other hand, and the user cannot zoom in and out the picture under the condition that the user cannot operate the terminal with two hands, so that the application scene of zooming in and out the picture is limited.
After the image zooming method provided by the embodiment of the application is applied to an operating system or an application program, a user can trigger the terminal to enter an image zooming mode and zoom in an image through single-finger operation; when the image needs to be reduced, a user can trigger the switching of the scaling mode through single-finger operation, so that the image is reduced through the single-finger operation in the image reduction mode. Because the image zooming operation and the zooming switching operation are both single-finger operations, a user can zoom the image by using the thumb of the holding hand even under the condition that the terminal is not operated by two hands, the convenience of zooming the image is improved, and the operation difficulty of zooming the image is reduced. The following description will be made by using exemplary embodiments.
Referring to fig. 3, a flowchart of a picture scaling method according to an exemplary embodiment of the present application is shown. The present embodiment is illustrated by applying the method to the terminal 100 shown in fig. 1 or 2. The method comprises the following steps:
step 301, receiving a first operation signal for the picture in the picture browsing state, where the first operation signal is a signal triggered during a single-finger operation.
Optionally, the picture is a local picture, such as a picture in an album application, or the picture is a network picture (i.e., a picture that is not downloaded to the local), such as a picture displayed in a web page.
In a possible implementation manner, when an operation signal for a picture is received, the terminal obtains the number of operation points and the area of the operation points indicated by the operation signal, and if the number of the operation points is 1 and the area of the operation points is smaller than an area threshold (the palm touch signal is prevented from being recognized as the first operation signal), it is determined that the first operation signal is received.
Step 302, if the first operation signal is a zoom mode trigger signal, the picture is amplified according to the first operation signal.
The zoom mode trigger signal is an operation signal for triggering the terminal to zoom the picture. When receiving a first operation signal for the picture, the terminal further detects whether the first operation signal is a zoom mode trigger signal, and enters a picture amplification mode when the first operation signal is the zoom mode trigger signal, so that the picture is amplified according to the first operation signal.
In a possible implementation manner, the terminal detects whether the first operation signal is the zoom mode trigger signal according to the duration of the first operation signal; or the terminal detects whether the first operation signal is a zoom mode trigger signal according to the duration of the first operation signal and the operation track.
Step 303, receiving a second operation signal for the picture after the first operation signal is received.
In a possible application scenario, when the magnification of a picture is too large, a user needs to reduce the enlarged picture through a reduction operation, and at this time, the user can trigger the terminal to switch from the picture enlargement mode to the picture reduction mode through a scaling mode switching operation.
Optionally, the terminal receives a second operation signal for the picture after the first operation, detects whether the second operation signal is a zoom mode switching signal, and executes the following step 304 when the second operation signal is the zoom mode switching signal.
In a possible embodiment, the terminal detects whether the second operation signal is the zoom mode switch signal according to the operation times indicated by the second operation signal.
Step 304, if the second operation signal is a zoom mode switching signal, a third operation signal is received according to the second operation signal to perform zoom-out processing on the picture, and the second operation signal and the third operation signal are signals triggered during single-finger operation.
In a possible implementation manner, when the second operation signal is a zoom mode switching signal, the terminal further detects whether a third operation signal is received, and when the third operation signal is received, performs a zoom-out process on the picture according to the third operation signal.
Optionally, the third operation signal is the same as the first operation signal. For example, when the first operation signal is a long press operation signal, the third operation signal is also a long press operation signal.
It should be noted that, in this embodiment, taking an example that the first operation signal is a zoom mode trigger signal, triggering to enter the picture zoom-in mode is described, and when the zoom mode switching signal is received, switching to the picture zoom-out mode is described, in other possible embodiments, when the first operation signal is the zoom mode trigger signal, triggering to enter the picture zoom-out mode may also be performed, and correspondingly, the terminal switches to the picture zoom-in mode when the zoom mode switching signal is received, which is not limited in this embodiment.
In an illustrative example, when the zoom mode trigger signal is a long-press operation signal, the zoom mode switch signal is a double-click signal, and the third operation signal is a long-press operation signal, as shown in fig. 4, a picture 41 is displayed on the terminal, and when the long-press operation on the picture 41 is received, the terminal enters a picture amplification mode and performs amplification processing on the picture 41; when the long press operation is stopped and the double-click operation on the picture 41 is received, the terminal is switched from the picture enlargement mode to the picture reduction mode (the picture size before enlargement is still kept); when the long press operation is received again, the terminal performs reduction processing on the picture 41.
In summary, with the image zooming method provided by the embodiment of the present application, in the image browsing state, when a first operation signal for the image is received and the first operation signal is a zooming mode trigger signal, the terminal amplifies the image according to the first operation signal; when a second operation signal after receiving the first operation signal is a zoom mode switching signal, the terminal receives a third operation signal after receiving the second operation signal to perform zoom-out processing on the picture; compared with the prior art that the image can be zoomed only by using two fingers and cannot be zoomed by using one hand, in the embodiment of the application, the image can be zoomed and zoomed out by using the operation signal triggered by the operation of the one finger, so that a user can zoom the image by using one hand under the condition that the user does not use two hands conveniently, and the convenience and the efficiency of zooming the image are improved.
In order to simplify the operation of triggering the entering of the picture scaling mode, in one possible embodiment, the scaling mode trigger signal is a long press operation signal, that is, the user can trigger the entering of the picture scaling mode by pressing a picture for a long time. The following description will be made by using exemplary embodiments.
Referring to fig. 5, a flowchart of a picture scaling method according to another exemplary embodiment of the present application is shown. The present embodiment is illustrated by applying the method to the terminal 100 shown in fig. 1 or 2. The method comprises the following steps:
step 501, receiving a first operation signal for a picture in a picture browsing state, where the first operation signal is a signal triggered during a single-finger operation.
The step 301 may be referred to in the implementation manner of this step, and this embodiment is not described herein again.
Step 502, obtaining a duration of the first operation signal.
In this embodiment, since the zoom mode trigger signal is a long-press operation signal, in order to determine whether the received first operation signal is used for triggering image zooming, the terminal acquires the duration of the first operation signal.
In a possible implementation, the terminal receives the first operation signal, namely, starts a timer, and records the duration of the first operation signal through the timer.
Step 503, when the duration of the first operation signal reaches the first duration, displaying a target operation menu, where the target operation menu is used to trigger target operation on the picture.
In general, a long press operation on a picture may be used to trigger related operations on the picture, such as saving the picture, editing the picture, sharing the picture, and the like. In order to distinguish the above operation from the picture zooming operation, in one possible implementation, the terminal detects whether the duration of the first operation signal reaches the first duration, and displays a target operation menu (displayed on an upper layer of the picture) when the duration of the first operation signal reaches the first duration, the target operation menu being used for triggering a target operation on the picture, wherein the target operation is an operation other than the zooming operation, and the target operation is of a different type for pictures displayed in different scenes.
For example, for a picture displayed in the album application, the target operation menu includes a menu item for triggering to delete the picture, a menu item for triggering to edit the picture, and a menu item for triggering to send the picture; for the pictures displayed in the social application, the target operation menu comprises a menu item for triggering picture storage, a menu item for triggering comment pictures and a menu item for triggering picture forwarding.
Optionally, the first duration is a default duration or a duration set by a user. For example, the first duration is 1s, that is, the display of the target operation menu can be triggered by pressing the picture for 1 s.
Illustratively, as shown in fig. 6, when a long-press operation on a picture 61 is received and the long-press operation (i.e., the duration) reaches 1s, the terminal displays an operation menu 62 on an upper layer of the picture 61, where the operation menu 62 includes a save menu item, a first share menu item (for sharing the picture to an application a), and a second share menu item (for sharing the picture to an application B).
Step 504, when the duration of the first operation signal reaches a second duration, the display of the target operation menu is stopped, and the first operation signal is determined to be a zoom mode trigger signal, where the second duration is greater than the first duration.
When a user wants to perform operations other than zooming operations on a picture, after the terminal displays a target operation menu, the user usually stops long-time pressing operations and clicks a menu item displayed in the target operation menu.
In the embodiment of the present application, in order to further trigger the zoom operation on the picture, the user needs to keep the long-time pressing operation after the terminal displays the target operation menu, so as to trigger the entry into the picture zoom mode through the long-time pressing operation.
Optionally, after the duration of the first operation signal reaches the first duration, the terminal continues to detect whether the duration reaches the second duration, and determines that the first operation signal is the zoom mode trigger signal when the duration reaches the second duration. And the terminal continuously displays the target operation menu in the time period from the first time length to the second time length.
In order to avoid blocking the picture by the displayed target operation menu when the picture is subsequently zoomed, when the duration of the first operation signal reaches the second duration, the terminal stops displaying the target operation menu.
Illustratively, as shown in fig. 6, after the terminal displays the operation menu 62, the user continues to hold the long press for 0.5s (i.e., the duration is 1.5s), and the terminal determines that the duration reaches the second duration (i.e., 1.5s), thereby stopping displaying the target operation menu.
Optionally, after determining that the first operation signal is the zoom mode trigger signal, the terminal may prompt in a predetermined manner, where the prompt is used to enter the image zoom mode. For example, a text prompt or a vibration prompt is displayed on the upper layer of the picture.
In one possible embodiment, the second duration is a system default. However, since the operation habits and the reflection speeds of different users are different, that is, the time required from the viewing of the target operation menu to the stopping of the long-press operation by different users is different, if the uniform second time length is set, the operation efficiency of the users may be affected or the misoperation may be caused.
For example, if the first duration is 1s and the second duration is uniformly set to 1.5s, for a user a who reflects faster operation (for example, the user a may stop the long press operation within 0.2s after viewing the target operation menu), the interval of 0.5s between the first duration and the second duration is too long; for the user B with faster reflection (for example, the user B can only reflect after viewing the target operation menu for 0.7s, and stops the long-press operation), the interval between the first time length and the second time length and 0.5s therebetween is too short, which easily causes the false triggering of zooming.
In order to avoid the above problem, the terminal may automatically adjust the second duration according to the historical trigger duration corresponding to the target operation menu (the second duration is initially set to a larger value).
Aiming at the mode of determining the second time length, in a possible implementation mode, the terminal acquires the historical trigger time length corresponding to the target operation menu, the historical trigger time length refers to the time length between the start time and the end time of the long-press operation in the process of calling out the target operation menu through the long-press operation, and the historical trigger time length is greater than the first time length; and determining a second time length according to the historical trigger time length, wherein the second time length is more than or equal to the historical trigger time length.
Optionally, the terminal calculates an average value of the historical trigger durations of each time, so as to determine the second duration according to the average value.
In an illustrative example, corresponding to a user a, a terminal obtains historical trigger durations corresponding to a target operation menu, wherein the historical trigger durations are 1.15s, 1.2s, 1.25s, 1.2s and 1.2s respectively, so that an average value 1.2s of 5 historical trigger durations is determined as a second duration; corresponding to the user B, the terminal obtains the historical trigger durations corresponding to the target operation menu, wherein the historical trigger durations are respectively 1.6s, 1.8s, 1.7s, 1.65s and 1.75s, and accordingly the average value of 1.7s of the 5 historical trigger durations is determined as the second duration.
In step 505, if the first operation signal is a zoom mode trigger signal, the picture is amplified according to the duration of the first operation signal, wherein the amplification ratio of the picture and the duration of the first operation signal are in a positive correlation.
In one possible implementation, in the picture scaling mode, the terminal performs an amplification process on the picture according to the duration of the first operation signal, wherein the amplification ratio of the picture is k × the duration of the first operation signal; or the terminal amplifies the picture according to the duration of the first operation signal and the second duration, wherein the amplification ratio of the picture is k x (the duration of the first operation signal-the second duration), and k is a preset coefficient.
Illustratively, as shown in fig. 6, the user keeps pressing the picture for 1.5s, and the terminal enlarges the picture according to the time of the long press.
Optionally, the terminal takes a picture area located in the central area of the display screen as an amplification origin to amplify the picture; or the terminal takes the operation position of the first operation signal as an amplification origin to amplify the picture.
Step 506, after the first operation signal is terminated, when a dragging signal for the picture is received, adjusting the display position of the picture according to the dragging signal.
In the process of amplifying the picture, if the picture area to be checked is located outside the display area of the display screen, the user can drag the picture area to be checked into the display area of the display screen through dragging operation. Optionally, when the first operation signal is terminated, that is, the long-press operation is terminated, if the terminal receives a dragging signal for the picture, the display position of the picture in the display screen is adjusted according to a dragging direction and a dragging distance corresponding to the dragging signal.
Illustratively, as shown in fig. 6, when the user stops long-pressing the picture 61 and drags the picture 61, the terminal adjusts the display position of the enlarged picture 61.
And 507, when a fourth operation signal after the dragging signal is received, amplifying the picture according to the fourth operation signal, wherein the fourth operation signal is a signal triggered during single-finger operation.
Furthermore, after the picture is dragged, the terminal is still in the picture amplification mode, and the user can continue to amplify the picture through operation. In a possible implementation manner, when a fourth operation signal for the picture is received, the terminal performs amplification processing on the picture according to the fourth operation signal.
Optionally, in this embodiment, the fourth operation signal is a long press operation signal, and when the duration of the fourth operation signal is greater than a duration threshold (for example, 1s), the terminal performs amplification processing on the picture according to the duration of the fourth operation signal. Wherein the magnification ratio of the picture is in positive correlation with the duration of the fourth operation signal.
Illustratively, as shown in fig. 6, after the display position of the picture 61 is adjusted by dragging, when the user presses the picture 61 again for a long time, the terminal continues to enlarge the picture 61.
Step 508, receiving a second operation signal for the picture after the first operation signal is received.
Optionally, the second operation signal is a click operation signal of a predetermined number of times, where the predetermined number of times is greater than or equal to 2.
Optionally, when the fourth operation signal is terminated, the user may also switch the picture scaling mode by triggering the second operation signal.
Illustratively, as shown in fig. 6, when the user stops long-pressing and double-clicks the picture 61, the terminal switches from the picture enlargement mode to the picture reduction mode.
In step 509, if the second operation signal is the zoom mode switching signal, the picture is reduced according to the duration of the third operation signal, wherein the reduction ratio of the picture and the duration of the third operation signal are in a positive correlation.
Similar to the determination of the magnification ratio according to the duration of the first operation signal in the picture magnification mode, when the second operation signal is the zoom mode switching signal, the terminal determines the reduction ratio of the picture according to the duration of a third operation signal (such as a long press operation signal) after the second operation signal, so as to reduce the picture according to the reduction ratio.
Illustratively, as shown in fig. 6, after the user switches to the picture reduction mode by double-clicking, the picture 61 is reduced by long-pressing.
Optionally, the terminal takes a picture area located in the central area of the display screen as a reduction origin to reduce the picture; or the terminal reduces the picture by taking the operation position of the third operation signal as a reduction origin.
When it needs to be described, in the image reduction mode, the user may adjust the display position of the image through a dragging operation, and continue to reduce the image through a long-press operation after the adjustment is completed, which is not described in detail in this embodiment.
In this embodiment, the terminal amplifies the picture according to the duration of the first operation signal, and/or reduces the picture according to the duration of the third operation signal, that is, the user can zoom the picture by long-pressing, so that the operation of zooming the picture is simplified, and the efficiency of zooming the picture is improved.
In addition, the terminal distinguishes the target operation and the zooming operation on the picture according to the duration of the first operation signal, so that false triggering among different operations is avoided, and the accuracy of the zooming operation is improved.
In addition, the terminal dynamically determines the second time length according to the historical trigger time length corresponding to the target operation menu instead of adopting the uniformly set second time length, so that the trigger operation of entering the picture zooming mode conforms to the use habit of a user, the picture zooming efficiency is improved, and meanwhile, the probability of misoperation is reduced.
In another possible implementation manner, in order to distinguish the picture scaling operation from other operations performed on the picture, the terminal sets the scaling mode trigger signal triggering the entering of the scaling mode to include the target sliding operation signal and the long press operation signal after the target sliding operation signal, that is, the user needs to perform the sliding operation by using a single finger and keep the long press operation at the sliding end point to trigger the entering of the picture scaling mode. On the basis of fig. 5, as shown in fig. 7, steps 502 to 504 may be replaced with the following steps.
Step 510, obtaining a sliding track indicated by the sliding operation signal in the first operation signal, and a duration of the long press operation signal in the first operation signal.
Optionally, when the first operation signal is a signal triggered by a single-finger operation, the terminal further obtains a sliding track indicated by the sliding operation signal in the first operation signal, and a duration of the long-press operation signal in the first operation signal, where the sliding operation signal and the long-press operation signal are continuous signals, that is, the long-press position indicated by the long-press operation signal is a sliding end point indicated by the sliding operation signal.
Further, the terminal detects whether the sliding track is matched with a target sliding track indicated by the target sliding operation, and detects whether the duration of the long-press operation signal reaches a third duration, wherein the target sliding track may be set by default or manually set by a user. Optionally, the terminal may calculate a trajectory similarity between the sliding trajectory and the target sliding trajectory, and determine that the sliding trajectory matches the target sliding trajectory when the trajectory similarity is greater than a similarity threshold (e.g., 85%).
In step 511, if the sliding track matches the target sliding track indicated by the target sliding operation and the duration of the long press operation signal reaches the third duration, it is determined that the first operation signal is the zoom mode trigger signal.
When the sliding track is matched with the target sliding track and the duration of the long press operation signal reaches a third duration (for example, 1s), the terminal determines that the first operation signal is a zoom mode trigger signal, and further performs picture zooming through steps 505 to 509.
Schematically, as shown in fig. 8, when the target sliding track is a circular track and the third duration is 1s, the user uses a finger to draw a circle on the display screen and then keeps pressing for a long time, so as to trigger entering a picture magnification mode, thereby magnifying the picture.
In order to further reduce the probability of misoperation, in a possible implementation, the terminal can start the picture zooming function provided by the method only when the terminal is held by one hand. Optionally, in each of the above embodiments, after receiving the first operation signal for the picture, the terminal obtains a current holding state of the terminal and an operation position corresponding to the first operation signal, and performs amplification processing on the picture according to the first operation signal when the first operation signal is a zoom mode trigger signal and the operation position is located in a one-handed operation area corresponding to the (current) holding state, where the holding state includes a left-handed holding state and a right-handed holding state.
In an illustrative example, the terminal acquires that the current holding state is a right-hand holding state, and determines a one-hand operation area (which may be preset or generated according to a user's usage habit) corresponding to a thumb of a right hand in the right-hand holding state, and when the operation position of the first operation signal is located in the one-hand operation area corresponding to the thumb of the right hand and the first operation signal is a zoom mode trigger signal, the terminal enters the picture zoom mode; otherwise, the terminal will respond to the first operation signal according to conventional response logic.
Referring to fig. 9, a block diagram of a picture scaling apparatus according to an embodiment of the present application is shown. The apparatus may be implemented as all or a portion of the terminal in software, hardware, or a combination of both. The device includes:
a first receiving module 901, configured to receive a first operation signal for a picture in a picture browsing state, where the first operation signal is a signal triggered during a single-finger operation;
an amplifying module 902, configured to, when the first operation signal is a zoom mode trigger signal, amplify the picture according to the first operation signal;
a second receiving module 903, configured to receive a second operation signal for the picture after receiving the first operation signal;
a scaling module 904, configured to, when the second operation signal is a scaling mode switching signal, scale down the picture according to a third operation signal received after the second operation signal, where the second operation signal and the third operation signal are signals triggered during a single-finger operation.
Optionally, the amplifying module 902 is configured to:
amplifying the picture according to the duration of the first operation signal, wherein the amplification ratio of the picture is in positive correlation with the duration of the first operation signal;
the zoom-out module 904 is configured to:
and performing reduction processing on the picture according to the duration of the third operation signal, wherein the reduction ratio of the picture is in positive correlation with the duration of the third operation signal.
Optionally, the apparatus further comprises:
the first acquisition module is used for acquiring the duration of the first operation signal;
the display module is used for displaying a target operation menu when the duration of the first operation signal reaches a first duration, wherein the target operation menu is used for triggering target operation on the picture;
and the first determining module is used for stopping displaying the target operation menu when the duration of the first operation signal reaches a second duration, and determining that the first operation signal is the zooming mode trigger signal, wherein the second duration is longer than the first duration.
Optionally, the apparatus further comprises:
a second obtaining module, configured to obtain a historical trigger duration corresponding to the target operation menu, where the historical trigger duration is a duration between a start time and an end time of a long-press operation in a process of calling out the target operation menu by the long-press operation, and the historical trigger duration is greater than the first duration;
and the second determining module is used for determining the second time length according to the historical trigger time length, wherein the second time length is more than or equal to the historical trigger time length.
Optionally, the zoom mode trigger signal includes a target sliding operation signal and a long-press operation signal after the target sliding operation signal, and the apparatus further includes:
a third obtaining module, configured to obtain a sliding track indicated by a sliding operation signal in the first operation signal, and a duration of a long-press operation signal in the first operation signal;
and a third determining module, configured to determine that the first operation signal is the scaling mode trigger signal if the sliding trajectory is matched with the target sliding trajectory indicated by the target sliding operation signal and the duration of the long press operation signal reaches a third duration.
Optionally, the apparatus further comprises:
the adjusting module is used for adjusting the display position of the picture according to a dragging signal when the dragging signal for the picture is received after the first operation signal is stopped;
the amplifying module 902 is further configured to, when a fourth operation signal after the dragging signal is received, amplify the picture according to the fourth operation signal, where the fourth operation signal is a signal triggered during a single-finger operation.
Optionally, the apparatus further comprises:
a fourth obtaining module, configured to obtain a current holding state of the terminal and an operation position corresponding to the first operation signal, where the holding state includes a left-hand holding state and a right-hand holding state;
the amplifying module 902 is further configured to:
and if the first operation signal is the zooming mode trigger signal and the operation position is located in a single-hand operation area corresponding to the holding state, amplifying the picture according to the first operation signal.
Optionally, the second operation signal is a click operation signal of a predetermined number of times, where the predetermined number of times is greater than or equal to 2.
In summary, with the image zooming apparatus provided in the embodiment of the present application, in an image browsing state, when a first operation signal to the image is received and the first operation signal is a zooming mode trigger signal, the terminal amplifies the image according to the first operation signal; when a second operation signal after receiving the first operation signal is a zoom mode switching signal, the terminal receives a third operation signal after receiving the second operation signal to perform zoom-out processing on the picture; compared with the prior art that the image can be zoomed only by using two fingers and cannot be zoomed by using one hand, in the embodiment of the application, the image can be zoomed and zoomed out by using the operation signal triggered by the operation of the one finger, so that a user can zoom the image by using one hand under the condition that the user does not use two hands conveniently, and the convenience and the efficiency of zooming the image are improved.
The embodiment of the present application further provides a computer-readable medium, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the picture scaling method according to the above embodiments.
The embodiment of the present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the picture scaling method according to the above embodiments.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (9)

1. A method for picture scaling, the method comprising:
receiving a first operation signal for a picture in a picture browsing state, wherein the first operation signal is a signal triggered during single-finger operation;
acquiring the duration of the first operation signal;
when the duration of the first operation signal reaches a first duration, displaying a target operation menu, wherein the target operation menu is used for triggering target operation on the picture;
when the duration of the first operation signal reaches a second duration, stopping displaying the target operation menu, and determining that the first operation signal is a zoom mode trigger signal, wherein the second duration is greater than the first duration, and the zoom mode trigger signal is a long-press operation signal;
if the first operation signal is a zoom mode trigger signal, amplifying the picture according to the duration of the first operation signal, wherein the amplification ratio of the picture and the duration of the first operation signal are in a positive correlation;
receiving a second operation signal for the picture after the first operation signal is received;
if the second operation signal is a zoom mode switching signal, the picture is zoomed out according to the duration of receiving a third operation signal after the second operation signal, the second operation signal and the third operation signal are signals triggered during one-finger operation, and the zoom-out ratio of the picture and the duration of the third operation signal are in positive correlation.
2. The method of claim 1, further comprising:
acquiring historical trigger time corresponding to the target operation menu, wherein the historical trigger time refers to the time between the start time and the end time of long-press operation in the process of calling out the target operation menu by long-press operation, and the historical trigger time is longer than the first time;
and determining the second time length according to the historical trigger time length, wherein the second time length is more than or equal to the historical trigger time length.
3. The method according to claim 1, wherein the zoom mode trigger signal comprises a target slide operation signal and a long press operation signal after the target slide operation signal, and after receiving the first operation signal on the picture, the method comprises:
acquiring a sliding track indicated by a sliding operation signal in the first operation signal and the duration of a long press operation signal in the first operation signal;
and if the sliding track is matched with the target sliding track indicated by the target sliding operation signal and the duration of the long press operation signal reaches a third duration, determining that the first operation signal is the zooming mode trigger signal.
4. The method according to any one of claims 1 to 3, wherein after the amplifying the picture according to the first operation signal, the method further comprises:
after the first operation signal is terminated, when a dragging signal for the picture is received, adjusting the display position of the picture according to the dragging signal;
and when a fourth operation signal after the dragging signal is received, amplifying the picture according to the fourth operation signal, wherein the fourth operation signal is a signal triggered during single-finger operation.
5. The method according to any one of claims 1 to 3, wherein after receiving the first operation signal for the picture, the method further comprises:
acquiring a current holding state of the terminal and an operation position corresponding to the first operation signal, wherein the holding state comprises a left-hand holding state and a right-hand holding state;
if the first operation signal is a zoom mode trigger signal, performing amplification processing on the picture according to the first operation signal, including:
and if the first operation signal is the zooming mode trigger signal and the operation position is located in a single-hand operation area corresponding to the holding state, amplifying the picture according to the first operation signal.
6. The method according to any one of claims 1 to 3, wherein the second operation signal is a predetermined number of click operation signals, and the predetermined number is 2 or more.
7. A picture scaling apparatus, characterized in that the apparatus comprises:
the first receiving module is used for receiving a first operation signal for the picture in a picture browsing state, wherein the first operation signal is a signal triggered during single-finger operation;
the first acquisition module is used for acquiring the duration of the first operation signal;
the display module is used for displaying a target operation menu when the duration of the first operation signal reaches a first duration, wherein the target operation menu is used for triggering target operation on the picture;
a first determining module, configured to stop displaying the target operation menu when a duration of the first operation signal reaches a second duration, and determine that the first operation signal is a zoom mode trigger signal, where the second duration is greater than the first duration, and the zoom mode trigger signal is a long-press operation signal;
the amplifying module is used for amplifying the picture according to the duration of the first operation signal when the first operation signal is a zoom mode trigger signal, wherein the amplification ratio of the picture is in positive correlation with the duration of the first operation signal;
the second receiving module is used for receiving a second operation signal of the picture after the first operation signal is received;
and the zooming-out module is used for zooming out the picture according to the duration of receiving a third operation signal after the second operation signal when the second operation signal is a zooming mode switching signal, the second operation signal and the third operation signal are signals triggered during single-finger operation, and the zooming-out proportion of the picture and the duration of the third operation signal are in positive correlation.
8. A terminal, characterized in that the terminal comprises a processor and a memory; the memory stores at least one instruction for execution by the processor to implement the picture scaling method of any of claims 1 to 6.
9. A computer-readable storage medium storing at least one instruction for execution by a processor to implement the picture scaling method of any of claims 1 to 6.
CN201910523714.3A 2019-06-17 2019-06-17 Picture scaling method, device, terminal and storage medium Active CN110244889B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910523714.3A CN110244889B (en) 2019-06-17 2019-06-17 Picture scaling method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910523714.3A CN110244889B (en) 2019-06-17 2019-06-17 Picture scaling method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110244889A CN110244889A (en) 2019-09-17
CN110244889B true CN110244889B (en) 2021-07-13

Family

ID=67887558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910523714.3A Active CN110244889B (en) 2019-06-17 2019-06-17 Picture scaling method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110244889B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112099690B (en) * 2020-09-15 2024-07-02 深圳市欢太科技有限公司 Page scaling method, device, terminal and storage medium
CN112395200B (en) * 2020-11-25 2024-04-02 电信科学技术第十研究所有限公司 Method and device for determining probability of software reliability operation profile

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901107A (en) * 2009-05-28 2010-12-01 三星电子株式会社 Can be based on the mobile device and the control method thereof that touch convergent-divergent
CN103699331A (en) * 2014-01-07 2014-04-02 东华大学 Gesture method for controlling screen zooming
CN105260103A (en) * 2015-10-08 2016-01-20 广东欧珀移动通信有限公司 Picture scaling method and electronic device
CN107368253A (en) * 2017-07-06 2017-11-21 努比亚技术有限公司 Picture Zoom display method, mobile terminal and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100835956B1 (en) * 2006-12-04 2008-06-09 삼성전자주식회사 Method for processing image of mobile communication terminal
KR101443617B1 (en) * 2007-10-10 2014-09-23 엘지전자 주식회사 Mobile terminal and method for controlling the same
CN101763214A (en) * 2009-12-30 2010-06-30 宇龙计算机通信科技(深圳)有限公司 Mobile terminal display page zoom method, system and mobile terminal
CN102479041A (en) * 2010-11-25 2012-05-30 英业达股份有限公司 Operation method for resizing picture on small touch screen by one hand
EP3054834B1 (en) * 2013-10-07 2019-12-25 Acist Medical Systems, Inc. Systems and methods for controlled single touch zoom
CN106775370A (en) * 2015-11-25 2017-05-31 中兴通讯股份有限公司 The Zoom method and device of picture

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901107A (en) * 2009-05-28 2010-12-01 三星电子株式会社 Can be based on the mobile device and the control method thereof that touch convergent-divergent
CN103699331A (en) * 2014-01-07 2014-04-02 东华大学 Gesture method for controlling screen zooming
CN105260103A (en) * 2015-10-08 2016-01-20 广东欧珀移动通信有限公司 Picture scaling method and electronic device
CN107368253A (en) * 2017-07-06 2017-11-21 努比亚技术有限公司 Picture Zoom display method, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN110244889A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
US11490017B2 (en) Digital viewfinder user interface for multiple cameras
US10990278B2 (en) Method and device for controlling information flow display panel, terminal apparatus, and storage medium
EP3779684B1 (en) Icon display method, device and terminal
KR102571369B1 (en) Display control method, storage medium and electronic device for controlling the display
EP3907591A1 (en) File processing method and device, terminal, and storage medium
EP2487578B1 (en) Method and system for controlling screen of mobile terminal
EP3680764B1 (en) Icon moving method and device
US20100107116A1 (en) Input on touch user interfaces
US11747977B2 (en) Method for displaying graphical user interface based on gesture and electronic device
US20120064946A1 (en) Resizable filmstrip view of images
CN111443863A (en) Page control method and device, storage medium and terminal
WO2017101445A1 (en) Method for responding to operation track and operation track response apparatus
CN111782332A (en) Application interface switching method and device, terminal and storage medium
CN110825302A (en) Method for responding operation track and operation track responding device
KR20130133980A (en) Method and apparatus for moving object in terminal having touchscreen
CN112099707A (en) Display method and device and electronic equipment
CN110968364B (en) Method and device for adding shortcut plugins and intelligent device
US20240184417A1 (en) Application icon display method and apparatus, and electronic device
CN110244889B (en) Picture scaling method, device, terminal and storage medium
CN113282213A (en) Interface display method and device
KR20130116976A (en) Mobile terminal and method for controlling thereof
WO2024169824A1 (en) Page control method and apparatus, and electronic device
CN112764622A (en) Icon moving method and device and electronic equipment
CN113377250A (en) Application program interface display method and device and terminal equipment
CN112416234B (en) Application program interface switching method and device, terminal and storage medium

Legal Events

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