CN108597000A - The method and device of Image Rendering - Google Patents

The method and device of Image Rendering Download PDF

Info

Publication number
CN108597000A
CN108597000A CN201810377844.6A CN201810377844A CN108597000A CN 108597000 A CN108597000 A CN 108597000A CN 201810377844 A CN201810377844 A CN 201810377844A CN 108597000 A CN108597000 A CN 108597000A
Authority
CN
China
Prior art keywords
area
image
control regions
region
showing
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
Application number
CN201810377844.6A
Other languages
Chinese (zh)
Inventor
孔喜龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201810377844.6A priority Critical patent/CN108597000A/en
Publication of CN108597000A publication Critical patent/CN108597000A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Abstract

This application provides a kind of method and devices of Image Rendering, wherein this method includes:Determination will show the first area of the image, draw a second area for including the first area, wherein the second area and first area geometric center having the same;Pixel in region in the second area in addition to the first area is shown as background color, fills image to be shown to the first area.Using above-mentioned technical proposal, solves the problems, such as the marginal existence sawtooth sense of the image of application program shearing in the related technology, image to be displayed is filled in first area, the background color that second area except first area is shown, so that there is clear clearly boundary in first area, there is no sawtooth senses at image to be displayed edge therein.

Description

The method and device of Image Rendering
Technical field
This application involves computer realms, in particular to a kind of method and device of Image Rendering.
Background technology
In the related art, round head portrait be currently in social networking application program it is a kind of displaying user's head portrait mainstream scheme it One, social networking application program group, multi-conference, personal account head portrait be circular design.Some social networking application programmatic clients Drawing engine is based on Interface Development Tools duilib, this is a kind of current relatively conventional user interface (Users Interface, referred to as UI) library.Regrettably there is no the draftings of round head portrait to realize in the libraries UI, or when realizing A result for allowing people to receive is not reached.It is therefore desirable to improve it, with achieve the effect that can be ideal.
Social networking application program based on to draw round head portrait real using setting picture attribute borderround in the libraries duilib Existing, drafting circle is that four values of setting borderround are circular radius.It the libraries bottom duilib can be automatically by figure Piece is cut into circle.However, after head portrait is drawn out, corner burr sawtooth sense is strong, especially in high clear screen (High DPI, height Resolution screen, dots per inch Dots Per inch, referred to as DPI) in the case of show and become apparent.It is embodied in It is relatively fuzzyyer that picture is drawn under high clear screen.In addition, when if dimension of picture changes, it would be desirable to provide the Background of different sizes Mode.This undoubtedly increases the complexity of software development.
For application program in the related technology shearing image marginal existence sawtooth sense the problem of, there is presently no effective Solution.
Invention content
The embodiment of the present application provides a kind of method and device of Image Rendering, at least to solve to apply journey in the related technology The problem of marginal existence sawtooth sense of the image of sequence shearing.
According to one embodiment of the application, a kind of method of Image Rendering is provided, including:It determines for showing image First area;Draw a second area for including the first area, wherein the second area and first area tool There is identical geometric center;Pixel display background face in region in the second area in addition to the first area is set Color;Image to be shown is filled to the first area.
Optionally it is determined that for before showing the first area of image, the control regions for showing image are determined;Institute It states and determines that a preset shape region is the first area in control regions.
Optionally it is determined that the control regions for showing image, including:Determining that current display resolution is default differentiates In the case of rate, adjusts amplification according to preset ratio and show the control regions, wherein the default resolution ratio is more than default threshold Value.
Optionally, it is arranged before the pixel display background color of the second area except the first area, draws Display background for the control regions for showing image;Determine the background color of the display background.
Optionally, image to be shown is filled to the first area, including:The image to be shown is done smoothed Cross processing;The image completion that will seamlessly transit that treated is to the first area.
Optionally, the image to be shown is seamlessly transitted into processing, the method further includes:It reads described to be shown Picture to bit map bitmap in;It determines that the bitmap is programming interface Gdiplus objects, is set with seamlessly transitting pattern Set the Gdiplus objects.
According to another embodiment of the application, a kind of device of Image Rendering is additionally provided, including:Determining module is used In the determining first area for showing image;Drafting module, for drawing a second area for including the first area, In, the second area and the first area geometric center having the same;Setup module, for the second area to be arranged Pixel display background color in the interior region in addition to the first area;Module is filled, for filling image to be shown To the first area.
Optionally it is determined that for before showing the first area of image, the determining module is additionally operable to determine for showing The control regions of image;Determine that a preset shape region is the first area in the control regions.
Optionally, the determining module is used to determine the control regions for showing image, including:Determining current display In the case that resolution ratio is default resolution ratio, adjusts amplification according to preset ratio and show the control regions, wherein is described default Resolution ratio is more than predetermined threshold value.
Optionally, it is arranged before the pixel display background color of the second area except the first area, it is described Setup module is additionally operable to draw the display background of the control regions for showing image;Determine the background face of the display background Color.
Optionally, filling module is used to fill image to be shown to the first area, including:It will be described to be shown Image seamlessly transits processing;The image completion that will seamlessly transit that treated is to the first area.
Optionally, the filling module is used to the image to be shown seamlessly transitting processing, including:Described in reading In picture to be shown to bit map bitmap;Determine that the bitmap is Gdiplus objects, to seamlessly transit mode setting The Gdiplus objects.
According to another embodiment of the application, a kind of storage medium is additionally provided, meter is stored in the storage medium Calculation machine program, wherein the computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
According to another embodiment of the application, a kind of electronic device, including memory and processor are additionally provided, it is described Computer program is stored in memory, the processor is arranged to run the computer program to execute any of the above-described Step in embodiment of the method.
By the application, determination will be used to show the first area of image, draw one and include the second of first area Region, wherein the second area and first area geometric center having the same;The first area will be removed in the second area Except region in pixel be shown as background color, fill image to be shown to the first area.Using above-mentioned technical side Case solves the problems, such as the marginal existence sawtooth sense of the image of application program shearing in the related technology, is filled in first area Image to be displayed, the background color that the second area except first area is shown so that there is clear clearly boundary in first area, There is no sawtooth senses at image to be displayed edge therein.
Description of the drawings
Attached drawing described herein is used for providing further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please do not constitute the improper restriction to the application for explaining the application.In the accompanying drawings:
Fig. 1 is the method flow diagram according to the Image Rendering of the embodiment of the present application;
Fig. 2 is the schematic diagram of the first area and second area according to the application;
Fig. 3 is the schematic diagram for the mode one that an axisymmetric shape region is filled in the control regions according to the application;
Fig. 4 is the schematic diagram for the mode two that an axisymmetric shape region is filled in the control regions according to the application;
Fig. 5 is the schematic diagram for the mode three that an axisymmetric shape region is filled in the control regions according to the application;
Fig. 6 is the flow chart that round head portrait is drawn according to the social networking application program of the application;
Fig. 7 is a kind of structure diagram of terminal according to the ... of the embodiment of the present invention.
Specific implementation mode
The application is described in detail below with reference to attached drawing and in conjunction with the embodiments.It should be noted that not conflicting In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
It should be noted that term " first " in the description and claims of this application and above-mentioned attached drawing, " Two " etc. be for distinguishing similar object, without being used to describe specific sequence or precedence.
The scheme of present specification can be applied to terminal device, such as mobile phone, tablet computer, desktop computer etc..Using When the concrete example of scene can be some APP setting user's head portraits, clip image.
For application program in the related technology shearing image marginal existence sawtooth sense the problem of, one in the related technology The measure for improving round head portrait burrs on edges is to cover this sawtooth using the help of picture covering layer.In this scenario, due to picture Covering layer central, clear, corner are that circular non-opaque degree is circular pixel.Two pictures are superimposed, can be obtained one It is closer to circular head portrait.But applicant thinks that said program still has two problems, first, picture is in high definition screen display Show problem, second is that if picture background difference, it is desirable to provide adapt to the picture covering layer of different background.
A kind of method for the Image Rendering running on terminal is provided in the present embodiment, and Fig. 1 is implemented according to the application The method flow diagram of the Image Rendering of example, as shown in Figure 1, the flow includes the following steps:
Step S102 determines that the first area for showing image (when first area is border circular areas, may refer to figure 2 understand first area and second area);
Step S104 draws a second area for including the first area, wherein the second area and the first area have There is identical geometric center;
The meaning that second area includes first area can be that the pixel of second area is more than first area.
The pixel display background color in the region in the second area in addition to the first area is arranged in step S106;
Step S108 fills image to be shown to the first area.
You need to add is that the region in present specification can be axial symmetry region, such as border circular areas, square region Domain.
Through the above steps, determination will show the first area of the image, draw one and include the second of the first area Region, wherein the second area and first area geometric center having the same;The first area will be removed in the second area Except region in pixel be shown as background color, fill image to be shown to the first area.Using above-mentioned technical proposal, The marginal existence sawtooth sense for solving the problems, such as the image of application program shearing in the related technology, fills in first area and waits showing Diagram picture, the background color that the second area except first area is shown so that there is clear clearly boundary in first area, wherein There is no sawtooth senses at image to be displayed edge.
Optionally, the execution sequence of above-mentioned steps can be interchanged, and step S102 is not limited in present specification, The sequencing of S104, S106, S108.
Pass through, the image subsequently shown is generated according to the first area and the second area.
Optionally, Fig. 2 is the schematic diagram of the first area and second area according to the application, as shown in Fig. 2, illustrating In the case that region is border circular areas, first area is the small inner circle of radius, and second area is the big outer shroud circle of radius, outer shroud circle Radius ratio inner circle radius can big multiple pixels, correspond to Fig. 2, the scheme in present specification may include following step Suddenly:
Step 1 determines that the first area for showing image is the roundlet region in Fig. 2;
Step 2 draws the great circle region that a pixel region is more than the roundlet region, wherein the roundlet region and great circle The region center of circle having the same;
Pixel display background color in the region in the great circle region in addition to roundlet region is arranged in step 3, i.e., cyclic annular The pixel display background color of item;
Step 4 fills image to be shown to roundlet region.Optionally it is determined that for show image first area it Before, determine the control regions for showing image;An axisymmetric shape region is filled in the control regions, be determined as this One region.You need to add is that control can be the control that some application program transfers image, which transfers some image Display area is control regions, and control regions can be the control display area described in Fig. 6 flows.Under normal circumstances, control Include the image finally shown in region.Assuming that it is round head portrait that current image to be displayed, which is arranged, then social software visitor is opened Family end clicks setting head portrait at user setting, will appear the specific interface for obtaining head portrait on terminal interface, can claim to obtain head The specific interface of picture is the control, which can also shear image, into edlin, drafting in above-described embodiment the The step of one region and second area, can also be executed by the control.Using the scheme of the alternative embodiment, drafting figure is being waited for It is provided with first area in the control regions of picture, ensure that first area is located within the scope of control regions.
Optionally it is determined that the control regions for showing image;A preset shape region is determined in the control regions For the first area.Optionally, an axisymmetric shape region is filled in control regions, is by rectangle of control regions Example, specific filling mode may include following three kinds of modes:
Mode one, Fig. 3 are to fill the mode one in an axisymmetric shape region in the control regions according to the application to show It is intended to, is straight with rectangular width as shown in figure 3, can be with that value minimum in the width of control regions or length Diameter draws an inscribed circle, using first area of the inscribed circle as before described in embodiment, in this kind in the rectangle In the case of, rectangular two sides may be the tangent line of the first area, in this case, second area some be position In outside control regions, but except part display originally therefore to be also background color will not cause visual impact.
Mode two, Fig. 4 are to fill the mode two in an axisymmetric shape region in the control regions according to the application to show It is intended to, as shown in figure 4, using the value less than the rectangular width as diameter, it is rectangular that inscribe is drawn in the rectangle The inscribed circle on shape one side, in this case, rectangular is the tangent line of the first area, in this case, second on one side Region some also in control regions outside,
Mode three, Fig. 5 are to fill the mode three in an axisymmetric shape region in the control regions according to the application to show It is intended to, as shown in figure 5, using the value less than rectangular width as diameter, the first area of drafting is fully located at the control regions Inside, peripheral second area are likely located within the scope of control regions, or have part to be located at outside control regions range.
It should be noted that above-mentioned three kinds of modes fill an axisymmetric shape in control regions by way of example only, It is not limited to illustrate herein.
Optionally it is determined that the control regions for showing image, including:Determining that current display resolution is default differentiates It in the case of rate, adjusts amplification according to preset ratio and shows the control regions, wherein the default resolution ratio is more than predetermined threshold value. In the case that if display resolution were not conditioned, 1:1 draws target area destRect.If display resolution is set To amplify 1.2 times, then target area is also enlarged into 1.2 times, the i.e. old target areas fresh target region destRect= destRect*1.2*1.2.Optionally, when amplification shows control regions, first area scales up, can be in first area The image to be displayed of area bigger is stored, i.e. image to be displayed does not do enhanced processing when being put into first area, i.e., only will be former Image size has amplified the first area of display, and after the completion of filling, control regions are restored normal size and shown, and first Restore normal size and show that the image filled originally can be relatively sharp during scaling, realizes and is shown in high definition in region The image that the lower observation of screen is drawn, the image of the drafting is still it is clear that reduce sawtooth sense.
Optionally, it is arranged before the pixel display background color of the second area except the first area, drafting is used for Show the display background of the control regions of image;Determine the background color of the display background.You need to add is that background color can To be the position for showing the image in final application program, except interface color or tone, record background color be bkcolor.It sets the pixel of the second area except first area to background color, ensure that the edge of first area is clear It is clear.
Optionally, image to be shown is filled to the first area, including:The image to be shown is seamlessly transitted into place Reason;The image completion that will seamlessly transit that treated is to the first area.Using above-mentioned processing, it is possible to reduce the sawtooth of image border Sense so that the boundary of image is relatively sharp.
Optionally, which is seamlessly transitted into processing, this method further includes:Read the picture to be shown Into bit map bitmap;Determine that the bitmap is Gdiplus objects, to seamlessly transit the mode setting Gdiplus objects. Specifically, it reads in picture to bit map bitmap, bitmap is then read in into Gdiplus::Graphics, initialization Graphics objects, and it is SmoothingModeHighQuality that the pattern that seamlessly transits, which is arranged, setting interpolative mode is InterpolationModeHighQuality。
In the scheme of the application, when needing to show the round head portrait of user for social networking application program, in order to eliminate circle Forming head picture draws the image in the fuzzy sense of high definition screen display, the attribute that setting enabling gdi+ is drawn, such duilib bottoms When will be drawn using gdi+, wherein the mode of the round head portrait of drafting included duilib is graphical device interface (Graphics Device Interface, referred to as GDI).In order to reduce sawtooth sense, gdi+ drawing antialiasing attributes are opened in setting SmoothingModeHighQuality.In addition, before the drafting of round head portrait, head portrait background color is obtained.Use this color The circle of big two pixel of radius ratio circle head portrait is drawn, the circle is opaque.A wherein outer peripheral pixel is used for covering circle The sawtooth of forming head picture, one other pixel retouch side as head portrait.
Fig. 6 is the flow chart that round head portrait is drawn according to the social networking application program of the application, as shown in fig. 6, including following Step:
Step 601, picture path is obtained before drawing, obtaining picture to be drawn according to picture path (is equivalent to above-mentioned reality Apply the picture to be shown in example), if picture path is relative path, need the absolute road that relative path is converted to picture Diameter, for example, relative path is the image for being some application program, sectional drawing etc.;You need to add is that step 601 can be prior to Fig. 1 Step 108 execute;
Step 602, when user interface (User Interface, referred to as UI) draws control, region to be shown is obtained, or Referred to as obtain the DC (device context, device context) of specified control display area and window;It requires supplementation with It is that control can be the control that some application program transfers image, the display area which transfers some image is controls region Domain.Under normal circumstances, the image finally shown is included in control regions;
Step 603, region to be drawn is calculated, is specially calculated according to the target area destRect of current image (control regions that above-described embodiment description can be equivalent to).Notice that the display area needs to be adapted to high clear screen, it is current determining In the case that display resolution is default resolution ratio, adjusts amplification according to preset ratio and show the control regions, if display point In the case that resolution is not conditioned, 1:1 draws target area destRect.If display resolution is arranged to amplification 1.2 Times, then target area is also enlarged into 1.2 times, i.e. the old target area destRect*1.2* of fresh target region destRect= 1.2, wherein the default resolution ratio is more than predetermined threshold value;
Step 604, the display background of picture is drawn, is only had powerful connections after determining, control could draw various states successively In the contents to background such as picture, frame;You need to add is that display background can be used in step 609;
Step 605, after background is drawn, record background color is bkcolor;
Step 606, start to process picture reads in picture to bit map bitmap, then reads in bitmap first Gdiplus::Graphics, initialization Graphics objects, and setting seamlessly transit pattern and are SmoothingModeHighQuality, setting interpolative mode are InterpolationModeHighQuality.It requires supplementation with , which can correspond in above-described embodiment, read in the picture to be shown to bit map bitmap, really The fixed bitmap is Gdiplus objects, to seamlessly transit the mode setting Gdiplus objects;
Step 607, border circular areas is drawn, specifically, the destRect being arranged in read step 603 initializes one Gdiplus::The object of GraphicsPath, and a border circular areas is filled with the length and width of destRect, optionally, at this One border circular areas of inscribe in destRect, the border circular areas can be with unilateral inscribes, can also polygon inscribe;It requires supplementation with It is before being equivalent in embodiment, to determine the control regions for showing image;One is filled in the control regions Axisymmetric shape region is determined as the first area;
Step 608, filling picture specifically, uses the Graphics object filling steps in step 606 to border circular areas GraphicsPath objects in 607;
Step 609, the big border circular areas of pixel, nested two border circular areas, specifically, using in step 605 are drawn Bkcolor draws the border circular areas of big two pixel of head portrait than border circular areas in step 607, and border circular areas is two Circle, roundlet are hollow.Big two pixels of great circle radius ratio roundlet, two centers of circle overlap, and two pixels of great circle are background color.It will GraphicsPath objects in step 608 are nested into the roundlet, and the sawtooth sense at head portrait edge is eliminated with this, reaches smoothed The purpose crossed, you need to add is that, it can be equivalent in above-described embodiment, draw secondth area for including the first area Domain, wherein the second area and first area geometric center having the same;
Step 610, the round head portrait that step 609 generates is plotted to the GraphicsPath objects of DC pairs of target window In, you need to add is that, the step 108 of above-described embodiment can be equivalent to.
Using above-mentioned technical proposal, the soluble problem of present specification is to solve round head portrait in social networking application software Display problem, specially round head portrait can adaptive high clear screen, picture, which is shown, to be obscured.Make round head portrait edge transition compared with To be smooth, without burr.Without providing the picture covering layer using different background and size again.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but it is very much In the case of the former be more preferably embodiment.Based on this understanding, the technical solution of the application is substantially in other words to existing The part that technology contributes can be expressed in the form of software products, which is stored in a storage In medium (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, calculate Machine, server or network equipment etc.) execute each embodiment of the application described in method.
A kind of device of Image Rendering is additionally provided in the present embodiment, and the device is for realizing above-described embodiment and preferably Embodiment had carried out repeating no more for explanation.As used below, predetermined function may be implemented in term " module " The combination of software and/or hardware.Although device described in following embodiment is preferably realized with software, hardware, or The realization of the combination of person's software and hardware is also that may and be contemplated.
According to another embodiment of the application, a kind of device of Image Rendering is additionally provided, including:
Determining module, for determining the first area for showing image;
Drafting module, for drawing a second area for including the first area, wherein the second area and firstth area Domain geometric center having the same;
Setup module, the pixel display background face for being arranged in the region in the second area in addition to the first area Color;
Module is filled, for filling image to be shown to the first area.
Using above-mentioned technical proposal, determining module will show that the first area of the image, drafting module are used for determination Include the second area of the first area in drafting one, wherein in the second area and first area geometry having the same The heart;Setup module is used to be arranged pixel in the region in the second area in addition to the first area and is shown as background color, fills out Mold filling block is for filling image to be shown to the first area.Using above-mentioned technical proposal, solves and apply in the related technology The problem of marginal existence sawtooth sense of the image of program shearing, image to be displayed is filled in first area, except first area The background color that shows of second area so that there is clear clearly boundary in first area, and image to be displayed edge therein is not There is sawtooth sense again.
Optionally, which is additionally operable to the image to be shown seamlessly transitting processing, will seamlessly transit processing Image completion afterwards is to the first area.
Optionally it is determined that for before showing the first area of image, which, which is additionally operable to determine, is used for display figure The control regions of picture;An axisymmetric shape region is filled in the control regions, is determined as the first area.It requires supplementation with It is that control can be the control that some application program transfers image, the display area which transfers some image is controls region Domain.Under normal circumstances, the image finally shown is included in control regions.
Optionally, an axisymmetric shape region is filled in control regions, can be the width or length with control regions The circle is plotted in control regions by that minimum value as a diameter of a circle in degree.Can be in inscribe state, it can be with It is completely contained in control regions.
Optionally it is determined that module is used to determine the control regions for showing image, including:Determining current display resolution It in the case that rate is default resolution ratio, adjusts amplification according to preset ratio and shows the control regions, wherein the default resolution ratio is big In predetermined threshold value.Optionally, when amplification shows control regions, first area scales up, and image to be displayed is not done at amplification Original image is only placed the first area of the control regions after amplification display by reason, in order to follow-up normal display controls region When domain, the image filled originally can be relatively sharp during scaling.
Optionally, setup module be used to be arranged the second area except the first area pixel display background color it Before, it is additionally operable to draw the display background of the control regions for showing image;Determine the background color of the display background.It needs to mend Fill, background color can be the position that the image is shown in final application program, except interface color or tone.
Optionally, filling module is used to fill image to be shown to the first area, including:By the image to be shown Seamlessly transit processing;The image completion that will seamlessly transit that treated is to the first area.Using above-mentioned processing, can to scheme The boundary of picture is relatively sharp.
Optionally, which is seamlessly transitted processing by filling module, including:Read the picture to be shown Into bit map bitmap;Determine that the bitmap is Gdiplus objects, to seamlessly transit the mode setting Gdiplus objects.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong Following manner realization is crossed, but not limited to this:Above-mentioned module is respectively positioned in same processor;Alternatively, above-mentioned modules are with arbitrary The form of combination is located in different processors.
According to another embodiment of the present disclosure, a kind of terminal is additionally provided, which can be meter Any one computer terminal in calculation machine terminal group.Optionally, in the present embodiment, above computer terminal can also Replace with the terminal devices such as mobile terminal.
Optionally, in the present embodiment, above computer terminal can be located in multiple network equipments of computer network At least one network equipment.
In the present embodiment, above computer terminal can be with following steps in the method for the Image Rendering of executing application Program code:Determine the first area for showing image;Draw a second area for including the first area, wherein The second area and the first area geometric center having the same;It is arranged in the second area and removes the first area Except region in pixel display background color;Image to be shown is filled to the first area.
Optionally, Fig. 7 is a kind of structure diagram of terminal according to the ... of the embodiment of the present invention.As shown in fig. 7, the meter Calculation machine terminal A may include:One or more (one is only shown in figure) processor, memory and transmitting devices.It is optional Ground, above computer terminal can also include the input-output equipment for communication function.Those of ordinary skill in the art can be with Understand, structure shown in Fig. 7 is only to illustrate, and does not cause to limit to the structure of above computer terminal.For example, computer is whole End may also include than shown in Fig. 7 more either less components or with the configuration different from shown in Fig. 7.
Wherein, memory can be used for storing software program and module, such as the security breaches detection in the embodiment of the present invention Corresponding program instruction/the module of method and apparatus, processor are stored in software program and module in memory by operation, To perform various functions application and data processing, that is, the method for realizing above-mentioned Image Rendering.Memory may include high speed Random access memory, can also include nonvolatile memory, as one or more magnetic storage device, flash memory or other Non-volatile solid state memory.In some instances, memory can further comprise the storage remotely located relative to processor Device, these remote memories can pass through network connection to terminal A.The example of above-mentioned network includes but not limited to internet, enterprise Industry intranet, LAN, mobile radio communication and combinations thereof.
Transmitting device is used to receive via a network or transmission data.Above-mentioned network specific example may include calculating The wireless network that the communication providers of machine terminal provide.In an example, transmitting device includes a network adapter (Network Interface Controller, NIC), can be connected with other network equipments by base station so as to interconnection Net is communicated.In an example, transmitting device can be radio frequency (Radio Frequency, RF) module, be used to pass through Wireless mode is communicated with internet.
Processor can call the information and application program of memory storage by transmitting device, to execute following step: It determines for before showing the first area of image, determining the control regions for showing image;In the control regions really A fixed preset shape region is the first area.
Optionally, the program code of following steps can also be performed in above-mentioned processor:Determine the control for showing image Region, including:In the case where it is default resolution ratio to determine current display resolution, adjusts amplification according to preset ratio and show institute State control regions, wherein the default resolution ratio is more than predetermined threshold value.
Optionally, the program code of following steps can also be performed in above-mentioned processor:It is arranged except the first area Before the pixel display background color of the second area, the display background of the control regions for showing image is drawn;It determines The background color of the display background.
Optionally, the program code of following steps can also be performed in above-mentioned processor:Image to be shown is filled to described First area, including:The image to be shown is seamlessly transitted into processing;The image completion that will seamlessly transit that treated is to institute State first area.
Using the step of being executed in above-mentioned processor, determination will show the first area of the image, and it includes institute to draw one State the second area of first area, wherein the second area and first area geometric center having the same;By secondth area Pixel is shown as background color in region in domain in addition to the first area, fills image to be shown to the first area. Using above-mentioned technical proposal, solve the problems, such as the marginal existence sawtooth sense of the image of application program shearing in the related technology, Image to be displayed, the background color that the second area except first area is shown so that first area has are filled in first area Clear clearly boundary, there is no sawtooth senses at image to be displayed edge therein.
It will appreciated by the skilled person that structure shown in Fig. 7 is only to illustrate, terminal can also be intelligence It can mobile phone (such as Android phone, iOS mobile phones), tablet computer, applause computer and mobile internet device (Mobile Internet Devices, MID), the terminal devices such as PAD.Fig. 7 it does not cause to limit to the structure of above-mentioned electronic device.Example Such as, terminal A may also include more than shown in Fig. 7 or less component (such as network interface, display device), or Person has the configuration different from shown in Fig. 7.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can To be completed come command terminal device-dependent hardware by program, which can be stored in a computer readable storage medium In, storage medium may include:Flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc..
According to another embodiment of the present disclosure, a kind of storage medium is additionally provided.In the present embodiment, above-mentioned storage is situated between Matter can be used to save the program code performed by the method for the Image Rendering that above-described embodiment one is provided.
Optionally, in the present embodiment, above-mentioned storage medium can be located in computer network Computer terminal group In any one terminal, or in any one mobile terminal in mobile terminal group.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps:Really The fixed first area for showing image;Draw a second area for include the first area, wherein the second area with The first area geometric center having the same;It is arranged in the region in the second area in addition to the first area Pixel display background color;Image to be shown is filled to the first area.
It can be also used for the program code of storage following steps:It determines for before showing the first area of image, determining Control regions for showing image;Determine that a preset shape region is the first area in the control regions.
It can be also used for the program code of storage following steps:Determine the control regions for showing image, including:True It is to adjust amplification in the case of presetting resolution ratio according to preset ratio and show the control regions to determine current display resolution, In, the default resolution ratio is more than predetermined threshold value.
It can be also used for the program code of storage following steps:The second area except the first area is set Before pixel display background color, the display background of the control regions for showing image is drawn;Determine the display background Background color.
It can be also used for the program code of storage following steps:Image to be shown is filled to the first area, including: The image to be shown is seamlessly transitted into processing;The image completion that will seamlessly transit that treated is to the first area.
It can be also used for the program code of storage following steps:The image to be shown is seamlessly transitted into processing, institute The method of stating further includes:It reads in the picture to be shown to bit map bitmap;Determine that the bitmap is Gdiplus pairs As to seamlessly transit Gdiplus objects described in mode setting.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
According to another embodiment of the present disclosure, a kind of electronic device, including memory and processor are additionally provided, it is described Computer program is stored in memory, the processor is arranged to run the computer program to execute any of the above-described Step in embodiment of the method.The electronic device can be the terminal A described in Fig. 7.
The processor of the electronic device can be used for executing following steps:Determine the first area for showing image;It paints System one includes the second area of the first area, wherein the second area and the first area geometry having the same Center;Pixel display background color in region in the second area in addition to the first area is set;It fills and waits showing The image shown is to the first area
Processor can call the information and application program of memory storage by transmitting device, to execute following step: It determines for before showing the first area of image, determining the control regions for showing image;In the control regions really A fixed preset shape region is the first area.
Optionally, the program code of following steps can also be performed in above-mentioned processor:Determine the control for showing image Region, including:In the case where it is default resolution ratio to determine current display resolution, adjusts amplification according to preset ratio and show institute State control regions, wherein the default resolution ratio is more than predetermined threshold value.
Optionally, the program code of following steps can also be performed in above-mentioned processor:It is arranged except the first area Before the pixel display background color of the second area, the display background of the control regions for showing image is drawn;It determines The background color of the display background.
Optionally, the program code of following steps can also be performed in above-mentioned processor:Image to be shown is filled to described First area, including:The image to be shown is seamlessly transitted into processing;The image completion that will seamlessly transit that treated is to institute State first area.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
In the above embodiment of the present invention, all emphasizes particularly on different fields to the description of each embodiment, do not have in some embodiment The part of detailed description may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, for example, the unit division, only A kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, unit or module It connects, can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.And storage medium above-mentioned includes:USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can to store program code Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of method of Image Rendering, which is characterized in that including:
Determine the first area for showing image;
Draw a second area for including the first area, wherein the second area and the first area are with identical Geometric center;
Pixel display background color in region in the second area in addition to the first area is set;
Image to be shown is filled to the first area.
2. described according to the method described in claim 1, it is characterized in that, determine for before showing the first area of image Method further includes:
Determine the control regions for showing image;
Determine that a preset shape region is the first area in the control regions.
3. according to the method described in claim 2, it is characterized in that, determine control regions for showing image, including:
In the case where it is default resolution ratio to determine current display resolution, adjusts amplification according to preset ratio and show the control Region, wherein the default resolution ratio is more than predetermined threshold value.
4. according to the method described in claim 1, it is characterized in that, the second area that is arranged except the first area Before pixel display background color, the method further includes:
Draw the display background of the control regions for showing image;
Determine the background color of the display background.
5. according to the method described in claim 1, it is characterized in that, filling image to be shown to the first area, including:
The image to be shown is seamlessly transitted into processing;
The image completion that will seamlessly transit that treated is to the first area.
6. a kind of device of Image Rendering, which is characterized in that including:
Determining module, for determining the first area for showing image;
Drafting module, for drawing a second area for including the first area, wherein the second area and described first Region geometric center having the same;
Setup module, the pixel display background face for being arranged in the region in the second area in addition to the first area Color;
Module is filled, for filling image to be shown to the first area.
7. device according to claim 6, which is characterized in that it determines for before showing the first area of image, it is described Determining module is additionally operable to determine the control regions for showing image;
And for determining that a preset shape region is the first area in the control regions.
8. device according to claim 6, which is characterized in that the filling module is additionally operable to the image to be shown Processing is seamlessly transitted, the image completion that will seamlessly transit that treated to the first area.
9. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer Program is arranged to execute the method described in any one of claim 1 to 5 when operation.
10. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory Sequence, the processor are arranged to run the computer program to execute the side described in any one of claim 1 to 5 Method.
CN201810377844.6A 2018-04-25 2018-04-25 The method and device of Image Rendering Pending CN108597000A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810377844.6A CN108597000A (en) 2018-04-25 2018-04-25 The method and device of Image Rendering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810377844.6A CN108597000A (en) 2018-04-25 2018-04-25 The method and device of Image Rendering

Publications (1)

Publication Number Publication Date
CN108597000A true CN108597000A (en) 2018-09-28

Family

ID=63609175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810377844.6A Pending CN108597000A (en) 2018-04-25 2018-04-25 The method and device of Image Rendering

Country Status (1)

Country Link
CN (1) CN108597000A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109934886A (en) * 2019-03-07 2019-06-25 广州视源电子科技股份有限公司 Fill method, device and the interactive intelligence equipment of figure
CN112449167A (en) * 2020-11-13 2021-03-05 深圳市火乐科技发展有限公司 Image sawtooth elimination and image display method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110222735A1 (en) * 2010-03-10 2011-09-15 Nintendo Co., Ltd. Image processing program, image processing apparatus, image processing method and image processing system
CN102681775A (en) * 2012-04-13 2012-09-19 中兴通讯股份有限公司 Display area control method and system and mobile terminal
CN105430515A (en) * 2015-11-30 2016-03-23 天脉聚源(北京)科技有限公司 Method and device for displaying supporter head portraits
CN107154063A (en) * 2017-04-19 2017-09-12 腾讯科技(深圳)有限公司 The shape method to set up and device in image shows region

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110222735A1 (en) * 2010-03-10 2011-09-15 Nintendo Co., Ltd. Image processing program, image processing apparatus, image processing method and image processing system
CN102681775A (en) * 2012-04-13 2012-09-19 中兴通讯股份有限公司 Display area control method and system and mobile terminal
CN105430515A (en) * 2015-11-30 2016-03-23 天脉聚源(北京)科技有限公司 Method and device for displaying supporter head portraits
CN107154063A (en) * 2017-04-19 2017-09-12 腾讯科技(深圳)有限公司 The shape method to set up and device in image shows region

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
武安状: "《基于VS2012平台C#语言测量软件开发技术》", 31 August 2015, 黄河水利出版社 *
王平华: "《VB.NET程序涉及项目教程》", 31 October 2008, 北京邮电大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109934886A (en) * 2019-03-07 2019-06-25 广州视源电子科技股份有限公司 Fill method, device and the interactive intelligence equipment of figure
CN112449167A (en) * 2020-11-13 2021-03-05 深圳市火乐科技发展有限公司 Image sawtooth elimination and image display method and device

Similar Documents

Publication Publication Date Title
AU2018211356B2 (en) Image completion with improved deep neural networks
US11847738B2 (en) Voxelization of mesh representations
US11687220B2 (en) Interactive image recoloring
US8614708B2 (en) System and method for scalable rendering of diffusion curves
US20110305397A1 (en) Systems and methods for retargeting an image utilizing a saliency map
CN109472839B (en) Image generation method and device, computer equipment and computer storage medium
CN105005426A (en) Screenshot method and system for touch screen terminal, and data sharing method and system for touch screen terminal
CN108932745B (en) Image drawing method and device, terminal equipment and computer readable storage medium
CN104866755B (en) Setting method and device for background picture of application program unlocking interface and electronic equipment
US20170329502A1 (en) Method and device for processing image
US11314400B2 (en) Unified digital content selection system for vector and raster graphics
CN108597000A (en) The method and device of Image Rendering
US10846889B2 (en) Color handle generation for digital image color gradients using machine learning
CN108537722A (en) Image processing method, image processing apparatus, electronic device, and medium
CN105787874A (en) Method and device used for mosaic processing of captured image
US20160284072A1 (en) System for photo customizable caricature generation for custom products
CN105051788B (en) Graphics process is carried out using multiple pels
US10481774B2 (en) Area-dependent image enhancement
US11017505B2 (en) System and method for applying antialiasing to images
US10235786B2 (en) Context aware clipping mask
Gao et al. PencilArt: a chromatic penciling style generation framework
US11200708B1 (en) Real-time color vector preview generation
CN115330918A (en) Three-dimensional scene rendering method and device
JP5956875B2 (en) Image processing apparatus and image processing method
US6356267B1 (en) Method of creating two dimensional shapes drawing system

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

Application publication date: 20180928

RJ01 Rejection of invention patent application after publication