A method, apparatus, and electronic device for image scaling

By setting zoom boundaries and automatically adsorbing images on the editing page, the problem of inefficient resizing of high-definition images on devices that do not support Retina display technology is solved, enabling fast and convenient image resizing and improving user experience.

CN112684966BActive Publication Date: 2024-10-15ADVANCED NEW TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110096240.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-12-13
Publication Date
2024-10-15
Estimated Expiration
2037-12-13

AI Technical Summary

Technical Problem

In the existing technology, when high-definition images are displayed on a device that does not support Retina display technology, the image size needs to be manually adjusted, which is inefficient and lacks a quick adjustment solution.

Method used

By determining the size of the image and setting the scaling boundary on the editing page, when the adjustment operation is triggered, the image will automatically snap to the scaling boundary to achieve automatic adjustment.

Benefits of technology

Improved the efficiency of image resizing and improved user experience, especially when dealing with high-pixel images in the editing page.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112684966B_ABST
    Figure CN112684966B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a method, device and electronic device for image zooming, the method comprising: after inserting a high-pixel image to be processed in an editing page, pre-setting a zoom boundary according to the size of the image to be processed displayed in the editing page; when a zoom adjustment operation is triggered for the image to be processed, the image to be processed is automatically adsorbed and adjusted to the corresponding zoom boundary to obtain an adjusted image.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of “A method, device and electronic device for image zooming” (application date: December 13, 2017, application number: 201711328508.4). Technical Field

[0002] The present invention relates to the field of computer technology, and in particular to a method, device and electronic device for image zooming. Background Art

[0003] With the development of display technology, people have higher and higher requirements for the display effect of display devices. In existing technologies, for example, Retina display technology can compress the pixels in the screen to achieve higher resolution and improve the fineness of the screen display. This resolution is enough to make the human eye unable to distinguish the individual pixels at a normal viewing distance.

[0004] However, in some application scenarios, for example, high-definition pictures obtained based on Retina display devices have higher pixels. If the high-definition pictures are displayed on a device that does not support Retina display technology, the size of the displayed high-definition pictures will be too large. It is necessary to adjust the size of the high-definition pictures by dragging with fingers or a mouse in order to restore the original size of the high-definition pictures (i.e., the size on the Retina display device).

[0005] Based on the existing technology, a solution that can adjust the image size faster is needed. Summary of the invention

[0006] The embodiments of the present specification provide a method, device and electronic device for scaling an image, which are used to solve the following technical problem: a solution capable of adjusting the image size more quickly is required.

[0007] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0008] An image scaling method provided in an embodiment of the present specification includes:

[0009] Determine the size of the image to be processed that is displayed on the editing page;

[0010] According to the size of the image to be processed, setting the scaling boundary of the image to be processed in the editing page;

[0011] When an adjustment operation on the image to be processed is triggered, the image to be processed is adsorbed to the scaling boundary.

[0012] An image scaling device provided in an embodiment of the present specification includes:

[0013] The measurement module determines the size of the image to be processed displayed on the editing page;

[0014] A setting module, which sets a scaling boundary of the image to be processed in the editing page according to the size of the image to be processed;

[0015] The adjustment module, when an adjustment operation on the image to be processed is triggered, adsorbs the image to be processed to the scaling boundary.

[0016] An electronic device provided in an embodiment of the present specification includes:

[0017] at least one processor; and,

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0020] Determine the size of the image to be processed that is displayed on the editing page;

[0021] According to the size of the image to be processed, setting the scaling boundary of the image to be processed in the editing page;

[0022] When an adjustment operation on the image to be processed is triggered, the image to be processed is adsorbed to the scaling boundary.

[0023] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0024] In the editing page, a zoom boundary is set for the image to be processed with higher pixels. When the zoom operation on the image to be processed is triggered, the image to be processed is automatically adjusted to the zoom boundary, which can effectively improve the efficiency of adjusting the image size and enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 A schematic diagram of a picture scaling process involved in a practical application scenario of the solution of this specification;

[0027] Figure 2A schematic diagram of a flow chart of a method for image scaling provided in an embodiment of this specification;

[0028] Figure 3 A schematic diagram of scaling an image based on a set of scaling boundaries provided in an embodiment of this specification;

[0029] Figure 4 A schematic diagram of scaling an image based on multiple groups of scaling boundaries provided in an embodiment of this specification;

[0030] Figure 5 A schematic diagram of a picture zooming device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0032] Figure 1 This is a schematic diagram of the image scaling process involved in the solution of this specification in an actual application scenario. After inserting the image to be processed (e.g., a high-definition image obtained based on Retina display technology) into an editing page (e.g., a rich text editing page), determine the size of the currently displayed image to be processed; further, determine the corresponding scaling boundary based on the current display size, for example, the size of the high-definition image is 100×100, and the size of the corresponding scaling boundary is 50×50; based on the adjustment operation on the image to be processed (e.g., drag operation and / or click operation), the image to be processed is automatically adsorbed to the pre-set scaling boundary. During the scaling operation of the image to be processed, the operator does not need to specify the scaled size of the image to be processed, and the image to be processed will be automatically adsorbed to the size limited by the corresponding adjustment boundary, effectively improving the efficiency of adjusting the image size in the editing page.

[0033] It should be noted that the editing page can be a rich text editing page such as a browser editing page, a mailbox editing page, an editing page of a text editing application, etc.; the image to be processed can be a high-definition image with high pixels. The technical solution of this embodiment can be applied to terminal devices such as mobile phones and computers that support rich text editing pages.

[0034] Based on the above scenario, the solution of this specification is described in detail below.

[0035] Figure 2A schematic diagram of a flow chart of a method for image scaling provided in an embodiment of this specification, the method may specifically include the following steps:

[0036] Step S202: Determine the size of the image to be processed displayed on the editing page; wherein the size of the image to be processed displayed on the editing page is larger than the original size of the image to be processed.

[0037] In the editing page, text and pictures may need to be edited. If the picture to be processed inserted into the editing page is a high-definition picture with higher pixels, the display size in the editing page will exceed the original size (for example, the picture exceeds the border of the editing page). Therefore, the size of the picture to be processed needs to be adjusted.

[0038] For example, suppose that the image to be processed is a high-definition image obtained based on Retina display technology. And suppose that when the image to be processed is displayed on a display device that supports Retina display technology, its pixel size is 50×50 (that is, the original size of the image to be processed). If the image to be processed is edited on a terminal device that does not support Retina display technology, such as inserting it into an editing page, the pixel size of the image to be processed displayed on the editing page is 100×100.

[0039] It should be noted that the size mentioned here can be a size determined based on pixels, or a size determined based on centimeters or millimeters; when the resolution is determined, the correspondence between pixels and centimeters is also determined.

[0040] Step S204: according to the size of the image to be processed, setting a scaling boundary corresponding to the image to be processed.

[0041] As can be seen from the above content, the size of the image to be processed refers to the size displayed on the editing page (the size that has not been adjusted). The size displayed on the editing page is often larger than the original size. Usually, users need to reduce the size of the image to be processed on the editing page. Of course, if the user wants to display the image to be processed more clearly, the image to be processed can also be further enlarged based on the size of the image to be processed.

[0042] The scaling boundary is determined based on the border or boundary line of the image to be processed. For example, if the image to be processed is a rectangular image with 2x HD and needs to be reduced to its original size, then the long and wide borders of the image to be processed can be reduced to half of their original length and width based on the vertex in the upper left corner of the image to be processed. The resulting rectangular area can be considered as a set of scaling boundaries corresponding to the image to be processed.

[0043] Step S206: when an adjustment operation for the image to be processed is triggered, the image to be processed is adjusted to the zoom boundary to obtain an adjusted image.

[0044] It is easy to understand that the adjustment operation mentioned here may include: dragging, pulling, dropping and / or clicking and the like, and the operation may be directed to any one or more borders of the image to be processed.

[0045] Since the scaling boundary is set, when adjusting the size of the image to be processed, it is possible to determine which scaling boundary needs to be automatically adjusted according to the location of the scaling operation, combined with the scaling direction and distance, etc.

[0046] It should be noted that the adjusted image may have the same pixels as the original size, or may have more or fewer pixels than the original size.

[0047] Through the above steps, in the editing page, a zoom boundary is set for the image to be processed with higher pixels. When the zoom operation for the image to be processed is triggered, the image to be processed is automatically adjusted to the size corresponding to the zoom boundary, which can effectively improve the efficiency of adjusting the image size.

[0048] In one or more embodiments of the present specification, setting scaling boundaries corresponding to the image to be processed according to the size of the image to be processed may specifically include: setting multiple groups of scaling boundaries corresponding to the image to be processed according to the size of the image to be processed and the effective display area of ​​the editing page; or setting a group of scaling boundaries corresponding to the image to be processed according to the original size of the image to be processed and the effective display area of ​​the editing page.

[0049] It is easy to understand that in order to meet different zooming requirements of users, multiple groups of zoom boundaries corresponding to different sizes can be determined for the image to be processed. Generally speaking, a group of zoom boundaries can include multiple boundaries used to constitute the image to be processed, or at least one boundary, or a marking point that indicates the position of the zoom boundary.

[0050] Generally speaking, the number of pixels of a high-definition image obtained based on Retina display technology is usually 2 or 3 times the number of pixels of an image of the same size. The pixels of the image to be processed displayed in a device that supports Retina display technology are compressed and displayed at the original size. However, for devices that do not support Retina display technology, the pixel size of the image to be processed displayed in the effective display area of ​​its editing page is 2 or 3 times the original size. When the image to be processed obtained based on the display technology of n-fold magnification is reduced, the reduced size can be 1 / n, and the corresponding scaling boundary can be determined based on the reduction ratio of 1 / n. Moreover, the scaling boundary can achieve a proportional reduction in the length and width of the image to be processed without changing the aspect ratio of the image to be processed.

[0051] In one or more embodiments of the present specification, when an adjustment operation on the image to be processed is triggered, the image to be processed is adjusted to the zoom boundary, which may specifically include: when an adjustment operation on the image to be processed is triggered, determining the action position and / or adjustment direction of the adjustment operation; based on the action position and / or the adjustment direction, automatically adsorbing the image to be processed to the zoom boundary.

[0052] The adjustment operation may be triggered by a finger, a stylus, or a mouse. For example, the adjustment operation is a drag operation, a single click, or a double click. Specifically, the drag operation may drag the vertex or border of the image to be processed, and the single click or double click operation may operate on the zoom boundary corresponding to the image to be processed.

[0053] The action position can be understood as the position where the adjustment operation acts on the image to be processed. Of course, a control with a zoom function can also be triggered by a finger or a stylus, or a position in the effective area supporting the zoom function can be triggered. The adjustment direction can be understood as the direction of action when adjusting by a finger, a mouse or a stylus.

[0054] For example, the adjustment operation is a drag operation, and the vertex of the image to be processed can be dragged by the mouse, and dragged in the direction of the zoom boundary. After determining the drag direction, the user releases the drag operation of the mouse, and the image to be processed will be automatically adsorbed to the zoom boundary.

[0055] In one or more embodiments of this specification, Figure 3A schematic diagram of scaling an image using a set of scaling boundaries provided in an embodiment of the present specification. After a set of scaling boundaries corresponding to the image to be processed is set, the image to be processed is automatically adsorbed to the scaling boundaries based on the action position and / or adjustment direction. Specifically, it may include: based on the action position and / or adjustment direction, monitoring the adjustment distance for the image to be processed; when the adjustment distance is greater than a preset automatic adjustment threshold, automatically adsorbing the image to be processed to the scaling boundaries.

[0056] like Figure 3 As shown, the adjustment distance a corresponding to the adjustment operation on the image to be processed is monitored, assuming that the preset automatic adjustment threshold is b; when the user drags the lower right corner of the image to be processed, and the dragging distance is a, then when the user drags to the position a>b, the user releases the dragging operation, and the image to be processed can be automatically adsorbed to the preset zoom boundary.

[0057] In one or more embodiments of this specification, Figure 4 A schematic diagram of scaling an image using multiple sets of scaling boundaries provided in an embodiment of this specification, after setting multiple sets of scaling boundaries corresponding to the image to be processed, automatically adsorbing the image to be processed to the scaling boundaries based on the action position and / or adjustment direction, can specifically include: monitoring the adjustment distance for the image to be processed based on the action position and / or adjustment direction; determining the interval between the boundary of the image to be processed and multiple scaling boundaries based on the adjustment distance; and automatically adsorbing the image to be processed to the scaling boundary with the closest interval distance.

[0058] In practical applications, in order to meet the diverse needs of users, such as Figure 4 As shown, multiple groups of zoom boundaries can be set for the image to be processed based on the rich text editing page, for example, it can be set to reduce by half (as shown in the first zoom boundary in the figure) or to enlarge by 2 times (as shown in the second zoom boundary in the figure). When zooming in and out of the image to be processed, it is necessary to determine which zoom boundary the user wants to zoom to.

[0059] A judgment method, one implementation of which may include: monitoring the adjustment distance of the user when adjusting the image to be processed, and the position of the end point of the adjustment operation, and further judging the interval between the position of the current end point and each zoom boundary (for example, the vertical distance from the position of the end point to each zoom boundary), and taking the zoom boundary with the smallest interval as the target zoom boundary; after determining the target zoom boundary, the image to be processed can be automatically adsorbed or rebounded to the corresponding zoom boundary.

[0060] Another implementation may include: monitoring and comparing the intervals between the boundary lines of the current image to be processed and multiple groups of zoom boundary lines; wherein each group of zoom boundaries includes multiple boundary lines at the same time, and determining the minimum intervals between the boundary lines of each group of zoom boundaries and the boundary lines of the current image to be processed, and further, comparing the minimum intervals determined for each group; determining the target zoom boundary based on the comparison result; and automatically adsorbing or rebounding the image to be processed to the corresponding zoom boundary.

[0061] In the editing page, set the scaling boundary of the image to be processed with higher pixels. When the scaling operation for the image to be processed is triggered, the image to be processed is automatically adjusted to the scaling boundary, which can effectively improve the efficiency of adjusting the image size and enhance the user experience.

[0062] Based on the same idea, the embodiment of this specification also provides a picture scaling device, such as Figure 5 As shown, the device may specifically include:

[0063] The measuring module 501 determines the size of the image to be processed displayed on the editing page; wherein the size of the image to be adjusted displayed on the editing page is larger than the original size of the image to be processed;

[0064] A setting module 502, setting a scaling boundary corresponding to the image to be processed according to the size of the image to be processed;

[0065] The adjustment module 503 adjusts the image to be processed to the scaling boundary to obtain an adjusted image when an adjustment operation on the image to be processed is triggered.

[0066] Furthermore, the setting module 502 sets the scaling boundaries corresponding to the image to be processed according to the size of the image to be processed, which may specifically include: the setting module 502 sets multiple groups of scaling boundaries corresponding to the image to be processed according to the size of the image to be processed and the effective display area of ​​the editing page; or the setting module 502 sets a group of scaling boundaries corresponding to the image to be processed according to the original size of the image to be processed and the effective display area of ​​the editing page.

[0067] The adjustment module 503, when an adjustment operation on the image to be processed is triggered, adjusts the image to be processed to the zoom boundary, which may specifically include: when an adjustment operation on the image to be processed is triggered, determining the action position and / or adjustment direction of the adjustment operation; based on the action position and / or the adjustment direction, automatically adsorbing the image to be processed to the zoom boundary.

[0068] Further, based on the action position and / or adjustment direction, the adjustment module 503 monitors the adjustment distance corresponding to the adjustment operation on the image to be processed; when the adjustment distance is greater than a preset automatic adjustment threshold, the image to be processed is automatically adsorbed to the zoom boundary.

[0069] Furthermore, based on the action position and / or adjustment direction, the adjustment module 503 monitors the adjustment distance of the image to be processed; according to the adjustment distance, determines the interval between the boundary of the image to be processed and the multiple zoom boundaries, and automatically adsorbs the image to be processed to the zoom boundary with the shortest interval distance.

[0070] Furthermore, the editing page includes: a text editing page and / or a rich text editing page.

[0071] Based on the same idea, an embodiment of this specification also provides an electronic device, including:

[0072] at least one processor; and,

[0073] a memory communicatively connected to the at least one processor; wherein,

[0074] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0075] Determine the size of the image to be processed displayed on the editing page; wherein the size of the image to be processed displayed on the editing page is larger than the original size of the image to be processed;

[0076] According to the size of the picture to be processed, setting a scaling boundary corresponding to the picture to be processed;

[0077] When an adjustment operation for the image to be processed is triggered, the image to be processed is adjusted to the scaling boundary to obtain an adjusted image.

[0078] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0079] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0080] The apparatus, electronic device, non-volatile computer storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, electronic device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, electronic device and non-volatile computer storage medium will not be repeated here.

[0081] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0082] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0083] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0084] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0085] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0086] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0087] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0089] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0090] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0091] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0092] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0093] The specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media including storage devices.

[0094] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0095] The above is only an embodiment of this specification and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for scaling an image, comprising: Determine the size of the image to be processed that is displayed on the editing page; According to the size of the image to be processed, setting the scaling boundary of the image to be processed in the editing page, wherein the scaling boundary is a plurality of groups of scaling boundaries corresponding to the image to be processed and set according to the size of the image to be processed and the effective display area of ​​the editing page; When the first adjustment operation for the image to be processed is triggered, the image to be processed is automatically adsorbed to the scaling boundary that is closest to the boundary of the image to be processed.

2. The method according to claim 1, wherein, according to the size of the image to be processed, setting the scaling boundary of the image to be processed in the editing page comprises: The scaling boundary of the image to be processed in the editing page is set according to the ratio of the size of the image to be processed displayed in the editing page to its original size, wherein the original size is the size of the image to be processed displayed in the device that outputs the image to be processed.

3. The method according to claim 1, wherein, according to the size of the image to be processed, setting the scaling boundary of the image to be processed in the editing page comprises: The boundary generated when the size of the image to be processed displayed on the editing page is scaled to its original size is set as the scaling boundary of the image to be processed on the editing page, and the original size is the size of the image to be processed displayed on the device that outputs the image to be processed.

4. The method according to claim 3, wherein the editing page comprises: At least one of a text editing page and a rich text editing page; The device that outputs the image to be processed includes a device based on Retina display technology.

5. The method according to claim 1, wherein triggering a first adjustment operation on the image to be processed comprises: An adjustment operation is triggered in a valid display area corresponding to the image to be processed, and the valid display area includes an area that supports a function of scaling the image to be processed.

6. The method according to claim 5, wherein the adjustment operation triggered in the effective display area comprises: A dragging operation of dragging the vertices or borders of the image to be processed, and a single-click or double-click operation on the zoom boundary corresponding to the image to be processed.

7. The method according to claim 1, wherein triggering a first adjustment operation on the image to be processed comprises: An operation of triggering a control with a zoom function to adjust the image to be processed.

8. The method of claim 1, further comprising: When a second adjustment operation on the image to be processed is triggered, determining an action position and / or an adjustment direction of the adjustment operation; Based on the action position and / or the adjustment direction, determining a target zoom boundary of the image to be processed from the set multiple groups of zoom boundaries; Adsorb the image to be processed to the target scaling boundary.

9. The method of claim 8, wherein the action position of the adjustment operation comprises the position of the end point of the adjustment operation; Based on the action position, determining a target scaling boundary of the to-be-processed picture from the set multiple groups of scaling boundaries includes: Determining the interval between the position of the adjustment operation end point and each set group of the scaling boundaries; Taking the scaling boundary with the smallest interval as the target scaling boundary; Adsorb the image to be processed to the target scaling boundary.

10. The method of claim 1, wherein when the first adjustment operation on the image to be processed is triggered, automatically adsorbing the image to be processed to the scaling boundary that is closest to the boundary of the image to be processed comprises: Respectively determining the minimum intervals between the boundary lines of the to-be-processed image and the boundary lines of each set group of the scaling boundaries; Comparing the determined minimum intervals, and determining a target scaling boundary that is closest to the boundary interval distance of the image to be processed; The image to be processed is automatically adsorbed to the target zoom boundary.

11. A picture zooming device, comprising: The measurement module determines the size of the image to be processed displayed on the editing page; A setting module, which sets the scaling boundary of the image to be processed in the editing page according to the size of the image to be processed, wherein the scaling boundary is a plurality of groups of scaling boundaries corresponding to the image to be processed and set according to the size of the image to be processed and the effective display area of ​​the editing page; The adjustment module, when triggering a first adjustment operation on the image to be processed, automatically adsorbs the image to be processed to the scaling boundary that is closest to the boundary of the image to be processed.

12. The apparatus of claim 11, wherein, according to the size of the image to be processed, setting the scaling boundary of the image to be processed in the editing page comprises: The scaling boundary of the image to be processed in the editing page is set according to the ratio of the size of the image to be processed displayed in the editing page to its original size, wherein the original size is the size of the image to be processed displayed in the device that outputs the image to be processed.

13. The apparatus according to claim 11, wherein the triggering of the first adjustment operation on the to-be-processed picture comprises: An adjustment operation is triggered in a valid display area corresponding to the image to be processed, and the valid display area includes an area that supports a function of scaling the image to be processed.

14. The apparatus according to claim 11, wherein the adjustment module further comprises: When a second adjustment operation on the image to be processed is triggered, determining an action position and / or an adjustment direction of the adjustment operation; Based on the action position and / or the adjustment direction, determining a target zoom boundary of the image to be processed from the set multiple groups of zoom boundaries; Adsorb the image to be processed to the target scaling boundary.

15. The device according to claim 11, wherein the adjustment module comprises: Respectively determining the minimum intervals between the boundary lines of the to-be-processed image and the boundary lines of each set group of the scaling boundaries; Comparing the determined minimum intervals, and determining a target scaling boundary that is closest to the boundary interval distance of the image to be processed; The image to be processed is automatically adsorbed to the target zoom boundary.

16. An electronic device, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Determine the size of the image to be processed that is displayed on the editing page; According to the size of the image to be processed, setting the scaling boundary of the image to be processed in the editing page, wherein the scaling boundary is a plurality of groups of scaling boundaries corresponding to the image to be processed and set according to the size of the image to be processed and the effective display area of ​​the editing page; When the first adjustment operation for the image to be processed is triggered, the image to be processed is automatically adsorbed to the scaling boundary that is closest to the boundary of the image to be processed.