CN109885218A - A kind of icon processing method, device and terminal - Google Patents
A kind of icon processing method, device and terminal Download PDFInfo
- Publication number
- CN109885218A CN109885218A CN201811639701.4A CN201811639701A CN109885218A CN 109885218 A CN109885218 A CN 109885218A CN 201811639701 A CN201811639701 A CN 201811639701A CN 109885218 A CN109885218 A CN 109885218A
- Authority
- CN
- China
- Prior art keywords
- icon
- rounded corner
- area
- region
- 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.)
- Granted
Links
Abstract
The present invention relates to field of communication technology, a kind of icon processing method, device and terminal are in particular disclosed, wherein method includes: the icon for obtaining application program;Determine the maximum rounded corner icon area inside the effective coverage of the icon, wherein it is described maximum rounded corner icon area be meet according to rounded corner radius of curvature be preset value carry out round corner treatment the maximum icon area of area;Shear treatment is carried out to the region in the icon in addition to maximum rounded corner icon area.It can be seen that using the present invention program, the icon of application program can be made to have identical size and shape in display, and will not in corner, there are unnecessary white spaces, achieve the effect that beauty.
Description
Technical field
This disclosure relates to field of communication technology more particularly to a kind of icon processing method, device and terminal.
Background technique
Along with the generation of the mobile intelligent terminals such as smart phone, tablet computer, there is iOS, Android (Android)
Equal Mobile operating systems.The application program on Mobile operating system is operated in, is frequently referred to applied or app.The normal quilt of the icon of application
It is designed to rounded corner icon, i.e. a square quadrangle is formed through round corner treatment.Due to one of two big Mobile operating systems
Android system unified specification is had no to the design of icon, the design of icon that the developer for leading to various applications provides
Style disunity.When presenting on mobile intelligent terminal or in application market, the icon of different-style can cause visually mixed and disorderly
Impression.
In order to make the icon of various different-styles have beautiful effect when presenting, the manufacturer of mobile intelligent terminal or answer
Often make unified processing to icon with the manager in market.For example, the icon of various applications is drawn again by some manufacturers
System, but this mode ignores the design idea of developer, and with high costs, it is also not possible to cover all applications.Some factories
Quotient requires developer's offer to meet its desired icon, but the different of different vendor require so that developer needs offer difference
Version, increase the cost of design and maintenance.Some manufacturers cut out what the icon version that developer provides was unified,
But due to icon stylistic differences, simply cuts out and often result in the icon corner after cutting out there are white space, it is not beautiful enough.
Summary of the invention
In view of the above problems, the present invention is proposed to overcome the above problem in order to provide one kind or at least be partially solved
A kind of method, apparatus of icon processing of the above problem calculates equipment and computer storage medium.
According to an aspect of the invention, there is provided a kind of icon processing method, comprising: obtain the icon of application program;
The maximum rounded corner icon area inside the effective coverage of the icon is determined, wherein the maximum rounded corner icon area is
Meet the maximum icon area of area for carrying out round corner treatment for preset value according to rounded corner radius of curvature;To the icon
In region in addition to maximum rounded corner icon area carry out shear treatment.
Optionally, a kind of icon processing method, further comprises: determining the effective coverage of the icon;Described
All rounded corners for meeting and carrying out round corner treatment for preset value according to rounded corner radius of curvature are searched in the effective coverage of icon
Icon area;The maximum rounded corner icon area of an area is determined from all rounded corner icon areas found.
Optionally, a kind of icon processing method further comprises: shearing transparent on the four edges of the icon
Region;Shear the transparent region on four angles of the icon;It is that preset value carries out at rounded corner according to rounded corner radius of curvature
Reason.
Optionally, a kind of icon processing method, further comprises: detecting on the four edges direction of the icon
Actual boundary line;Obtain the distance between the side of the actual boundary line and the icon corresponding to it;When the distance symbol
When closing preset standard, the square range of shearing is determined according to the actual boundary line on the four direction detected;According to
The square range shears the icon.
Optionally, a kind of icon processing method further comprises: step 501: reading icon;Step 502: respectively
From the four edges of the icon, along the angle detecting straight flange perpendicularly inward with side;Step 503: detecting the straight flange in order
On pixel;Step 504: whether transparent judging the pixel, if so, continuing to execute step 503, otherwise execute step
Rapid 505;Step 505: continuing to test several pixels, whether all to judge the transparency of several pixels continued to test
It is identical as the pixel, if so, 506 are thened follow the steps, it is no to then follow the steps 507;Step 506: obtaining the straight flange and its
Then the distance between corresponding side of icon executes step 508;Step 507: be arranged the straight flange and its corresponding to
The distance between side of icon is zero, then executes step 506;Step 508: judging whether the distance is default less than third
Value, if so, 509 are thened follow the steps, it is no to then follow the steps 513;Step 509: statistics four straight flanges and corresponding side it
Between distance standard deviation;Step 510: whether judge the standard deviation less than the 4th preset value, if so, then follow the steps 511,
It is no to then follow the steps 513;Step 511: determining the square area that a selection retains: step 512: deleting the square
All pixels outside region;Step 513: saving icon.
Optionally, a kind of icon processing method further comprises: detecting the reality on four angles of the icon
Boundary point;Obtain the distance between the vertex of the actual boundary point and the icon corresponding to it;When the distance meets
When preset standard, the square range of shearing is determined according to preset position and side length;According to the square range to described
Icon is sheared.
Optionally, a kind of icon processing method further comprises: step 701: reading icon;Step 702: judgement
Whether the icon is square, if so, 703 are thened follow the steps, it is no to then follow the steps 711;Step 703: respectively from the figure
The vertex at four angles of target, to icon center position detection pixel point;Step 704: judge whether the pixel is transparent, if
It is then to continue to execute step 703, it is no to then follow the steps 705;Step 705: obtaining the pixel and the icon corresponding to it
The distance between vertex;Step 706: whether judge the distance less than the 5th preset value, if so, then follow the steps 707,
It is no to then follow the steps 711;Step 707: counting the mark of distance between four opaques vegetarian refreshments and corresponding vertex
It is quasi- poor;Step 708: judging that the standard deviation whether less than the 6th preset value, if so, thening follow the steps 709, otherwise executes step
Rapid 711;Step 709: the square area that a selection retains is determined according to preset position and side length;Step 710: deleting
The overseas all pixels in the square region;Step 711: saving icon.
According to another aspect of the present invention, a kind of icon processing unit is provided, comprising: module is obtained, for obtaining application
The icon of program;Determining module, for determining maximum rounded corner icon area in the icon, wherein the maximum rounded corner
Icon area be meet according to rounded corner radius of curvature be the first preset value carry out round corner treatment the maximum icon area of area
Domain;Processing module, for carrying out shear treatment to the region in the icon in addition to maximum rounded corner icon area.
In accordance with a further aspect of the present invention, a kind of icon processing terminal is provided, comprising: processor;And with the processing
The memory of device communication connection;Wherein, the memory is stored with the instruction that can be executed by the processor, described instruction quilt
When the processor executes, so that the processor executes the corresponding operation of a kind of icon processing method.
According to another aspect of the invention, a kind of computer storage medium, including at least one executable instruction are provided,
The executable instruction is that processor executes a kind of corresponding operation of icon processing method.
Method in the disclosure can be handled application icon, to make to show application drawing on a terminal screen
Indicate identical size and shape, and will not in corner, there are unnecessary white spaces, showing icon has unified beauty
The visual experience of sight.Whether method in the disclosure is rounded corner icon independent of icon provided by developer, or is met
The icon of certain code requirement, thus the cost of developer's design maintenance is reduced, and more save device memory.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are general for this field
Logical technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to this hair
Bright limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of icon processing method first embodiment according to embodiments of the present invention;
Fig. 2 shows determine icon effective district in a kind of icon processing method second embodiment according to embodiments of the present invention
The flow chart of maximum rounded corner icon area in domain;
Fig. 3 is shown in a kind of icon processing method 3rd embodiment according to embodiments of the present invention to removing in the icon
Region other than maximum rounded corner icon area carries out the flow chart of shear treatment;
Fig. 4 shows in a kind of icon processing method fourth embodiment according to embodiments of the present invention and shears the icon
The flow chart of transparent region on four edges;
Fig. 5 shows in a kind of the 5th embodiment of icon processing method according to embodiments of the present invention and shears the icon
The flow chart of transparent region on four edges;
Fig. 6 shows in a kind of icon processing method sixth embodiment according to embodiments of the present invention and shears the icon
The flow chart of transparent region on four angles;
Fig. 7 shows in a kind of the 7th embodiment of icon processing method according to embodiments of the present invention and shears the icon
The flow chart of transparent region on four angles;
Fig. 8 shows a kind of functional block diagram of icon processing unit according to embodiments of the present invention;
Fig. 9 shows a kind of structural schematic diagram of icon processing terminal according to embodiments of the present invention;
Figure 10 shows an a kind of schematic diagram of icon processing method according to embodiments of the present invention;
Figure 11 shows a kind of another schematic diagram of icon processing method according to embodiments of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing this public affairs in attached drawing
The exemplary embodiment opened, it being understood, however, that may be realized in various forms the disclosure without the implementation that should be illustrated here
Example is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the disclosure
Range is fully disclosed to those skilled in the art.
In the various application programs that application developer provides, the icon of application program has various different shapes, such as
Square, general rectangle, circle, ellipse etc. and other special shapes.When application icon is presented, such as in smart phone table
On face, in application market, to various icons of different shapes, if do not dealt with, sense that user can be caused visually mixed and disorderly
By.In order to make various icons have beautiful, unified effect when presenting, the manager of smart phone manufacturer or application market is logical
Often can various icons be made with certain processing.There are two types of currently used processing schemes: replacement icon resource and directly cutting.
One example of replacement icon resource scheme is certain application market, and the application icon that regulation developer uploads is rounded corner,
The shortcomings that this way is that user is by the icon style of the application program of other application market downloading installation and in the application
The inconsistent of installation is downloaded in market, another example is to allow developer to set by special field since Android 7.1
The icon of another style is set, so as to mobile phone calling, the shortcomings that this way, is, if developer is not arranged accordingly, or
Application program is developed in lower Android version, still cannot achieve the unification of style.The scheme directly cut
It is that four angles of icon are carried out with unified round corner treatment, no matter whether developer provides rounded corner icon, and this scheme is all
It can not be uniformly processed with omitting.
During concrete practice, it was found by the inventors of the present invention that in the prior art, the method directly cut is not to marking
Quasi- icon is likely that there are the halfway situation of processing.For example, an icon already has rounded corner, only rounded corner
Rounded corner than required size is bigger, directly cuts the icon of the rounded corner of size required for cannot obtaining, aobvious in icon
At four angles, there are white spaces when showing, in another example, an icon is more smaller than the icon of normal size, and directly cutting can also lead
Cause processing insufficient, there are white spaces in corner.
Based on this, the present inventor provides a kind of icon processing method, and this method identifies that there may be something lost first
Then this kind of icons are made appropriate pretreatment by the icon for leaking gap, the rounded corner of size required for finally shearing again.Phase
Method for replacing icon resource, the present invention independent of additional icon, advantageously reduce developer's design maintenance at
This, and more save device memory.
Fig. 1 is a kind of flow chart of icon processing method first embodiment of the embodiment of the present invention.As shown in Figure 1, this method
The following steps are included:
Step 101: obtaining the icon of application program.
It is described obtain application program icon include:
Obtain the system permission of handle icon in terminal device, wherein the terminal device includes smart phone, plate
Computer, desktop computer, smartwatch, intelligent control device etc., the system permission of the handle icon include modifying icon to be
Permission of uniting and the system permission for replacing icon;
The icon list of each application program in terminal device is obtained, it is big that the icon list generally comprises different sizes
Small icon;
At least one icon to be modified, the ruler of the icon to be modified are determined in the icon list of each application program
Very little size usually matches with required size, or is slightly less than required size.
Step 102: the maximum rounded corner icon area inside the effective coverage of the icon is determined, wherein the maximum
Rounded corner icon area be meet according to rounded corner radius of curvature be preset value carry out round corner treatment the maximum icon of area
Region.
The effective coverage of the icon refers to that icon has the region of significant content, and icon can be conventional design,
It is also possible to non-conventional design, the icon of conventional design, usually rounded corner icon, shape are one square four
A angle is formed by round corner treatment, and usual actual icons are included in a rectangle painting canvas, and the effective coverage of icon is at this time
The region of actual icons.
The maximum rounded corner icon area, refer to the size i.e. radius of curvature for meeting rounded corner be required size and
Maximum one is completely contained in all rounded corner icon areas of the icon effective coverage.
Step 103: shear treatment is carried out to the region in the icon in addition to maximum rounded corner icon area.
After determining the maximum rounded corner icon area, the region other than maximum rounded corner icon area is cut
Processing is cut, maximum rounded corner icon area is only retained.
The shear treatment, for all pixels for deleting selected region by certain step program.
In embodiments of the present invention, by determining the maximum rounded corner icon area in icon effective coverage, and deleting should
Region ensure that the rounded corner size of the icon of acquisition is required size with exterior pixel, and farthest remain
The significant content of original image target.
Fig. 2 is that maximum in icon effective coverage is determined in a kind of icon processing method second embodiment of the embodiment of the present invention
The flow chart of rounded corner icon area.As shown in Fig. 2, determine in icon effective coverage maximum rounded corner icon area include with
Lower step:
Step 201: determining the effective coverage of the icon.
The effective coverage of the determination icon can detect icon by certain step, or on the screen
Show icon and by manually delimiting a region with significant content.
Step 202: it is preset value that all satisfactions are searched in the effective coverage of the icon according to rounded corner radius of curvature
Carry out the rounded corner icon area of round corner treatment.
A lesser square is taken for example, appointing in icon, and makees round corner treatment, the size of rounded corner is required
Size forms a rounded corner icon area.All rounded corners that meet can be according to said method found out to be required size and wrap
The rounded corner icon area being contained in inside the icon effective coverage.
Step 203: the maximum rounded corner icon area of an area is determined from all rounded corner icon areas found
Domain.
For example, taking a rounded corner icon area in a conventional icon, center is overlapped with icon center, four sides
With four Bian Pinghang of icon, the region is gradually expanded, and keeps rounded corner size constant, until rounded corner icon area with it is described
The boundary of icon effective coverage is in contact.
It in embodiments of the present invention, is required size by searching for including in icon effective coverage, rounded corner size
All rounded corner icon areas in maximum one, farthest remain the effective content of original image target.
Fig. 3 be in a kind of icon processing method 3rd embodiment of the embodiment of the present invention in the icon except maximum rounding
Region other than the icon area of angle carries out the flow chart of shear treatment.As shown in figure 3, to maximum rounded corner is removed in the icon
Region other than icon area carry out shear treatment the following steps are included:
Step 301: shearing the transparent region on the four edges of the icon.
The transparent region is the region that all pixels point transparence value is all higher than default transparency threshold in region.
Step 302: shearing the transparent region on four angles of the icon.
Step 303: being that preset value carries out round corner treatment according to rounded corner radius of curvature.
In embodiments of the present invention, by the transparent region on shearing icon four sides and quadrangle, then round corner treatment is carried out,
The rounded corner for the rounded corner icon that ensure that treated is required size, and will not there are white spaces.
Fig. 4 is on the four edges for shear in a kind of icon processing method fourth embodiment of the embodiment of the present invention icon
Transparent region flow chart.As shown in figure 4, shear the transparent region on the four edges of the icon the following steps are included:
Step 401: detecting the actual boundary line on the four edges direction of the icon.
Step 402: obtaining the distance between the side of the actual boundary line and the icon corresponding to it.
Step 403: when the distance meets preset standard, according to the practical side on the four direction detected
Boundary line determines the square range of shearing.
Step 404: the icon being sheared according to the square range.
In embodiments of the present invention, by detecting the actual boundary line of four edge direction of icon, determine that one has comprising icon
The smallest square region of content is imitated, and shears the pixel other than the region, eliminates the invalid content on four side of icon.
Fig. 5 is on the four edges for shear in a kind of the 5th embodiment of icon processing method of the embodiment of the present invention icon
Transparent region flow chart.As shown in figure 5, shear the transparent region on the four edges of the icon the following steps are included:
Step 501: reading icon.
Step 502: respectively from the four edges of the icon, along the angle detecting straight flange perpendicularly inward with side.
The straight flange refers to the certain pixel of the straight line namely abscissa or ordinate parallel with the side of the icon
Set.
It is described from the four edges of icon, along the angle detecting straight flange perpendicularly inward with side, for example, from top line
Start, detect every a line downwards line by line, since arranging Far Left one, detects each column to the right by column.
Step 503: detecting the pixel on the straight flange in order.
For example, detecting each pixel one by one from left to right in every a line.
Step 504: whether transparent judge the pixel, if so, step 503 is continued to execute, it is no to then follow the steps
505。
It is described transparent to be higher than default transparency threshold, such as pixel alpha value lower than certain for pixel transparence value
It is considered as when value transparent.
Step 505: continuing to test several pixels, whether all to judge the transparency of several subsequent pixels
It is identical as the pixel, if so, 506 are thened follow the steps, it is no to then follow the steps 507.
It is described to continue to test several pixels, for example, quantity be equivalent to be expert at all pixels points six/
One.
If the opaques vegetarian refreshments phase that the transparency of this several subsequent pixel is all detected with described first
Together, being considered as this row or column is one of actual boundary line of icon.
If detecting transparency and the institute of one of pixel during several pixels of subsequent detection
First opaques vegetarian refreshments difference detected is stated, the actual boundary line for being considered as this part of icon is not a straight flange,
But the pattern of design, at this point, using the side of icon as the actual boundary line of this part.
Step 506: obtaining the distance between the straight flange and the side of icon corresponding to it, then execute step 508.
For example, the line number of note top line is 0, then line number is incremented by 1 to every increase a line when finding downwards line by line, finds
Icon top actual boundary line line number as the distance between icon top actual boundary line and icon top.
Step 507: it is zero that the distance between the straight flange and the side of icon corresponding to it, which is arranged, then executes step
506。
Step 508: judge whether the distance is less than preset value, if so, 509 are thened follow the steps, it is no to then follow the steps
513。
The distance is less than preset value, for example, the distance between icon the right and left to be known as to the width of icon, will scheme
The distance between two actual boundary lines in mark left and right are known as the developed width of icon, the sum of left and right portion gap or icon width
And the difference of developed width, less than the 22% of developed width.
Step 509: counting the standard deviation of distance between four straight flanges and corresponding side.
The standard deviation for counting distance between four straight flanges and corresponding side refers to, obtains up and down four
After a distance, the standard deviation of four distances is calculated.
Step 510: judge whether the standard deviation is less than preset value, if so, 511 are thened follow the steps, it is no to then follow the steps
513。
If the standard deviation is larger, when being greater than some preset threshold such as 2, illustrate that four distances differ larger, figure
Mark is not conventional pattern, but specially designed pattern.
Step 511: determining the square area that a selection retains.
For example, taking a square, the abscissa and ordinate of left upper apex are equal to the left part gap and top
Smaller in gap, side length are equal to the greater in the icon developed width and actual height.
Step 512: deleting the overseas all pixels in the square region.
Step 513: saving icon.
In embodiments of the present invention, by certain specific step, the minimum comprising the effective content of icon is being determined just
Square region, and the pixel other than the region is deleted, eliminate the invalid content on four side of icon.
Fig. 6 is on four angles for shear in a kind of icon processing method sixth embodiment of the embodiment of the present invention icon
Transparent region flow chart.As shown in fig. 6, shear the transparent region on four angles of the icon the following steps are included:
Step 601: detecting the actual boundary point on four angles of the icon.
Step 602: obtaining the distance between the vertex of the actual boundary point and the icon corresponding to it.
Step 603: when the distance meets preset standard, the pros of shearing are determined according to preset position and side length
Shape range.
Step 604: the icon being sheared according to the square range.
In embodiments of the present invention, by detecting the actual boundary point of four angular direction of icon, and pass through the point and respective top
The Distance Judgment of point determines that includes a smallest square region for the effective content of icon, and shears the picture other than the region
Element eliminates the invalid content of icon quadrangle.
Fig. 7 is on four angles for shear in a kind of the 7th embodiment of icon processing method of the embodiment of the present invention icon
Transparent region flow chart.As shown in fig. 7, shear the transparent region on four angles of the icon the following steps are included:
Step 701: reading icon.
Step 702: judge whether the icon is square, if so, 703 are thened follow the steps, it is no to then follow the steps 711.
It is described to judge whether icon is square, that is, judge whether the length and width of icon is equal.
Step 703: respectively from the vertex at four angles of the icon, to icon center position detection pixel point in order.
For example, being the pixel that line number and row number all increase by 1 per next pixel since left upper apex.
Step 704: whether transparent judge the pixel, if so, step 703 is continued to execute, it is no to then follow the steps
705。
Step 705: obtaining the distance between opaques vegetarian refreshments and the vertex of icon corresponding to it.
Step 706: judge whether the distance is less than preset value, if so, 707 are thened follow the steps, it is no to then follow the steps
711。
For example, taking in four gaps, for maximum value compared with preset value, preset value is the maximum rounded corner according to the determination
Icon area is calculated, specifically, by the one of the square that maximum four side of rounded corner icon area of the determination is constituted
Minimum range between a vertex and rounded corner corresponding to it.
Step 707: counting the standard deviation of distance between four opaques vegetarian refreshments and corresponding vertex.
Step 708: judge whether the standard deviation is less than preset value, if so, 709 are thened follow the steps, it is no to then follow the steps
711。
Step 709: the square area that a selection retains is determined according to preset position and side length.
The square area that the selection retains, is made of maximum four side of rounded corner icon area of the determination
Square.
Step 710: deleting the overseas all pixels in the square region.
Step 711: saving icon.
In embodiments of the present invention, it by certain specific steps, deletes other than determining maximum rounded corner icon area
Pixel, the invalid content of the icon quadrangle eliminated.
Fig. 8 shows a kind of functional block diagram of icon processing unit according to embodiments of the present invention, which includes obtaining mould
Block 801, determining module 802 and processing module 803.
Module 801 is obtained, for obtaining the icon of application program;
Determining module 802, for determining maximum rounded corner icon area in the icon, wherein the maximum rounded corner
Icon area be meet according to rounded corner radius of curvature be preset value carry out round corner treatment the maximum icon area of area;
Processing module 803, for being carried out at shearing to the region in the icon in addition to maximum rounded corner icon area
Reason.
Fig. 9 shows a kind of structural schematic diagram of the terminal of icon processing according to embodiments of the present invention.
As shown in figure 9, the terminal includes: processor 901, memory 902, program 903, communication bus 904, Yi Jitong
Believe interface 905.
Processor 901, memory 902 and communication interface 905 complete mutual communication by communication bus 904.
Communication interface 905, for being communicated with the network element of other equipment such as client or other servers etc..
Processor 901 can specifically execute a kind of icon processing method of the embodiment of the present invention for executing program 903
The correlation step of one to the 7th embodiment.
Specifically, program 903 may include program code, which includes computer operation instruction.
Processor 901 may be central processor CPU or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or be arranged to implement the embodiment of the present invention one or more it is integrated
Circuit.The one or more processors that equipment includes are calculated, can be same type of processor, such as one or more CPU;
It is also possible to different types of processor, such as one or more CPU and one or more ASIC.
Memory 902, for storing program 903.Memory 902 may include high-speed RAM memory, it is also possible to also wrap
Include nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 903 specifically can be used for so that processor 901 executes a kind of icon processing method first of the embodiment of the present invention
To the correlation step of the 7th embodiment.
Figure 10 and Figure 11 shows a kind of schematic diagram of icon processing method according to embodiments of the present invention.Wherein solid line is
The boundary of icon effective coverage, dotted line are along being cut.Figure 10 corresponds to required rounded corner and is greater than original image mark rounded corner
The case where, Figure 11 corresponds to the case where required rounded corner is less than original image mark rounded corner.In Figure 10, first along four, outside
Transparent region on linear shear four edges, in the step of shearing the transparent region on four angles, due to original image mark quadrangle
Gap is less than required rounded corner quadrangle gap, so without shearing, rounded corner needed for finally cutting.In Figure 11, edge first
Outside four linear shear four edges on transparent region, shear four angles on transparent region the step of in, along interior
The straight line of side four is sheared, rounded corner needed for finally cutting.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.
Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various
Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this
The preferred forms of invention.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, knot is not been shown in detail
Structure and technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
In the above description of the exemplary embodiment of the present invention, each feature of the invention is grouped together into single reality sometimes
It applies in example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: being wanted
Ask protection the present invention claims features more more than feature expressly recited in each claim.More precisely,
As reflected in the following claims, inventive aspect is all spies less than single embodiment disclosed above
Sign.Therefore, it then follows thus claims of specific embodiment are expressly incorporated in the specific embodiment, wherein each power
Benefit requires itself all as a separate embodiment of the present invention.
Those skilled in the art will understand that adaptivity can be carried out to the module in the equipment in embodiment
Ground changes and they is arranged in one or more devices different from this embodiment.It can be the module in embodiment
Or unit or assembly is combined into a module or unit or component, and furthermore they can be divided into multiple submodule or sons
Unit or sub-component.It, can be with other than such feature and/or at least some of process or unit exclude each other
Using any combination to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and such as
All process or units of any method or apparatus of the displosure are combined.Unless expressly stated otherwise, this specification
Each feature disclosed in (including the accompanying claims, abstract and drawings) can be by providing identical, equivalent, or similar purpose
Alternative features replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments means in the present invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed
It is one of any can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to transport on one or more processors
Capable software module is realized, or is implemented in a combination thereof.It will be understood by those of skill in the art that can be in practice
It is realized using microprocessor or digital signal processor (DSP) in icon processing unit according to an embodiment of the present invention
The some or all functions of some or all components.The present invention is also implemented as executing side as described herein
Some or all device or device programs (for example, computer program and computer program product) of method.It is such
It realizes that program of the invention can store on a computer-readable medium, or can have the shape of one or more signal
Formula.Such signal can be downloaded from an internet website to obtain, and perhaps be provided on the carrier signal or with any other
Form provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and this
Field technical staff can be designed alternative embodiment without departing from the scope of the appended claims.In claim
In, any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" is not excluded for depositing
In element or step not listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple
Such element.The present invention can be by means of including the hardware of several different elements and by means of properly programmed calculating
Machine is realized.In the unit claims listing several devices, several in these devices can be by same
Hardware branch embodies.The use of word first, second, and third does not indicate any sequence.It can be by these words
It is construed to title.
Claims (14)
1. a kind of icon processing method characterized by comprising
Obtain the icon of application program;
The maximum rounded corner icon area inside the effective coverage of the icon is determined, wherein the maximum rounded corner icon area
To meet the maximum icon area of area for according to rounded corner radius of curvature being the first preset value progress round corner treatment;
Shear treatment is carried out to the region in the icon in addition to maximum rounded corner icon area.
2. icon processing method according to claim 1, which is characterized in that it is described obtain application program icon include:
The system permission of handle icon in terminal device is obtained, the system permission of the handle icon includes the system for modifying icon
The system permission of permission and replacement icon;
Obtain the icon list of each application program in the terminal device;
At least one icon to be modified is determined in the icon list of each application program.
3. icon processing method according to claim 1, which is characterized in that the effective coverage be nontransparent region or
Receive the region determined after external command.
4. icon processing method according to claim 3, which is characterized in that the nontransparent region is to own on its boundary
The transparency of pixel is less than or equal to the region of the second preset value.
5. icon processing method according to claim 3 or 4, which is characterized in that inside the determining icon effective coverage
Maximum rounded corner icon area include:
Determine the effective coverage of the icon;
It is that the first preset value carries out rounding that all satisfactions are searched in the effective coverage of the icon according to rounded corner radius of curvature
The rounded corner icon area of angle processing;
The maximum rounded corner icon area of an area is determined from all rounded corner icon areas found.
6. icon processing method according to claim 1, which is characterized in that it is described in icon except maximum rounded corner icon
Region other than region carries out shear treatment
Shear the transparent region on the four edges of the icon;
Shear the transparent region on four angles of the icon;
It is that the first preset value carries out round corner treatment according to rounded corner radius of curvature.
7. icon processing method according to claim 6, which is characterized in that the transparent region is the saturating of all pixels point
Lightness is greater than the region of the second preset value.
8. icon processing method according to claim 6, which is characterized in that on the four edges of the shearing icon
Transparent region includes:
Detect the actual boundary line on the four edges direction of the icon;
Obtain the distance between the side of the actual boundary line and the icon corresponding to it;
When the distance meets preset standard, shearing is determined according to the actual boundary line on the four direction detected
Square range;
The icon is sheared according to the square range.
9. icon processing method according to claim 6, which is characterized in that on the four edges of the shearing icon
Transparent region includes:
Step 501: reading icon;
Step 502: respectively from the four edges of the icon, along the angle detecting straight flange perpendicularly inward with side;
Step 503: detecting the pixel on the straight flange in order;
Step 504: whether transparent judge the pixel, if so, step 503 is continued to execute, it is no to then follow the steps 505;
Step 505: continue to test several pixels, judge several pixels continued to test transparency whether all with institute
It is identical to state pixel, if so, 506 are thened follow the steps, it is no to then follow the steps 507;
Step 506: obtaining the distance between the straight flange and the side of icon corresponding to it, then execute step 508;
Step 507: it is zero that the distance between the straight flange and the side of icon corresponding to it, which is arranged, then executes step 506;
Step 508: judge whether the distance is less than third preset value, if so, 509 are thened follow the steps, it is no to then follow the steps
513;
Step 509: counting the standard deviation of distance between four straight flanges and corresponding side;
Step 510: whether judge the standard deviation less than the 4th preset value, it is no to then follow the steps if so, then follow the steps 511
513;
Step 511: determine the square area that a selection retains:
Step 512: deleting the overseas all pixels in the square region;
Step 513: saving icon.
10. icon processing method according to claim 6, which is characterized in that on four angles of the shearing icon
Transparent region include:
Detect the actual boundary point on four angles of the icon;
Obtain the distance between the vertex of the actual boundary point and the icon corresponding to it;
When the distance meets preset standard, the square range of shearing is determined according to preset position and side length;
The icon is sheared according to the square range.
11. icon processing method according to claim 6, which is characterized in that on four angles of the shearing icon
Transparent region include:
Step 701: reading icon;
Step 702: judge whether the icon is square, if so, 703 are thened follow the steps, it is no to then follow the steps 711;
Step 703: respectively from the vertex at four angles of the icon, to icon center position detection pixel point in order;
Step 704: whether transparent judge the pixel, if so, step 703 is continued to execute, it is no to then follow the steps 705;
Step 705: obtaining the distance between the pixel and the vertex of icon corresponding to it;
Step 706: whether judge the distance less than the 5th preset value, it is no to then follow the steps if so, then follow the steps 707
711;
Step 707: counting the standard deviation of distance between four opaques vegetarian refreshments and corresponding vertex;
Step 708: whether judge the standard deviation less than the 6th preset value, it is no to then follow the steps if so, then follow the steps 709
711;
Step 709: the square area that a selection retains is determined according to preset position and side length;
Step 710: deleting the overseas all pixels in the square region;
Step 711: saving icon.
12. a kind of icon processing unit characterized by comprising
Module is obtained, for obtaining the icon of application program;
Determining module, for determining maximum rounded corner icon area in the icon, wherein the maximum rounded corner icon area
To meet the maximum icon area of area for according to rounded corner radius of curvature being the first preset value progress round corner treatment;
Processing module, for carrying out shear treatment to the region in the icon in addition to maximum rounded corner icon area.
13. a kind of icon processing terminal characterized by comprising
Processor;And the memory being connect with the processor communication;Wherein, be stored with can be by the processing for the memory
The instruction that device executes, when described instruction is executed by the processor, so that the processor is executed as appointed in claim 1-11
The step of icon processing method described in one.
14. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
It realizes when processor executes such as the step of icon processing method of any of claims 1-11.
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 true CN109885218A (en) | 2019-06-14 |
CN109885218B 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)
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 |
-
2018
- 2018-12-29 CN CN201811639701.4A patent/CN109885218B/en active Active
Patent Citations (5)
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)
Title |
---|
铁树银花: "ps裁剪圆角", 《博客园——HTTPS://WWW.CNBLOGS.COM/CSZLG/P/3376712.HTML》 * |
Also Published As
Publication number | Publication date |
---|---|
CN109885218B (en) | 2022-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020038441A1 (en) | Map rendering method and apparatus, computer device and storage medium | |
US9886747B2 (en) | Digital image blemish removal | |
CN106970735B (en) | Information processing method and electronic equipment | |
CN105094508A (en) | Method and apparatus for performing window control on application program of mobile terminal | |
US11531443B2 (en) | Method, apparatus, and storage medium for determining relative position relationship of click event | |
CN109254770B (en) | Method for customizing button style under graphical programming platform and electronic equipment | |
KR20150012299A (en) | Image processing method and apparatus | |
CN105955588A (en) | Method and apparatus for displaying icon on interface | |
CN104268152A (en) | Method and device for displaying webpage | |
AU2013383628B2 (en) | Image processing apparatus, program, computer readable medium and image processing method | |
CN109976759B (en) | Page display method and device | |
WO2016107229A1 (en) | Icon displaying method and device, and computer storage medium | |
CN105204736A (en) | Application software icon replacing method and application software icon replacing system | |
CN109885218A (en) | A kind of icon processing method, device and terminal | |
CN106354356A (en) | Method and terminal for managing application icon | |
CN109189537A (en) | The dynamic display method of page info calculates equipment and computer storage medium | |
US20160125614A1 (en) | Information processing method and electronic device | |
CN111258576A (en) | Interface generation method and device, electronic equipment and computer storage medium | |
US10989600B2 (en) | Automated methods and systems to fill background and interstitial space in a visual object layout | |
CN113902841A (en) | Image drawing method and device, electronic equipment and readable storage medium | |
CN111783180B (en) | Drawing splitting method and related device | |
JP2021099792A (en) | Method of selecting multiple edges and faces in modeled object | |
CN111061442A (en) | Method and system for setting splicing printing bleeding, server and medium | |
CN106156371B (en) | Method and device for realizing complete background picture of webpage | |
CN113426138B (en) | Edge description method, device and equipment of virtual role |
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 |