CN109885218B - Icon processing method and device and terminal - Google Patents

Icon processing method and device and terminal Download PDF

Info

Publication number
CN109885218B
CN109885218B CN201811639701.4A CN201811639701A CN109885218B CN 109885218 B CN109885218 B CN 109885218B CN 201811639701 A CN201811639701 A CN 201811639701A CN 109885218 B CN109885218 B CN 109885218B
Authority
CN
China
Prior art keywords
icon
area
rounding
executing
processing method
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
CN201811639701.4A
Other languages
Chinese (zh)
Other versions
CN109885218A (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.)
Cloudminds Shenzhen Robotics Systems Co Ltd
Original Assignee
Cloudminds Shenzhen Robotics Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloudminds Shenzhen Robotics Systems Co Ltd filed Critical Cloudminds Shenzhen Robotics Systems Co Ltd
Priority to CN201811639701.4A priority Critical patent/CN109885218B/en
Publication of CN109885218A publication Critical patent/CN109885218A/en
Application granted granted Critical
Publication of CN109885218B publication Critical patent/CN109885218B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to the technical field of communication, and particularly discloses an icon processing method, an icon processing device and an icon processing terminal, wherein the method comprises the following steps: acquiring an icon of an application program; determining a maximum rounding icon area inside the effective area of the icon, wherein the maximum rounding icon area is the icon area with the largest area which meets the requirement of rounding according to the preset value of the radius of curvature of the rounding; and cutting the area except the maximum rounded icon area in the icon. Therefore, by using the scheme of the invention, the icons of the application programs can have the same size and shape when being displayed, and unnecessary blank gaps can not be left at the corners, thereby achieving the effect of beautiful appearance.

Description

Icon processing method and device and terminal
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to an icon processing method, an icon processing device, and a terminal.
Background
Along with the generation of mobile intelligent terminals such as smart phones and tablet computers, mobile operating systems such as iOS (interactive operating system) and Android (Android) appear. An application program, often referred to as an application or app, runs on the mobile operating system. The icons of the applications are often designed as rounded icons, i.e. the four corners of a square are rounded. Because the Android system of one of the two mobile operating systems has no uniform specification for the design of the icons, the design styles of the icons provided by developers of various applications are not uniform. When presented on a mobile smart terminal or in an application marketplace, icons of different styles can cause a visually cluttered experience.
In order to make various icons with different styles have an attractive effect when being presented, manufacturers of mobile intelligent terminals or managers of application markets often perform uniform processing on the icons. For example, some vendors redraw icons for various applications, but this approach ignores the design intent of the developer and is costly and impossible to cover all applications. Some manufacturers require developers to provide icons meeting their requirements, but the different requirements of different manufacturers make the developers need to provide different versions, which increases the cost of design and maintenance. Some manufacturers uniformly cut icon versions provided by developers, but due to the difference of icon styles, the simple cutting often causes blank gaps to be left in the cut icon corners, so that the cut icon versions are not beautiful enough.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method, apparatus, computing device and computer storage medium for icon processing that overcomes or at least partially solves the above problems.
According to an aspect of the present invention, there is provided an icon processing method, including: acquiring an icon of an application program; determining a maximum rounding icon area inside the effective area of the icon, wherein the maximum rounding icon area is the icon area with the largest area which meets the requirement of rounding according to the preset value of the radius of curvature of the rounding; and cutting the area except the maximum rounded icon area in the icon.
Optionally, the icon processing method further includes: determining an effective area of the icon; searching all rounding icon areas meeting the requirement of rounding according to the radius of curvature of the rounding as a preset value in the effective area of the icon; and determining a rounded icon area with the largest area from all the found rounded icon areas.
Optionally, the icon processing method further includes: cutting transparent areas on four edges of the icon; cutting transparent areas on four corners of the icon; and rounding according to the preset value of the radius of curvature of the rounding.
Optionally, the icon processing method further includes: detecting actual boundary lines of the icon in the four-edge direction; acquiring the distance between the actual boundary line and the corresponding edge of the icon; when the distance meets the preset standard, determining the range of the sheared square according to the detected actual boundary lines in the four directions; and cutting the icon according to the square range.
Optionally, the icon processing method further includes: step 501: reading the icon; step 502: detecting straight edges from four edges of the icon along a direction perpendicular to and inward of the edges, respectively; step 503: sequentially detecting pixel points on the straight edge; step 504: judging whether the pixel points are transparent, if so, continuing to execute the step 503, otherwise, executing the step 505; step 505: continuously detecting a plurality of pixel points, judging whether the transparency of the continuously detected pixel points is the same as that of the pixel points, if so, executing a step 506, otherwise, executing a step 507; step 506: obtaining the distance between the straight edge and the edge of the icon corresponding to the straight edge, and then executing step 508; step 507: setting the distance between the straight edge and the edge of the icon corresponding to the straight edge to be zero, and then executing step 506; step 508: judging whether the distance is smaller than a third preset value, if so, executing a step 509, otherwise, executing a step 513; step 509: counting the standard deviation of the distances between the four straight sides and the corresponding sides; step 510: judging whether the standard deviation is smaller than a fourth preset value, if so, executing a step 511, otherwise, executing a step 513; step 511: determining a selected reserved square area: step 512: deleting all pixels outside the square area; step 513: and saving the icon.
Optionally, the icon processing method further includes: detecting actual boundary points at four corners of the icon; acquiring the distance between the actual boundary point and the vertex of the icon corresponding to the actual boundary point; when the distance meets a preset standard, determining the range of the sheared square according to a preset position and side length; and cutting the icon according to the square range.
Optionally, the icon processing method further includes: step 701: reading the icon; step 702: judging whether the icon is square, if so, executing step 703, otherwise, executing step 711; step 703: detecting pixel points from the vertexes of the four corners of the icon to the center direction of the icon respectively; step 704: judging whether the pixel points are transparent, if so, continuing to execute the step 703, otherwise, executing the step 705; step 705: acquiring the distance between the pixel point and the vertex of the icon corresponding to the pixel point; step 706: judging whether the distance is smaller than a fifth preset value, if so, executing a step 707, otherwise, executing a step 711; step 707: counting the standard deviation of the distances between the four opaque pixel points and the corresponding vertexes; step 708: judging whether the standard deviation is smaller than a sixth preset value, if so, executing a step 709, otherwise, executing a step 711; step 709: determining a square area selected and reserved according to a preset position and side length; step 710: deleting all pixels outside the square area; step 711: and saving the icon.
According to another aspect of the present invention, there is provided an icon processing apparatus including: the acquisition module is used for acquiring the icon of the application program; the determining module is used for determining a maximum rounding icon area in the icons, wherein the maximum rounding icon area is the icon area with the largest area which meets the requirement of rounding according to the radius of curvature of a rounding as a first preset value; and the processing module is used for shearing the areas except the maximum rounded icon area in the icons.
According to still another aspect of the present invention, there is provided an icon processing terminal including: a processor; and a memory communicatively coupled to the processor; the memory stores instructions executable by the processor, and the instructions, when executed by the processor, cause the processor to perform operations corresponding to the icon processing method.
According to another aspect of the present invention, there is provided a computer storage medium including at least one executable instruction, where the executable instruction is for a processor to perform an operation corresponding to the icon processing method.
The method can process the application icons, so that the application icons displayed on the terminal screen have the same size and shape, unnecessary blank gaps cannot be left at corners, and the icon display has uniform and attractive visual perception. The method in the disclosure does not depend on whether the icon provided by the developer is a rounded icon or an icon meeting certain specification requirements, thereby reducing the cost of design and maintenance for the developer and saving the storage space of the device.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a flow chart of a first embodiment of a method of icon handling according to an embodiment of the invention;
FIG. 2 is a flow chart illustrating a method for determining a maximum rounded icon area within an icon active area according to a second embodiment of the icon processing method;
fig. 3 is a flowchart illustrating a third embodiment of an icon processing method according to the present invention, wherein the third embodiment of the icon processing method performs a clipping process on areas of the icon other than a maximum rounded icon area;
fig. 4 is a flowchart illustrating a fourth embodiment of an icon processing method according to the present invention, wherein transparent areas on four sides of the icon are cut;
fig. 5 shows a flowchart of cutting transparent areas on four sides of an icon in a fifth embodiment of an icon processing method according to the embodiment of the invention;
fig. 6 shows a flowchart of clipping transparent areas on four corners of an icon in a sixth embodiment of a method of processing icons according to an embodiment of the present invention;
fig. 7 shows a flowchart of cutting transparent areas at four corners of an icon in a seventh embodiment of a method of processing the icon according to the embodiment of the invention;
FIG. 8 shows a functional block diagram of an icon processing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram illustrating an icon processing terminal according to an embodiment of the present invention;
FIG. 10 is a schematic diagram illustrating a method of icon processing according to an embodiment of the invention;
fig. 11 shows another schematic diagram of an icon processing method according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Among the various applications provided by application developers, the icons of the applications have various shapes, such as square, generally rectangular, circular, oval, etc., and other special shapes. When the application icons are presented, for example, on a smart phone desktop or in an application market, the icons in various shapes can cause a visually disordered feeling to a user if not processed. In order to make the various icons have an attractive and uniform effect when being presented, a smart phone manufacturer or an application market manager usually processes the various icons to a certain extent. There are two treatment regimes in common use today: replacing icon resources and direct cropping. One example of an alternative icon resource scheme is an application market that provides for the application icons uploaded by developers to be rounded off, which has the disadvantage that the icon style of applications downloaded and installed by users through other application markets is not consistent with that downloaded and installed in the application market, and another example is from Android7.1, which allows developers to set icons of another style through special fields for mobile phone calls, which has the disadvantage that if the developers do not make corresponding settings, or the applications are developed on a lower Android version, the style uniformity is still not achieved. The scheme of direct cropping is to carry out uniform rounding processing on four corners of the icon, and the scheme can carry out uniform processing without omission no matter whether a developer provides a rounded icon or not.
In a specific practical process, the inventor of the invention finds that in the prior art, the direct cropping method is likely to have the situation of incomplete treatment on nonstandard icons. For example, an icon may have a fillet, but the fillet is larger than the fillet of the required size, and direct cropping may not result in an icon with a fillet of the required size, leaving blank gaps at four corners when the icon is displayed, and for example, an icon may be slightly smaller than an icon of a normal size, and direct cropping may also result in insufficient processing, leaving blank gaps at corners.
Based on this, the inventor of the present invention provides an icon processing method, which first identifies icons that may produce missing gaps, then performs appropriate preprocessing on such icons, and finally cuts rounded corners of the required size. Compared with a method for replacing icon resources, the method does not depend on additional icons, is beneficial to reducing the cost of design and maintenance of developers, and saves the storage space of equipment.
Fig. 1 is a flowchart of a first embodiment of an icon processing method according to the present invention. As shown in fig. 1, the method comprises the steps of:
step 101: an icon of an application program is acquired.
The acquiring the icon of the application program comprises the following steps:
the method comprises the steps of obtaining system permissions of operation icons in terminal equipment, wherein the terminal equipment comprises a smart phone, a tablet personal computer, a desktop computer, a smart watch, intelligent control equipment and the like, and the system permissions of the operation icons comprise system permissions for modifying icons and system permissions for replacing the icons;
acquiring an icon list of each application program in terminal equipment, wherein the icon list usually comprises icons with different sizes;
at least one icon to be modified is determined in the icon list of each application program, and the size of the icon to be modified is generally matched with the required size or is slightly smaller than the required size.
Step 102: and determining a maximum rounding icon area inside the effective area of the icon, wherein the maximum rounding icon area is the icon area with the largest area which meets the requirement of rounding according to the preset value of the radius of curvature of the rounding.
The effective area of the icon refers to an area where the icon has meaningful content, the icon can be designed conventionally or designed unconventionally, the icon is designed conventionally and is generally a rounded icon, the shape of the icon is formed by rounding four corners of a square, the actual icon is contained in a rectangular canvas, and the effective area of the icon is the area of the actual icon.
The maximum rounded icon area is the largest rounded icon area that satisfies the size of the rounded corner, i.e., the radius of curvature is the required size, and is completely included in the icon effective area.
Step 103: and cutting the area except the maximum rounded icon area in the icon.
And after the maximum rounding icon area is determined, shearing the area except the maximum rounding icon area, and only reserving the maximum rounding icon area.
The cutting processing is to delete all pixels of the selected area through a certain step program.
In the embodiment of the invention, the maximum rounding icon area in the icon effective area is determined, and the pixels outside the area are deleted, so that the rounding size of the obtained icon is ensured to be the required size, and the meaningful content of the original icon is retained to the maximum extent.
Fig. 2 is a flowchart of determining a maximum rounded icon area in an icon effective area in a second embodiment of an icon processing method according to the embodiment of the present invention. As shown in fig. 2, determining the largest rounded icon area within the icon active area includes the steps of:
step 201: and determining the effective area of the icon.
The determination of the effective area of the icon can be performed by detecting the icon through a certain step, or displaying the icon on a screen and manually defining an area with meaningful content.
Step 202: and searching all rounding icon areas meeting the requirement of rounding according to the radius of curvature of the rounding as a preset value in the effective area of the icon.
For example, a smaller square is arbitrarily chosen and rounded within the icon, the size of the rounded corner being the desired size, resulting in a rounded icon area. According to the method, all the rounded icon areas which satisfy the condition that the rounding is the required size and are contained in the icon effective area can be found out.
Step 203: and determining a rounded icon area with the largest area from all the found rounded icon areas.
For example, a rounded icon area is taken in a conventional icon, the center of the rounded icon area coincides with the center of the icon, four sides of the rounded icon area are parallel to four sides of the icon, the area is gradually enlarged, and the size of the rounded corner is kept unchanged until the rounded icon area is in contact with the boundary of the effective area of the icon.
In the embodiment of the invention, the effective content of the original icon is reserved to the maximum extent by searching the largest one of all the rounded icon areas which are contained in the icon effective area and have the required rounded angle size.
Fig. 3 is a flowchart illustrating an icon processing method according to a third embodiment of the present invention, wherein the area of the icon other than the area of the icon with the largest rounded corner is cut. As shown in fig. 3, the clipping process for the area of the icon except for the area of the icon with the largest rounded corner includes the following steps:
step 301: and cutting transparent areas on four edges of the icon.
The transparent area is an area in which the transparency values of all pixel points in the area are higher than a preset transparency threshold.
Step 302: transparent areas on the four corners of the icon are clipped.
Step 303: and rounding according to the preset value of the radius of curvature of the rounding.
In the embodiment of the invention, the transparent areas at the four sides and the four corners of the icon are cut, and then the rounding treatment is carried out, so that the rounding of the processed rounded icon is ensured to be the required size, and no blank gap is left.
Fig. 4 is a flowchart of cutting transparent areas on four edges of an icon according to a fourth embodiment of an icon processing method according to the present invention. As shown in fig. 4, cutting transparent areas on four sides of the icon includes the following steps:
step 401: and detecting actual boundary lines of the icon in the four-edge direction.
Step 402: and acquiring the distance between the actual boundary line and the corresponding edge of the icon.
Step 403: and when the distance meets the preset standard, determining the range of the sheared square according to the detected actual boundary lines in the four directions.
Step 404: and cutting the icon according to the square range.
In the embodiment of the invention, the invalid contents on the four sides of the icon are removed by detecting the actual boundary lines in the four sides of the icon, determining the minimum square area containing the valid contents of the icon, and cutting the pixels outside the area.
Fig. 5 is a flowchart of cutting transparent areas on four sides of an icon according to a fifth embodiment of an icon processing method according to an embodiment of the present invention. As shown in fig. 5, cutting transparent areas on four sides of the icon includes the following steps:
step 501: and reading the icon.
Step 502: straight edges are detected from the four edges of the icon, respectively, in a direction perpendicular to and inward of the edges.
The straight edge refers to a straight line parallel to the edge of the icon, namely a set of pixels with a certain abscissa or ordinate.
The straight edges are detected from the four edges of the icon in a direction perpendicular to the edges, e.g. starting with the top row, each row is detected row by row downwards, starting with the leftmost column, and each column is detected column by column to the right.
Step 503: and detecting the pixel points on the straight edge in sequence.
For example, each pixel point is detected one by one from left to right in each row.
Step 504: and judging whether the pixel points are transparent, if so, continuing to execute the step 503, otherwise, executing the step 505.
The transparency is that the transparency value of the pixel point is higher than a preset transparency threshold value, for example, the pixel point alpha value is lower than a certain value and is regarded as transparent.
Step 505: and continuously detecting a plurality of pixel points, judging whether the transparencies of the subsequent pixel points are the same as the pixel points, if so, executing the step 506, and otherwise, executing the step 507.
The detection continues for a number of pixels, for example, the number is equal to one sixth of the number of all pixels in the row.
If the transparency of these subsequent pixels is the same as the first detected opaque pixel, this row or column is considered to be one of the actual border lines of the icon.
If the transparency of one pixel point is different from that of the opaque pixel point detected in the subsequent process of detecting a plurality of pixel points, the actual boundary line of the part of the icon is not a straight line but a designed pattern, and at the moment, the edge of the icon is used as the actual boundary line of the part.
Step 506: the distance between the straight edge and the edge of the icon corresponding to the straight edge is obtained, and then step 508 is performed.
For example, the line number of the top line is recorded as 0, the line number is incremented by 1 every time one line is added when the top line is searched downward line by line, and the line number of the actual boundary line on the upper part of the found icon is used as the distance between the actual boundary line on the upper part of the icon and the upper part of the icon.
Step 507: the distance between the straight edge and the edge of the icon corresponding to the straight edge is set to zero, and then step 506 is performed.
Step 508: and judging whether the distance is smaller than a preset value, if so, executing a step 509, otherwise, executing a step 513.
The distance is less than a predetermined value, for example, the distance between the left and right sides of the icon is referred to as the width of the icon, the distance between the left and right actual boundary lines of the icon is referred to as the actual width of the icon, the sum of the left and right gaps, or the difference between the width of the icon and the actual width is less than 22% of the actual width.
Step 509: and counting the standard deviation of the distances between the four straight sides and the corresponding sides.
The step of counting the standard deviation of the distances between the four straight edges and the corresponding edges means that the standard deviation of the four distances is calculated after the four distances of the upper side, the lower side, the left side and the right side are obtained.
Step 510: and judging whether the standard deviation is smaller than a preset value, if so, executing the step 511, and otherwise, executing the step 513.
If the standard deviation is larger than a preset threshold value, such as 2, it indicates that the four distances are different greatly, and the icon is not a conventional pattern but a specially designed pattern.
Step 511: a selectively retained square region is determined.
For example, a square is taken with the upper left vertex having an abscissa and an ordinate both equal to the smaller of the left and upper gaps and a side length equal to the larger of the actual width and actual height of the icon.
Step 512: deleting all pixels outside the square area.
Step 513: and saving the icon.
In the embodiment of the invention, a minimum square area containing the effective content of the icon is determined through specific steps, pixels outside the area are deleted, and the ineffective content on the four sides of the icon is removed.
Fig. 6 is a flowchart of cutting transparent areas at four corners of an icon according to a sixth embodiment of an icon processing method according to the present invention. As shown in fig. 6, cutting the transparent areas on the four corners of the icon includes the steps of:
step 601: actual boundary points at the four corners of the icon are detected.
Step 602: and acquiring the distance between the actual boundary point and the vertex of the icon corresponding to the actual boundary point.
Step 603: and when the distance meets a preset standard, determining the range of the sheared square according to a preset position and side length.
Step 604: and cutting the icon according to the square range.
In the embodiment of the invention, the minimum square area containing the effective content of the icon is determined by detecting the actual boundary points in the directions of the four corners of the icon and judging the distance between the points and the corresponding vertexes, and the pixels outside the area are cut, so that the ineffective content of the four corners of the icon is removed.
Fig. 7 is a flowchart of a method for processing an icon according to a seventh embodiment of the present invention, wherein transparent areas at four corners of the icon are cut. As shown in fig. 7, cutting the transparent areas on the four corners of the icon includes the steps of:
step 701: and reading the icon.
Step 702: and judging whether the icon is square, if so, executing step 703, and otherwise, executing step 711.
And judging whether the icon is square or not, namely judging whether the length and the width of the icon are equal or not.
Step 703: and sequentially detecting pixel points from the vertexes of the four corners of the icon to the center direction of the icon.
For example, starting from the top left vertex, each next pixel is a pixel whose row and column numbers are both incremented by 1.
Step 704: and judging whether the pixel points are transparent, if so, continuing to execute the step 703, and otherwise, executing the step 705.
Step 705: and acquiring the distance between the opaque pixel point and the vertex of the icon corresponding to the opaque pixel point.
Step 706: and judging whether the distance is smaller than a preset value, if so, executing a step 707, and if not, executing a step 711.
For example, the maximum value of the four gaps is compared with a preset value, the preset value is calculated according to the determined maximum rounded icon area, and specifically, the preset value is the minimum distance between one vertex of a square formed by four sides of the determined maximum rounded icon area and a corresponding rounded corner.
Step 707: and counting the standard deviation of the distances between the four opaque pixel points and the corresponding vertex points.
Step 708: and judging whether the standard deviation is smaller than a preset value, if so, executing a step 709, and otherwise, executing a step 711.
Step 709: and determining a square area selected and reserved according to the preset position and the side length.
And selecting the reserved square area to be a square formed by four sides of the determined maximum rounded icon area.
Step 710: deleting all pixels outside the square area.
Step 711: and saving the icon.
In the embodiment of the invention, through a certain specific step, the pixels outside the determined maximum rounded icon area are deleted, and the invalid contents of the four corners of the icon are removed.
Fig. 8 shows a functional block diagram of an icon processing apparatus according to an embodiment of the present invention, which includes an acquisition module 801, a determination module 802, and a processing module 803.
An obtaining module 801, configured to obtain an icon of an application;
a determining module 802, configured to determine a maximum rounded icon region in the icons, where the maximum rounded icon region is an icon region with a largest area that meets rounding processing according to a preset rounded curvature radius;
a processing module 803, configured to perform a clipping process on an area of the icon except for the area of the icon with the largest rounded corner.
Fig. 9 is a schematic structural diagram of a terminal for icon processing according to an embodiment of the present invention.
As shown in fig. 9, the terminal includes: a processor 901, memory 902, programs 903, a communication bus 904, and a communication interface 905.
The processor 901, the memory 902, and the communication interface 905 communicate with each other via a communication bus 904.
A communication interface 905 for communicating with network elements of other devices, such as clients or other servers.
The processor 901 is configured to execute the program 903, and specifically may execute relevant steps of the first to seventh embodiments of the icon processing method according to the embodiment of the present invention.
In particular, the program 903 may include program code that includes computer operating instructions.
The processor 901 may be a central processing unit CPU or a Specific Integrated circuit asic (application Specific Integrated circuit) or one or more Integrated circuits configured to implement an embodiment of the present invention. The computing device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 902 for storing a program 903. Memory 902 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 903 may be specifically configured to enable the processor 901 to execute the relevant steps of the first to seventh embodiments of the icon processing method according to the embodiment of the present invention.
Fig. 10 and 11 are schematic diagrams illustrating an icon processing method according to an embodiment of the present invention. Wherein the solid line is the boundary of the icon effective area, and the dotted line is the line along which the clipping is performed. Fig. 10 corresponds to the case where the required rounding is larger than the original standard rounding, and fig. 11 corresponds to the case where the required rounding is smaller than the original standard rounding. In fig. 10, first, transparent regions on four sides are cut along four straight lines on the outer side, and in the step of cutting the transparent regions on four corners, since the four-corner gap of the original icon is smaller than the four-corner gap of the desired rounding, the cutting is not performed, and finally the desired rounding is cut. In fig. 11, the transparent regions on the four sides are cut along the outer four straight lines first, and in the step of cutting the transparent regions on the four corners, the cutting is performed along the inner four straight lines, and finally the desired round corners are cut.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of an icon processing apparatus according to an embodiment of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (13)

1. An icon processing method, comprising:
acquiring an icon of an application program;
determining a maximum rounding icon area inside the effective area of the icon, wherein the maximum rounding icon area is the icon area with the largest area which meets the requirement of rounding according to the radius of curvature of a rounding as a first preset value;
performing cutting processing on the areas except the maximum rounded icon area in the icons, including: cutting transparent areas on four edges of the icon; cutting transparent areas on four corners of the icon; and rounding according to the radius of curvature of the rounding as a first preset value.
2. The icon processing method according to claim 1, wherein the acquiring the icon of the application program includes:
the method comprises the steps of obtaining system permissions of operation icons in terminal equipment, wherein the system permissions of the operation icons comprise system permissions of icon modification and system permissions of icon replacement;
acquiring an icon list of each application program in the terminal equipment;
and determining at least one icon to be modified in the icon list of each application program.
3. The icon processing method according to claim 1, wherein the effective area is a non-transparent area or an area determined after receiving an external instruction.
4. The icon processing method according to claim 3, wherein the non-transparent area is an area whose transparency of all pixel points on the boundary is less than or equal to a second preset value.
5. The icon processing method according to claim 3 or 4, wherein the determining the largest rounded icon area inside the icon active area comprises:
determining an effective area of the icon;
searching all rounding icon areas meeting the requirement of rounding according to the radius of curvature of the rounding as a first preset value in the effective area of the icon;
and determining a rounded icon area with the largest area from all the found rounded icon areas.
6. The icon processing method according to claim 1, wherein the transparent area is an area in which transparency of all pixel points is greater than a second preset value.
7. The icon processing method according to claim 1, wherein the cutting out transparent areas on four sides of the icon includes:
detecting actual boundary lines of the icon in the four-edge direction;
acquiring the distance between the actual boundary line and the corresponding edge of the icon;
when the distance meets the preset standard, determining the range of the sheared square according to the detected actual boundary lines in the four directions;
and cutting the icon according to the square range.
8. The icon processing method according to claim 1, wherein the cutting out transparent areas on four sides of the icon includes:
step 501: reading the icon;
step 502: detecting straight edges from four edges of the icon along a direction perpendicular to and inward of the edges, respectively;
step 503: sequentially detecting pixel points on the straight edge;
step 504: judging whether the pixel points are transparent, if so, continuing to execute the step 503, otherwise, executing the step 505;
step 505: continuously detecting a plurality of pixel points, judging whether the transparency of the continuously detected pixel points is the same as that of the pixel points, if so, executing a step 506, otherwise, executing a step 507;
step 506: obtaining the distance between the straight edge and the edge of the icon corresponding to the straight edge, and then executing step 508;
step 507: setting the distance between the straight edge and the edge of the icon corresponding to the straight edge to be zero, and then executing step 506;
step 508: judging whether the distance is smaller than a third preset value, if so, executing a step 509, otherwise, executing a step 513;
step 509: counting the standard deviation of the distances between the four straight sides and the corresponding sides;
step 510: judging whether the standard deviation is smaller than a fourth preset value or not, if so, executing
Step 511, otherwise, executing step 513;
step 511: determining a square area which is selected to be reserved;
step 512: deleting all pixels outside the square area;
step 513: and saving the icon.
9. The icon processing method according to claim 1, wherein the clipping transparent areas on four corners of the icon includes:
detecting actual boundary points at four corners of the icon;
acquiring the distance between the actual boundary point and the vertex of the icon corresponding to the actual boundary point;
when the distance meets a preset standard, determining the range of the sheared square according to a preset position and side length;
and cutting the icon according to the square range.
10. The icon processing method according to claim 1, wherein the clipping transparent areas on four corners of the icon includes:
step 701: reading the icon;
step 702: judging whether the icon is square, if so, executing step 703, otherwise, executing step 711;
step 703: sequentially detecting pixel points from the vertexes of the four corners of the icon to the center direction of the icon;
step 704: judging whether the pixel points are transparent, if so, continuing to execute the step 703, otherwise, executing the step 705;
step 705: acquiring the distance between the pixel point and the vertex of the icon corresponding to the pixel point;
step 706: judging whether the distance is smaller than a fifth preset value, if so, executing a step 707, otherwise, executing a step 711;
step 707: counting the standard deviation of the distances between the four opaque pixel points and the corresponding vertexes;
step 708: judging whether the standard deviation is smaller than a sixth preset value, if so, executing a step 709, otherwise, executing a step 711;
step 709: determining a square area selected and reserved according to a preset position and side length;
step 710: deleting all pixels outside the square area;
step 711: and saving the icon.
11. An icon processing apparatus, comprising:
the acquisition module is used for acquiring the icon of the application program;
the determining module is used for determining a maximum rounding icon area in the icons, wherein the maximum rounding icon area is the icon area with the largest area which meets the requirement of rounding according to the radius of curvature of a rounding as a first preset value;
the processing module is used for shearing the areas except the maximum rounded icon area in the icons, and comprises the following steps: cutting transparent areas on four edges of the icon; cutting transparent areas on four corners of the icon; and rounding according to the radius of curvature of the rounding as a first preset value.
12. An icon processing terminal, comprising:
a processor; and a memory communicatively coupled to the processor; wherein the memory stores instructions executable by the processor to cause the processor to perform the steps of the icon processing method as claimed in any one of claims 1-10 when executed by the processor.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the icon processing method according to any one of claims 1-10.
CN201811639701.4A 2018-12-29 2018-12-29 Icon processing method and device and terminal Active CN109885218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811639701.4A CN109885218B (en) 2018-12-29 2018-12-29 Icon processing method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811639701.4A CN109885218B (en) 2018-12-29 2018-12-29 Icon processing method and device and terminal

Publications (2)

Publication Number Publication Date
CN109885218A CN109885218A (en) 2019-06-14
CN109885218B true CN109885218B (en) 2022-02-25

Family

ID=66925488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811639701.4A Active CN109885218B (en) 2018-12-29 2018-12-29 Icon processing method and device and terminal

Country Status (1)

Country Link
CN (1) CN109885218B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012252384A (en) * 2011-05-31 2012-12-20 Camelot:Kk Screen control system, screen control method, and screen control program
CN104408754A (en) * 2014-10-28 2015-03-11 久邦计算机技术(广州)有限公司 Icon synthesis method
CN106873981A (en) * 2017-01-11 2017-06-20 努比亚技术有限公司 A kind of icon processing method, device and terminal
CN107219989A (en) * 2017-05-31 2017-09-29 北京小米移动软件有限公司 Icon processing method, device and terminal
CN107423066A (en) * 2017-07-27 2017-12-01 深圳依偎控股有限公司 A kind of amending method of application icon pattern and modification device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012252384A (en) * 2011-05-31 2012-12-20 Camelot:Kk Screen control system, screen control method, and screen control program
CN104408754A (en) * 2014-10-28 2015-03-11 久邦计算机技术(广州)有限公司 Icon synthesis method
CN106873981A (en) * 2017-01-11 2017-06-20 努比亚技术有限公司 A kind of icon processing method, device and terminal
CN107219989A (en) * 2017-05-31 2017-09-29 北京小米移动软件有限公司 Icon processing method, device and terminal
CN107423066A (en) * 2017-07-27 2017-12-01 深圳依偎控股有限公司 A kind of amending method of application icon pattern and modification device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ps裁剪圆角;铁树银花;《博客园——https://www.cnblogs.com/cszlg/p/3376712.html》;20131018;参见第1~3页 *

Also Published As

Publication number Publication date
CN109885218A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
US10162498B2 (en) Providing selection areas for selectable objects in graphical interface
US10089957B2 (en) Page display method and terminal
US8718368B2 (en) Text flow in and around irregular containers
CN110032314B (en) Long screen capture method and device, storage medium and terminal equipment
CN108156510B (en) Page focus processing method and device and computer readable storage medium
EP3073363A1 (en) Electronic device, control method and control program
US10169307B2 (en) Method and system for the use of adjustment handles to facilitate dynamic layout editing
US20190012821A1 (en) Displaying images associated with apps based on app processing task progress statuses
US20210312679A1 (en) Method for generating identification pattern and terminal device
CN109656445B (en) Content processing method, device, terminal and storage medium
AU2021225277B2 (en) Image cropping method and apparatus, and device and storage medium
CN115237522A (en) Page self-adaptive display method and device
CN105654531A (en) Method and device for drawing image contour
CN114356479B (en) Page rendering method and device
CN107608733B (en) Picture display method and device and terminal equipment
CN109885218B (en) Icon processing method and device and terminal
CN113538502A (en) Picture clipping method and device, electronic equipment and storage medium
CN112256178A (en) Application icon adjusting method, device and system
CN109739403B (en) Method and apparatus for processing information
US20160125614A1 (en) Information processing method and electronic device
CN108073338B (en) Cursor display method and system
CN115719356A (en) Image processing method, apparatus, device and medium
CN111796736B (en) Application sharing method and device and electronic equipment
US11288778B2 (en) Creation and rasterization of shapes using geometry, style settings, or location
CN113051872A (en) Method, device and equipment for displaying highlighted characters

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