CN109636871A - Transform method, device and the terminal device of picture color - Google Patents
Transform method, device and the terminal device of picture color Download PDFInfo
- Publication number
- CN109636871A CN109636871A CN201811501608.7A CN201811501608A CN109636871A CN 109636871 A CN109636871 A CN 109636871A CN 201811501608 A CN201811501608 A CN 201811501608A CN 109636871 A CN109636871 A CN 109636871A
- Authority
- CN
- China
- Prior art keywords
- designated pictures
- projection image
- color
- designated
- container
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 230000009466 transformation Effects 0.000 claims abstract description 8
- 230000002452 interceptive effect Effects 0.000 claims description 48
- 238000003860 storage Methods 0.000 claims description 14
- 230000009286 beneficial effect Effects 0.000 abstract description 4
- 238000012545 processing Methods 0.000 description 7
- 230000003993 interaction Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000013519 translation Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000002845 discoloration Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000035800 maturation Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 239000011148 porous material Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/001—Texturing; Colouring; Generation of texture or colour
Abstract
The present invention provides a kind of transform method of picture color, device and terminal devices;Wherein, this method comprises: determining the need for the color of transformation designated pictures;In the case where determination needs to convert the color of designated pictures, the projection image of designated pictures is generated, sets designated color for projection image;Hide designated pictures, the projection image of the designated pictures after display color setting.The present invention is by generating projection image for designated pictures, and the mode that projection image color is arranged changes picture color, the mode of colour switching is simple and fast, without loading or safeguarding more image data, to improve the overall performance of the page, it is also beneficial to improve the Experience Degree of user.
Description
Technical field
The present invention relates to technical field of image processing, more particularly, to the transform method, device and end of a kind of picture color
End equipment.
Background technique
In the related technology, in order to convert the color of picture in webpage, a kind of mode is that the difference of same content is stored in advance
The plurality of pictures of color shows the picture of different colours according to user's operation;In another way, the figure that change colour can will be needed
Piece is arranged to the format of font picture, i.e. iconfont format, then (sample is laminated in Cascading Style Sheets by CSS
Formula table) technology modification color, but which needs to establish and constantly maintenance updates character font data packet, and user terminal is in access webpage
When, it is also desirable to corresponding character font data packet is downloaded to convert picture color according to user's operation;It is by picture there are also a kind of mode
It is converted into SVG (Scalable Vector Graphics, scalable vector graphics) format, is passing through HTML (HyperText
Markup Language, HyperText Markup Language) picture color is modified in the fill order in language, but which needs are repaired
Picture color could be converted by changing the parameter in web page code, cannot be according to user's operation auto-changing picture color.
To sum up, the existing mode for converting picture color according to user's operation usually requires to load or safeguard more image
Data are easy to influence the overall performance of webpage, and the convenience of colour switching is poor.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of transform method of picture color, device and terminal device, with
Keep the mode of colour switching simple and fast, without loading or safeguarding more image data, so that the overall performance of the page is improved,
Be conducive to improve the Experience Degree of user.
In a first aspect, method is applied to terminal device the embodiment of the invention provides a kind of transform method of picture color;
Comprise determining whether to need to convert the color of designated pictures;In the case where determination needs to convert the color of designated pictures, generate
Projection image is set designated color by the projection image of designated pictures;Designated pictures are hidden, it is specified after display color setting
The projection image of picture.
It is above-mentioned to determine the need for the step of converting the color of designated pictures in preferred embodiments of the present invention, comprising:
Receive the interactive instruction of user's triggering;Wherein, it is used to indicate whether to convert the color of designated pictures in interactive instruction;Root
According to interactive instruction, it is determined whether need to convert the color of designated pictures.
In preferred embodiments of the present invention, projection image is set as referring to by the projection image of above-mentioned generation designated pictures
The step of determining color, comprising: obtain the corresponding projection instruction of designated pictures;It include the generation position of projection image in projection instruction
And designated color;The projection image of designated pictures is generated on generating position;Designated color is set by projection image.
In preferred embodiments of the present invention, above-mentioned hiding designated pictures, the throwing of the designated pictures after display color setting
The step of shadow picture, comprising: designated pictures are moved to from the home position of designated pictures to the specific bit in addition to home position
It sets, to hide designated pictures;Wherein, picture or local picture on home position are shown by preset display box;It will
The projection image of designated pictures is moved to home position, the projection image of the designated pictures after being arranged with display color.
In preferred embodiments of the present invention, designated pictures are pre-set in corresponding container range;Container is preset with
Following container attributes: picture in picture set corresponding with container, except container range or local picture are in hidden
Hiding state, the picture being located within the scope of container or local picture in picture set are in display state;Above-mentioned hide is specified
The step of picture, the projection image of the designated pictures after display color setting, comprising: designated pictures are moved to the container of container
Except range;The projection image of designated pictures is moved within the scope of the container of container.
In preferred embodiments of the present invention, above-mentioned hiding designated pictures, the throwing of the designated pictures after display color setting
The step of shadow picture, comprising: according to the generation position of projection image, determine moving direction;Along determining moving direction, translation
Designated pictures and projection image, so that designated pictures remove the container range of container, the projection image of designated pictures moves into container
Container range.
Second aspect, the embodiment of the invention provides a kind of converting means of picture color, device is set to terminal device;
It comprises determining that module, is used to determine whether to need to convert the color of designated pictures;Projection image generation module, in determination
In the case where the color for needing to convert designated pictures, the projection image of designated pictures is generated, sets specified face for projection image
Color;Projection image display module, for hiding designated pictures, the projection image of the designated pictures after display color setting.
In preferred embodiments of the present invention, above-mentioned determining module is used for: receiving the interactive instruction of user's triggering;Wherein,
It is used to indicate whether to convert the color of designated pictures in interactive instruction;According to interactive instruction, it is determined whether need to convert
The color of designated pictures
In preferred embodiments of the present invention, above-mentioned projection image generation module is used for: obtaining the corresponding throwing of designated pictures
Shadow instruction;It include generation position and the designated color of projection image in projection instruction;Designated pictures are generated on generating position
Projection image;Designated color is set by projection image.
In preferred embodiments of the present invention, above-mentioned projection image display module is used for: by designated pictures from designated pictures
Home position be moved to the designated position in addition to home position, with hide designated pictures;Wherein, pass through preset display box
Picture or local picture of the display on home position;The projection image of designated pictures is moved to home position, with display
The projection image of designated pictures after color setting.
In preferred embodiments of the present invention, above-mentioned designated pictures are pre-set in corresponding container range;Container is pre-
Equipped with following container attributes: at picture in picture set corresponding with container, except container range or local picture
The picture being located within the scope of container or local picture in hidden state, picture set are in display state;Projection image
Display module is used for: designated pictures being moved to except the container range of container;The projection image of designated pictures is moved to appearance
Within the scope of the container of device.
In preferred embodiments of the present invention, above-mentioned projection image display module is used for: according to the generation position of projection image
It sets, determines moving direction;Along determining moving direction, designated pictures and projection image are translated, is held so that designated pictures remove
The container range of device, the projection image of designated pictures move into the container range of container.
The third aspect, the embodiment of the invention provides a kind of terminal device, including processor and memory, memory storages
There is the machine-executable instruction that can be executed by processor, processor executes machine-executable instruction to realize above-mentioned picture color
Transform method.
Fourth aspect, the embodiment of the invention provides a kind of machine readable storage medium, which is deposited
Machine-executable instruction is contained, when being called and being executed by processor, machine-executable instruction promotes the machine-executable instruction
Processor realizes the transform method of above-mentioned picture color.
The embodiment of the present invention bring it is following the utility model has the advantages that
Transform method, device, terminal device and the machine readable storage medium of picture color provided in an embodiment of the present invention,
Determine need to convert the color of designated pictures in the case where, generate the projection image of the designated pictures, then by the projection image
It is set as designated color;Then the designated pictures, the projection image of the designated pictures after display color setting are hidden.Which is logical
It crosses and generates projection image for designated pictures, and the mode that projection image color is arranged changes picture color, the mode of colour switching
It is simple and fast, without loading or safeguarding more image data, to improve the overall performance of the page, it is also beneficial to improve and uses
The Experience Degree at family.
Other features and advantages of the present invention will illustrate in the following description, alternatively, Partial Feature and advantage can be with
Deduce from specification or unambiguously determine, or by implementing above-mentioned technology of the invention it can be learnt that.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, better embodiment is cited below particularly, and match
Appended attached drawing is closed, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the transform method of picture color provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the transform method of another picture color provided in an embodiment of the present invention;
Fig. 3 is the flow chart of the transform method of another picture color provided in an embodiment of the present invention;
Fig. 4 is the flow chart of the transform method of another picture color provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of the converting means of picture color provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention
Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Under every other embodiment obtained, shall fall within the protection scope of the present invention.
In view of the existing mode for converting picture color according to user's operation usually requires to load or safeguard more figure
As data, it is easy to influence the overall performance of webpage, the convenience of colour switching is poor, is based on this, provided in an embodiment of the present invention
A kind of transform method of picture color, device and terminal device, the technology can be applied to mobile phone, tablet computer, computer, specially
With on the terminal devices such as terminal, can be used for APP (Application, application program) page, Webpage, operating system page
In the scenes such as face.
For the transformation convenient for understanding the present embodiment, first to a kind of picture color disclosed in the embodiment of the present invention
Method describes in detail, and this method is applied to terminal device;As shown in Figure 1, this method comprises the following steps:
Step S102, it is determined whether need to convert the color of designated pictures;
The condition that the color of transformation designated pictures can specifically be preset, when preset condition is triggered, determining should
Designated pictures need turn colors;For example, the condition can click the designated pictures for user or the designated pictures are corresponding presses
Button, the corresponding task of the designated pictures are performed;In addition, designated pictures can also be triggered without user, in page presentation mistake
Auto-changing color in journey, at this point, determining the color for needing to convert designated pictures if page load is completed.
Step S104 generates the projection image of designated pictures in the case where determination needs to convert the color of designated pictures,
Designated color is set by the projection image;
In general, projection image can be understood as the picture that designated pictures generate after light irradiates;If the designated pictures
Including foreground area and background area, then usually only the profile of the background area with designated pictures is special for corresponding projection image
Sign, color, Texture eigenvalue without background area, with less the profile of foreground area, color, Texture eigenvalue;Example
Such as, which can be solely a white space identical with designated pictures shape.If before the designated pictures only include
Scene area, background area be it is transparent, then projection image usually has the contour feature of the foreground area of designated pictures, but does not have
Color, Texture eigenvalue in foreground area;Therefore, in the present embodiment, designated pictures are usually the figure without background area
Piece, when the color in foreground area, textural characteristics are relatively simple (such as foreground area be pure color), except color, textural characteristics with
Outside, projection image can inherit most of feature of designated pictures, especially contour feature.
The contour feature of projection image can be obtained by designated pictures, and the profile area encompassed of projection image can be with
It is filled by preset above-mentioned designated color;The designated color can be for pure color, gradient color or with textured face
Color.
Step S106 hides designated pictures, the projection image of the designated pictures after display color setting.
The generation position of above-mentioned projection image specifically without limitation, can for around designated pictures and not with designated pictures weight
It is folded, such as top, lower part, left side, the right side of designated pictures;It can also be Chong Die with designated pictures or partly overlaps.In order to pass through
Projection image realizes the effect of picture discoloration, when showing projection image on the position of designated pictures, hides designated pictures.Example
Such as, designated pictures can be hidden by executing to hide to order, or one display window of setting, by designated pictures from the display window
It is removed in mouthful, and projection image is moved into display window, to realize when display projection image and hide the purpose of designated pictures.
The transform method of picture color provided in an embodiment of the present invention, in the feelings of the determining color for needing to convert designated pictures
Under condition, the projection image of the designated pictures is generated, then set designated color for the projection image;Then the specified figure is hidden
Piece, the projection image of the designated pictures after display color setting.Which is arranged by generating projection image for designated pictures
The mode of projection image color changes picture color, and the mode of colour switching is simple and fast, without loading or safeguarding more figure
As data, to improve the overall performance of the page, it is also beneficial to improve the Experience Degree of user.
The embodiment of the present invention also provides the transform method of another picture color, and this method emphasis is described in interaction scenarios
Under, it is determined whether need to convert the concrete mode of designated pictures;As shown in Fig. 2, this method comprises the following steps:
Step S202 receives the interactive instruction of user's triggering;Wherein, it is used to indicate whether in the interactive instruction to specified figure
The color of piece is converted;
Step S204, according to above-mentioned interactive instruction, it is determined whether need to convert the color of the designated pictures;If so,
Execute step S206;If not, terminating;
It should be noted that the interactive instruction can directly indicate whether to convert the color of designated pictures;For example,
User can click picture or the triggering interactive instruction of corresponding button area;In general, after user triggers interactive instruction, terminal device
The corresponding interactive operation of the interactive instruction would generally be executed;The interactive instruction can be the color of change designated pictures, the interaction
Instructing corresponding interactive operation is exactly to change the color of the designated pictures.
Above-mentioned interactive instruction can also indicate whether to convert the color of designated pictures indirectly, interactive instruction itself
Other corresponding interactive operations, itself is not exclusively for indicating whether that the color to designated pictures converts;But terminal device connects
After receiving interactive instruction, it will usually inquire whether the interactive instruction is preset with the corresponding designated pictures of interactive instruction, and specified figure
Piece is preset as after receiving interactive instruction, converts the color of designated pictures.
For example, the interactive instruction is the password of display input, the corresponding interactive operation of the interactive instruction is exactly that user is defeated
The password entered is shown as true cipher symbol from symbol (such as pore, star symbol) is hidden.In order to prompt user to know to work as
The display mode of preceding password can preset a designated pictures, such as the picture of pigsney, when the display mode of password is to hide symbol
Number when, the designated pictures can be default color, such as grey;After user issues above-mentioned interactive instruction, terminal device transformation is close
The display mode of code, while converting the color of designated pictures, is such as transformed to green, is shown as true with prompt user's current password
Real cipher symbol.
For another example, in an operating system, in the set interface of application program, the specified figure of dustbin pattern can be shown
Piece, the designated pictures default color are usually white;When the picture that user drags a certain application program is corresponding to the designated pictures
Region when, that is, can be considered the user triggering interactive instruction for delete the application program;It, should when receiving the interactive instruction
Designated pictures discoloration, such as red more eye-catching color, to prompt user's trailing application program that will delete;When with
When the corresponding region of the designated pictures discharges the application program, terminal device is to execute the interaction behaviour for deleting the application program at family
Make.
Step S206 generates the projection image of designated pictures, sets designated color for the projection image;
Step S208 hides designated pictures, the projection image of the designated pictures after display color setting.
In aforesaid way, when receiving the interactive command of user, transformation is determined the need for according to the interactive command and is referred to
Determine the color of picture, if it is desired, then generate the projection image of the designated pictures, then set specified face for the projection image
Color;Then the designated pictures, the projection image of the designated pictures after display color setting are hidden.In which, by being specified
Picture generates projection image, and the mode that projection image color is arranged changes picture color, and the mode of colour switching is simple and fast,
Without loading or safeguarding more image data, to improve the overall performance of the page;Meanwhile keeping human-computer interaction more suitable
Freely, user experience is higher.
The embodiment of the present invention also provides the transform method of another picture color, and this method is in above-described embodiment the method
On the basis of realize;The description of this method emphasis generates and shows the specific implementation of projection image and hiding designated pictures;
As shown in figure 3, this method comprises the following steps:
Step S302 receives the interactive instruction of user's triggering;
Step S304, according to above-mentioned interactive instruction, it is determined whether need to convert the color of the designated pictures;If so,
Execute step S306;If not, terminating;
Step S306 obtains the corresponding projection instruction of designated pictures;It include the generation position of projection image in projection instruction
It sets and designated color;
The projection instruction of above-mentioned designated pictures can be preset, and be stored in the corresponding page code of the designated pictures
In;For the ease of the movement of subsequent projection image and designated pictures, the generation position of the projection image in projection instruction can be
The position on designated pictures periphery, the generation position can be the relative position with designated pictures, on the right side of designated pictures, refer to this
Determine the preset distance of picture;The generation position is also possible to the absolute position in the page, such as on the basis of the page upper left corner, the life
At the length and width in the positional distance upper left corner.
Designated color in projection instruction, can be expressed, which can be RGB color by preset color value
Value, or hexadecimal color code;In general, the RGB color value of same color and hexadecimal color code correspond;Example
Such as, for pink, corresponding RGB color value is 255,192,203, and hexadecimal color code is #FFC0CB.
Step S308 generates the projection image of designated pictures on above-mentioned generation position;Set specified for projection image
Color.
The generation position is usually a location point, is also possible to a position range;When generating position is location point,
Which point that the projection image of generation can be preset is overlapped with the generation position, central point, upper left angle point, the right side such as projection image
Lower angle point etc.;When generating position is position range, it usually needs the size of default projection image, according to the size of projection image
The size of position range is set.When designated color is arranged for projection image, the designated color can specifically be filled to projection
On picture.
Designated pictures are moved to from the home position of the designated pictures specific bit in addition to home position by step S310
It sets, to hide designated pictures;Wherein, picture or local picture on home position are shown by preset display box;
The home position of the designated pictures can be understood as before receiving the corresponding interactive command of the designated pictures, should
The location of designated pictures;Display box is preset on the home position, it will be understood that, should in order to avoid influencing Page Views
Display box will not be usually directly displayed on the page;But the display box can be preset with as properties: show the display box range
Interior picture or local picture, and hide picture or local picture beyond the display box range;The display box can pass through page
The code commands in face are realized, such as CSS code;Based on the attribute of above-mentioned display box, in order to show projection image and hide specified figure
Designated pictures can be moved to the designated position in addition to home position from home position by piece, and the designated position is usually aobvious
Show other than frame range, to hide the designated pictures.
It should be noted that designated pictures projection image corresponding with the designated pictures, it can be understood as one group of pictures
It closes, includes designated pictures projection image corresponding with the designated pictures in the set;It can be appreciated that projection image refers to
Determine the expansion of picture, i.e. projection image and designated pictures is a picture;Above-mentioned display box usually only corresponds to one group of picture
Set or a picture;For other pictures near designated pictures, then not by the display of display box and hiding effect.
The projection image of designated pictures is moved to above-mentioned home position, the finger after being arranged with display color by step S312
Determine the projection image of picture.
In actual implementation, above-mentioned steps S310 and S312 can be executed sequentially, also may be performed simultaneously;I.e., it is possible to first
Designated pictures are removed from home position, then projection image is moved into home position;Can also move simultaneously designated pictures and
Projection image, until designated pictures reach the designated position in addition to home position, projection image reaches the home position.
In aforesaid way, when receiving the interactive command of user, transformation is determined the need for according to the interactive command and is referred to
Determine the color of picture, if it is desired, then pass through the generation position for including in the corresponding projection instruction of designated pictures and designated color
Generate projection image;The designated pictures, and the throwing of the designated pictures after display color setting are hidden by way of display box again
Shadow picture.In which, by generating projection image for designated pictures, and the mode that projection image color is arranged changes picture face
The mode of color, colour switching is simple and fast, without loading or safeguarding more image data, to improve the globality of the page
Energy;Meanwhile keeping human-computer interaction more smooth, user experience is higher.
The embodiment of the present invention also provides the transform method of another picture color, and this method is in above-described embodiment the method
On the basis of realize;The description of this method emphasis shows the specific implementation side of projection image and hiding designated pictures by container
Formula.Designated pictures are pre-set in corresponding container range;The container is at least preset with following container attributes: corresponding with container
Picture set in, picture except container range or local picture be in hidden state, being located in picture set
Picture or local picture within the scope of container are in display state.
The setting of the container can pass through order<div class="icon"></div>it realizes, and passes through css pattern
The container attribute of the container is arranged in overflow:hidden, and the order is it is to be understood that ought be right beyond the container range of container
As being hidden.
In order to show designated pictures before user triggers interactive instruction, in the initial state, which can position
Within the scope of the container of container;The projection image of the designated pictures of generation is located at except the container range of container.In order to complete
Display designated pictures, the size which corresponds to the container range of container usually matches with the size of designated pictures,
Size such as container range is usually identical as the size of designated pictures, or slightly larger than the size of designated pictures.According to container range
Size, the projection image of generation can be set at a distance from designated pictures, the distance typically at least be greater than container range ruler
Very little half, such as the half of container range wide or the half of container extent height;Further according to distance selection projection image
Generate position.
Attribute based on said vesse, and in the initial state, the position of designated pictures and projection image is above-mentioned to hide
The step of designated pictures, the projection image of the designated pictures after display color setting, it can also be accomplished in the following manner: will refer to
Determine picture to be moved to except the container range of container;The projection image of designated pictures is moved within the scope of the container of container.
It is appreciated that designated pictures and projection image can move simultaneously, it is also mobile according to preset sequencing;It moves at the same time
In the process, designated pictures and projection image can be considered as a picture, mobile designated pictures and throwing in a manner of integral translation
Shadow picture.
Based on foregoing description, this method is as shown in Figure 4, wherein in order to guarantee the transform effect of picture color, finger therein
Determine the picture that picture is transparent background, the frame of the designated pictures is transparent border;Wherein, transparent background is it can be appreciated that nothing
Color background, transparent border is it can be appreciated that colourless frame;This method comprises the following steps:
Step S402 receives the interactive instruction of user's triggering;
Step S404, according to above-mentioned interactive instruction, it is determined whether need to convert the color of the designated pictures;If so,
Execute step S406;If not, terminating;
Step S406 generates the projection image of designated pictures, sets designated color for the projection image;
Step S408 determines moving direction according to the generation position of projection image;
Wherein, which can be width direction, short transverse, diagonal or its other party of designated pictures
To;For example, if projection image generates the right side that position is designated pictures, moving direction is exactly to be moved to the left;Such as
Fruit projection image generates the left side that position is designated pictures, then moving direction is exactly to move right;If the life of projection image
It is the top of designated pictures at position, then moving direction is exactly to move down;If the generation position of projection image is specified figure
The lower part of piece, then moving direction is exactly to move up.
For the ease of movement and guarantee mobile accuracy, moving direction is usually the width direction or height of designated pictures
Direction, wherein width direction includes being moved to the left or moving right, and length direction includes moving up or moving down.Work as throwing
When the generation position of shadow picture is other directions such as the upper right corner, the lower left corner of designated pictures, moving direction at this time is usually oblique
To movement.
Step S410 translates designated pictures and projection image along determining moving direction, holds so that designated pictures remove
The container range of device, the projection image of designated pictures move into the container range of container.
In actual implementation, perspective view can be generated by order filter:drop-shadow (color, width, 0)
Piece;Wherein, color is the color parameter of the designated color of projection image, and width, 0 for being arranged the generation position of projection image
It sets, i.e., on the right side of designated pictures, the position apart from designated pictures width;If it is drop-shadow (color, 0, height),
Then represent the position for generating position as designated pictures top, apart from designated pictures height.If it is drop-shadow
(color, width, height) is then represented and is generated position as the upper right corner of designated pictures, and width direction is apart from designated pictures
Width, position of the length direction apart from designated pictures height.In addition, above-mentioned drop-shadow order can also pass through box-
Shadow is replaced, and the purpose for generating projection image also may be implemented.
Left can be passed through: the projection image of the mobile translation designated pictures and designated pictures of the orders such as negative width;Such as this
" Left: negative width " can make the projection image of designated pictures and designated pictures to left width length;"Right:
Width " can make the projection image of designated pictures and designated pictures to right translation width length.It is appreciated that moving direction and
Moving distance is corresponding with the generation position of projection image.
In order to further increase display effect, the present embodiment can with to container container range, the size of designated pictures,
And the size of projection image further is matched;Specifically, the container range of container is identical as the size of designated pictures;Refer to
The projection image for determining picture is identical as the size of designated pictures;Designated pictures are at a distance from the projection image of designated pictures and specified
The width or height of picture are identical.In actual implementation, the container range, the size of designated pictures and projection image of container
Size by same group of parameter setting, such as width and height, the identical of three's size can be realized;Designated pictures with
The distance of the projection image of designated pictures can be arranged by width or height, and the distance and designated pictures can be realized
Width or height are identical.Matched by above-mentioned size, can to avoid designated pictures or projection image are shown within the scope of container completely,
It avoids showing other pictures or specific picture, to improve display effect.
In aforesaid way, projection image is generated by using the drop-shadow filter in CSS3 filter filter, it should
Drop-shadow filter can add drop shadow to the nontransparent region of element or picture.For background transparent picture (or figure
Mark), by application without fuzzy projection, it is equivalent to generate the picture of another color, it is then that original icon is hidden
Ensconce container outside, projection image be arranged within container range, the mode of colour switching is simple and fast, without load or
More image data is safeguarded, to improve the overall performance of the page;Meanwhile keeping human-computer interaction more smooth, user experience
It spends higher.
Corresponding to above method embodiment, a kind of structural schematic diagram of the converting means of picture color shown in Figure 5,
The device is set to terminal device;The device includes:
Determining module 50 is used to determine whether to need to convert the color of designated pictures;
Projection image generation module 51, for generating specified in the case where determination needs to convert the color of designated pictures
Projection image is set designated color by the projection image of picture;
Projection image display module 52, for hiding designated pictures, the perspective view of the designated pictures after display color setting
Piece.
The converting means of picture color provided in an embodiment of the present invention, in the feelings of the determining color for needing to convert designated pictures
Under condition, the projection image of the designated pictures is generated, then set designated color for the projection image;Then the specified figure is hidden
Piece, the projection image of the designated pictures after display color setting.Which is arranged by generating projection image for designated pictures
The mode of projection image color changes picture color, and the mode of colour switching is simple and fast, without loading or safeguarding more figure
As data, to improve the overall performance of the page, it is also beneficial to improve the Experience Degree of user.
Further, above-mentioned determining module, is used for: receiving the interactive instruction of user's triggering;Wherein, it is used in interactive instruction
Indicate whether to convert the color of designated pictures;According to interactive instruction, it is determined whether need to convert the color of designated pictures.
Further, above-mentioned projection image generation module, is used for: obtaining the corresponding projection instruction of designated pictures;Projection refers to
Generation position and designated color in order including projection image;The projection image of designated pictures is generated on generating position;It will throw
Shadow picture is set as designated color.
Further, above-mentioned projection image display module, is used for: by designated pictures from the home position of the designated pictures
It is moved to the designated position in addition to home position, to hide designated pictures;Wherein, it is shown by preset display box in original
Picture or local picture on beginning position;The projection image of designated pictures is moved to home position, after being arranged with display color
Designated pictures projection image.
Further, above-mentioned designated pictures are pre-set in corresponding container range;Container is preset with following container categories
Property: picture in picture set corresponding with container, except container range or local picture are in hidden state, picture
The picture being located within the scope of container or local picture in set are in display state;Above-mentioned projection image display module is used
In: designated pictures are moved to except the container range of container;The projection image of designated pictures is moved to the container model of container
Within enclosing.
Further, above-mentioned projection image display module, is used for: according to the generation position of projection image, determining movement side
To;Along determining moving direction, designated pictures and projection image are translated, so that designated pictures remove the container range of container,
The projection image of designated pictures moves into the container range of container.
The embodiment of the invention also provides a kind of terminal devices, for running the transform method of above-mentioned picture color;Referring to
Shown in Fig. 6, which includes memory 100 and processor 101, wherein memory 100 is by storing based on one or more
The instruction of calculation machine, one or more computer instruction is executed by processor 101, to realize the transform method of above-mentioned picture color.
Further, terminal device shown in fig. 6 further includes bus 102 and communication interface 103, and processor 101, communication connect
Mouth 103 and memory 100 are connected by bus 102.
Wherein, memory 100 may include high-speed random access memory (RAM, Random Access Memory),
It may further include non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.By extremely
A few communication interface 103 (can be wired or wireless) is realized logical between the system network element and at least one other network element
Letter connection, can be used internet, wide area network, local network, Metropolitan Area Network (MAN) etc..Bus 102 can be isa bus, pci bus or
Eisa bus etc..The bus can be divided into address bus, data/address bus, control bus etc..Only to be used in Fig. 6 convenient for indicating
One four-headed arrow indicates, it is not intended that an only bus or a type of bus.
Processor 101 may be a kind of IC chip, the processing capacity with signal.It is above-mentioned during realization
Each step of method can be completed by the integrated logic circuit of the hardware in processor 101 or the instruction of software form.On
The processor 101 stated can be general processor, including central processing unit (Central Processing Unit, abbreviation
CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital
Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific Integrated
Circuit, abbreviation ASIC), ready-made programmable gate array (Field-Programmable Gate Array, abbreviation FPGA) or
Person other programmable logic device, discrete gate or transistor logic, discrete hardware components.It may be implemented or execute sheet
Disclosed each method, step and logic diagram in inventive embodiments.General processor can be microprocessor or the processing
Device is also possible to any conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in
Hardware decoding processor executes completion, or in decoding processor hardware and software module combination execute completion.Software mould
Block can be located at random access memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable storage
In the storage medium of this fields such as device, register maturation.The storage medium is located at memory 100, and processor 101 reads memory
Information in 100, in conjunction with its hardware complete previous embodiment method the step of.
The embodiment of the invention also provides a kind of machine readable storage medium, which is stored with machine
Executable instruction, for the machine-executable instruction when being called and being executed by processor, machine-executable instruction promotes processor real
The transform method of existing above-mentioned picture color, specific implementation can be found in embodiment of the method, and details are not described herein.
Transform method, device, terminal device and the machine readable storage of picture color provided by the embodiment of the present invention are situated between
The computer program product of matter, the computer readable storage medium including storing program code, what said program code included
Instruction can be used for executing previous methods method as described in the examples, and specific implementation can be found in embodiment of the method, no longer superfluous herein
It states.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, terminal device, server or network equipment etc.) execute the whole or portion of each embodiment the method for the present invention
Step by step.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), with
Machine accesses various Jie that can store program code such as memory (RAM, Random Access Memory), magnetic or disk
Matter.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention
Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair
It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art
In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light
It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make
The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention
Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (14)
1. a kind of transform method of picture color, which is characterized in that the method is applied to terminal device;Include:
Determine the need for the color of transformation designated pictures;
In the case where determination needs to convert the color of the designated pictures, the projection image of the designated pictures is generated, by institute
It states projection image and is set as designated color;
Hide the designated pictures, the projection image of the designated pictures after display color setting.
2. the method according to claim 1, wherein the color for determining the need for transformation designated pictures
Step, comprising:
Receive the interactive instruction of user's triggering;Wherein, the face to the designated pictures is used to indicate whether in the interactive instruction
Color is converted;
According to the interactive instruction, it is determined whether need to convert the color of the designated pictures.
3. the method according to claim 1, wherein the projection image of the designated pictures is generated, by the throwing
The step of shadow picture is set as designated color, comprising:
Obtain the corresponding projection instruction of the designated pictures;It include the generation position of projection image in the projection instruction and described
Designated color;
The projection image of the designated pictures is generated on the generation position;
The designated color is set by the projection image.
4. the institute the method according to claim 1, wherein hide the designated pictures, after display color setting
The step of stating the projection image of designated pictures, comprising:
The designated pictures are moved to the designated position in addition to the home position from the home position of the designated pictures,
To hide the designated pictures;Wherein, picture or Local map on the home position are shown by preset display box
Piece;
The projection image of the designated pictures is moved to the home position, the designated pictures after being arranged with display color
Projection image.
5. the method according to claim 1, wherein the designated pictures are pre-set at corresponding container range
In;The container is preset with following container attributes: in picture set corresponding with container, except the container range
Picture or local picture are in hidden state, the picture or Local map being located within the scope of the container in the picture set
Piece is in display state;
It is described to hide the designated pictures, the step of the projection image of the designated pictures after display color setting, comprising:
The designated pictures are moved to except the container range of the container;The projection image of the designated pictures is moved to
Within the scope of the container of the container.
6. according to the method described in claim 5, it is characterized in that, described hide the designated pictures, after display color setting
The designated pictures projection image the step of, comprising:
According to the generation position of the projection image, moving direction is determined;
Along the determining moving direction, the designated pictures and the projection image are translated, so that the designated pictures are moved
The container range of the container out, the projection image of the designated pictures move into the container range of the container.
7. a kind of converting means of picture color, which is characterized in that described device is set to terminal device;Include:
Determining module is used to determine whether to need to convert the color of designated pictures;
Projection image generation module, for generating the finger in the case where determination needs to convert the color of the designated pictures
The projection image is set designated color by the projection image for determining picture;
Projection image display module, for hiding the designated pictures, the projection of the designated pictures after display color setting
Picture.
8. device according to claim 7, which is characterized in that the determining module is used for:
Receive the interactive instruction of user's triggering;Wherein, the face to the designated pictures is used to indicate whether in the interactive instruction
Color is converted;
According to the interactive instruction, it is determined whether need to convert the color of the designated pictures.
9. device according to claim 7, which is characterized in that the projection image generation module is used for:
Obtain the corresponding projection instruction of the designated pictures;It include the generation position of projection image in the projection instruction and described
Designated color;
The projection image of the designated pictures is generated on the generation position;
The designated color is set by the projection image.
10. device according to claim 7, which is characterized in that the projection image display module is used for:
The designated pictures are moved to the designated position in addition to the home position from the home position of the designated pictures,
To hide the designated pictures;Wherein, picture or Local map on the home position are shown by preset display box
Piece;
The projection image of the designated pictures is moved to the home position, the designated pictures after being arranged with display color
Projection image.
11. device according to claim 7, which is characterized in that the designated pictures are pre-set at corresponding container model
In enclosing;The container is preset with following container attributes: it is in picture set corresponding with container, be located at the container range except
Picture or local picture be in hidden state, picture within the scope of the container or part in the picture set
Picture is in display state;
The projection image display module, is used for:
The designated pictures are moved to except the container range of the container;The projection image of the designated pictures is moved to
Within the scope of the container of the container.
12. device according to claim 11, which is characterized in that the projection image display module is used for:
According to the generation position of the projection image, moving direction is determined;
Along the determining moving direction, the designated pictures and the projection image are translated, so that the designated pictures are moved
The container range of the container out, the projection image of the designated pictures move into the container range of the container.
13. a kind of terminal device, which is characterized in that including processor and memory, the memory is stored with can be described
The machine-executable instruction that processor executes, the processor execute the machine-executable instruction to realize claim 1 to 6
Described in any item methods.
14. a kind of machine readable storage medium, which is characterized in that the machine readable storage medium is stored with the executable finger of machine
It enables, for the machine-executable instruction when being called and being executed by processor, machine-executable instruction promotes processor to realize that right is wanted
Seek 1 to 6 described in any item methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811501608.7A CN109636871A (en) | 2018-12-07 | 2018-12-07 | Transform method, device and the terminal device of picture color |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811501608.7A CN109636871A (en) | 2018-12-07 | 2018-12-07 | Transform method, device and the terminal device of picture color |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109636871A true CN109636871A (en) | 2019-04-16 |
Family
ID=66072173
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811501608.7A Pending CN109636871A (en) | 2018-12-07 | 2018-12-07 | Transform method, device and the terminal device of picture color |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109636871A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111382289A (en) * | 2020-03-13 | 2020-07-07 | 闻泰通讯股份有限公司 | Picture display method and device, computer equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103871014A (en) * | 2012-12-17 | 2014-06-18 | 联想(北京)有限公司 | Image color changing method and device |
CN104090709A (en) * | 2014-06-11 | 2014-10-08 | 小米科技有限责任公司 | Picture switching method and device |
CN105354864A (en) * | 2015-09-25 | 2016-02-24 | 浙江大学 | Textile tissue color replacement simulation method with relatively high truth |
CN107093168A (en) * | 2017-03-10 | 2017-08-25 | 厦门美图之家科技有限公司 | Processing method, the device and system of skin area image |
CN108897881A (en) * | 2018-07-05 | 2018-11-27 | 腾讯科技(深圳)有限公司 | Interactive image display methods, device, equipment and readable storage medium storing program for executing |
CN108921810A (en) * | 2018-06-20 | 2018-11-30 | 厦门美图之家科技有限公司 | A kind of color transfer method and calculate equipment |
-
2018
- 2018-12-07 CN CN201811501608.7A patent/CN109636871A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103871014A (en) * | 2012-12-17 | 2014-06-18 | 联想(北京)有限公司 | Image color changing method and device |
CN104090709A (en) * | 2014-06-11 | 2014-10-08 | 小米科技有限责任公司 | Picture switching method and device |
CN105354864A (en) * | 2015-09-25 | 2016-02-24 | 浙江大学 | Textile tissue color replacement simulation method with relatively high truth |
CN107093168A (en) * | 2017-03-10 | 2017-08-25 | 厦门美图之家科技有限公司 | Processing method, the device and system of skin area image |
CN108921810A (en) * | 2018-06-20 | 2018-11-30 | 厦门美图之家科技有限公司 | A kind of color transfer method and calculate equipment |
CN108897881A (en) * | 2018-07-05 | 2018-11-27 | 腾讯科技(深圳)有限公司 | Interactive image display methods, device, equipment and readable storage medium storing program for executing |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111382289A (en) * | 2020-03-13 | 2020-07-07 | 闻泰通讯股份有限公司 | Picture display method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105843494B (en) | Method, device and terminal for realizing area screen capture | |
CN108228183B (en) | Front-end interface code generation method and device, electronic equipment and storage medium | |
US10387549B2 (en) | Procedurally expressing graphic objects for web pages | |
CN104216691B (en) | A kind of method and device for creating application | |
US7692658B2 (en) | Model for layout animations | |
CN106463003B (en) | Manufacture the three dimensional object with embossment | |
EP1462998A2 (en) | Markup language and object model for vector graphics | |
CN107239287A (en) | A kind of Webpage display process, device, electronic equipment and storage medium | |
CN104572967B (en) | A kind of method and apparatus in page graphing | |
JP2012521041A (en) | Smooth layout animation for continuous and discontinuous properties | |
US10373363B2 (en) | Systems and methods for visually creating and editing scrolling actions | |
WO2014117559A1 (en) | 3d-rendering method and device for logical window | |
CN108664454A (en) | E-book page display method, device and terminal device | |
CN110502205A (en) | Picture showing edge processing method, device, electronic equipment and readable storage medium storing program for executing | |
CN110428504B (en) | Text image synthesis method, apparatus, computer device and storage medium | |
CN109636871A (en) | Transform method, device and the terminal device of picture color | |
CN107621951B (en) | View level optimization method and device | |
CN106998489B (en) | A kind of focus is crossed the border searching method and device | |
CN108874392A (en) | User's guideline interface generation method and device | |
CN106846498B (en) | Laser point cloud rendering method and device | |
CN113986176A (en) | Color display method and device, electronic equipment and readable medium | |
CN107102832B (en) | The display methods and device of figure in chart | |
CN114119821A (en) | Hair rendering method, device and equipment of virtual object | |
CN113051872A (en) | Method, device and equipment for displaying highlighted characters | |
CN113373607A (en) | Embroidery needle path generation method and device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190416 |