CN107066430A - Image processing method, device, service end and client - Google Patents

Image processing method, device, service end and client Download PDF

Info

Publication number
CN107066430A
CN107066430A CN201710266917.XA CN201710266917A CN107066430A CN 107066430 A CN107066430 A CN 107066430A CN 201710266917 A CN201710266917 A CN 201710266917A CN 107066430 A CN107066430 A CN 107066430A
Authority
CN
China
Prior art keywords
file
picture
code
code file
picture file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710266917.XA
Other languages
Chinese (zh)
Other versions
CN107066430B (en
Inventor
陈锦庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lingxi Interactive Entertainment Co ltd
Original Assignee
Guangzhou I9Game Information Technology 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 Guangzhou I9Game Information Technology Co Ltd filed Critical Guangzhou I9Game Information Technology Co Ltd
Priority to CN201710266917.XA priority Critical patent/CN107066430B/en
Publication of CN107066430A publication Critical patent/CN107066430A/en
Application granted granted Critical
Publication of CN107066430B publication Critical patent/CN107066430B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The present invention relates to field of computer technology there is provided a kind of image processing method, device, service end and client, service end obtains the first picture file of client, and the first picture file is converted to renders code file;Client is downloaded from service end and renders code file, and responds the operation of user, and operation renders code file, and color applying drawing is carried out to obtain second picture file to rendering code file.Compared with existing grid map, the size of committed memory can effectively be reduced, picture amplification simultaneously is undistorted, compared with existing traversal XML mode of the tree construction to parse SVG picture file information, have the advantages that loading velocity is fast, can locally change and render order, support that nine figures, complicated picture rendering efficiency are high.

Description

Image processing method, device, service end and client
Technical field
The present invention relates to field of computer technology, in particular to a kind of image processing method, device, service end and Client.
Background technology
Current mobile phone applies continuing to develop with own service, and content is enriched constantly, the local picture resource used It can be continuously increased, ultimately result in installation kit size and become big, EMS memory occupation increase, page loading velocity is slack-off, some figures increased income Although piece optimizes the memory management of picture, but some local pictures are not optimized substantially, and Android's is local Picture is also contemplated that multiresolution adaptation, shows most high definition if it is desired to being reached on the type of various resolution ratio with minimum internal memory The picture of clear degree, then be accomplished by the picture of many parts of resolution ratio, can so cause the redundancy of resource, and SVG (Scalable Vector Graphics, scalable vector graphicses) polar plot can just solve these problems.
But current shortcomings of the Android using SVG polar plots is mainly loading velocity slowly, and complicated picture rendering efficiency is low, Reason is to need operationally to read and parse SVG picture files, and SVG file is a kind of readable XML (Extensible Markup Language, extensible markup language) file, need to travel through xml tree construction during parsing to parse corresponding letter Breath, and it also requires distributing corresponding internal memory to cache these information, this process is slower several times than the parsing of grid map, separately There is this special grid map of nine figures on external Android, and SVG agreements do not have nine figures this concepts in itself.
The content of the invention
It is above-mentioned to improve it is an object of the invention to provide a kind of image processing method, device, service end and client Problem.
To achieve these goals, the technical scheme that the embodiment of the present invention is used is as follows:
In a first aspect, the embodiments of the invention provide a kind of image processing method, applied to the service with client communication End, methods described includes:The first picture file of client is obtained, wherein, the first picture file is the figure based on markup language Piece file;First picture file is converted to and renders code file, to render code file when client is run to wash with watercolours Contaminate code file and carry out color applying drawing to obtain second picture file, be made up of wherein rendering code file non-markup languages.
Second aspect, the embodiments of the invention provide a kind of image processing method, applied to the client communicated with service end End, methods described includes:Downloaded from service end and render code file, wherein, render code file and turned by the first picture file Change, wherein, the first picture file is the picture file based on markup language, renders code file by non-markup languages structure Into;User's operation is responded, operation renders code file, it is literary to obtain second picture to rendering code file progress color applying drawing Part.
The third aspect, the embodiments of the invention provide a kind of picture processing device, applied to the service with client communication End, described device includes:Picture acquisition module, the first picture file for obtaining client, wherein, the first picture file is Picture file based on markup language;File modular converter, code file is rendered for the first picture file to be converted to, with Render code file and carry out color applying drawing to rendering code file to obtain second picture file when client is run, wherein Code file is rendered to be made up of non-markup languages.
Fourth aspect, the embodiments of the invention provide a kind of picture processing device, applied to the client communicated with service end End, described device includes:File download module, code file is rendered for being downloaded from service end, wherein, render code file and lead to The first picture file is crossed to convert, wherein, the first picture file is the picture file based on markup language, renders code file It is made up of non-markup languages;Picture rendering module, for responding user's operation, operation renders code file, to rendering code text Part carries out color applying drawing to obtain second picture file.
5th aspect, the embodiments of the invention provide a kind of service end, the service end includes first memory, at first Device and picture processing device are managed, the picture processing device is installed in the first memory and including one or more The software function module performed by the first processor, it includes:Picture acquisition module, the first figure for obtaining client Piece file, wherein, the first picture file is the picture file based on markup language;File modular converter, for by the first picture File, which is converted to, renders code file, to be rendered when client is run to rendering code file rendering code file Draw to obtain second picture file, be made up of wherein rendering code file non-markup languages.
6th aspect, the embodiments of the invention provide a kind of client, the client includes second memory, at second Device and picture processing device are managed, the picture processing device is installed in the second memory and including one or more The software function module performed by the second processor, it includes:File download module, generation is rendered for being downloaded from service end Code file, wherein, render code file and converted by the first picture file, wherein, the first picture file is based on mark The picture file of language, renders code file and is made up of non-markup languages;Picture rendering module, for responding user's operation, fortune Row renders code file, and color applying drawing is carried out to obtain second picture file to rendering code file.
Compared with the prior art, the invention has the advantages that:A kind of image processing method, dress that the present invention is provided Put, service end and client, service end is by the way that the first picture file based on markup language is converted to by non-markup languages structure Into render document code, then document code will be rendered be packed into application program installation kit, service end, which is downloaded, installs program peace After dress bag, application program is run, so as to carry out color applying drawing to rendering document code, second picture file is obtained, it is and existing Application program in grid map compare, can effectively reduce take client's end memory size, the tree with existing traversal XML Structure is compared to parse the mode of SVG picture file information, has the advantages that fast, the complicated picture rendering efficiency of loading velocity is high.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate Appended accompanying drawing, is described in detail below.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be attached to what is used required in embodiment Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore is not construed as pair The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 shows the schematic diagram that service end provided in an embodiment of the present invention is interacted with client.
Fig. 2 shows the block diagram of service end provided in an embodiment of the present invention.
Fig. 3 shows the block diagram of client provided in an embodiment of the present invention.
Fig. 4 show it is provided in an embodiment of the present invention applied to the service end and client that communicate to connect each other when scheme The flow chart of piece processing method.
Fig. 5 is the sub-step flow chart of the step S102 shown in Fig. 4.
Fig. 6 is the sub-step flow chart of the sub-step S1021 shown in Fig. 5.
Fig. 7 is the sub-step flow chart of the step S104 shown in Fig. 4.
Fig. 8 is the sub-step flow chart of the sub-step S1043 shown in Fig. 7.
Fig. 9 is the sub-step flow chart of the sub-step S1045 shown in Fig. 7.
Figure 10 is the sub-step flow chart of the sub-step S10452 shown in Fig. 9.
Figure 11 shows the block diagram of the first picture processing device provided in an embodiment of the present invention.
Figure 12 be Figure 11 shown in the first picture processing device in file modular converter block diagram.
Figure 13 be Figure 12 shown in file modular converter in file conversion unit block diagram.
Figure 14 shows the block diagram of second picture processing unit provided in an embodiment of the present invention.
Figure 15 be Figure 14 shown in second picture processing unit in picture rendering module block diagram.
Figure 16 be Figure 15 shown in picture rendering module in change unit block diagram.
Figure 17 be Figure 15 shown in picture rendering module in picture rendering unit block diagram.
Figure 18 be Figure 17 shown in picture rendering unit in the 7th sub- execution unit block diagram.
Icon:100- service ends;110- the first picture processing devices;120- first memories;130- first processors; The communication units of 140- first;111- picture acquisition modules;112- file modular converters;1121- file conversion unit;1122- generations Code generation unit;1123- primitive attribute acquiring units;1124- computing units;1125- file storage units;1126- is deposited address Storage unit;The sub- execution units of 11211- first;The sub- execution units of 11212- second;The sub- execution units of 11213- the 3rd;200- visitors Family end;210- second picture processing units;211- file download modules;212- picture rendering modules;The loading of 2121- addresses is single Member;2122- Code obtaining units;2123- changes unit;2124- area determination units;2125- picture rendering units;21231- 4th sub- execution unit;The sub- execution units of 21232- the 5th;The sub- execution units of 21251- the 6th;Of 21252- the 7th perform list Member;The sub- execution units of 21253- the 8th;212521- coordinate calculating units;212522- draw units;212523- coordinates determine single Member;220- second memories;230- storage controls;240- second processors;250- Peripheral Interfaces;The communication units of 260- second Member;270- radio frequency units;280- display screens;300- networks;400- application programs.
Embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Ground is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Generally exist The component of the embodiment of the present invention described and illustrated in accompanying drawing can be arranged and designed with a variety of configurations herein.Cause This, the detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit claimed invention below Scope, but it is merely representative of the selected embodiment of the present invention.Based on embodiments of the invention, those skilled in the art are not doing The every other embodiment obtained on the premise of going out creative work, belongs to the scope of protection of the invention.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi It is defined in individual accompanying drawing, then it further need not be defined and explained in subsequent accompanying drawing.Meanwhile, the present invention's In description, term " first ", " second " etc. are only used for distinguishing description, and it is not intended that indicating or implying relative importance.
Fig. 1 is refer to, Fig. 1 is that the service end 100 that present pre-ferred embodiments are provided communicates with least one client 200 Interaction schematic diagram.Service end 100 can be communicated by network 300 with client 200, to realize service end 100 and client Data communication or interaction between end 200.Service end 100 can provide the application journey that at least one is applied to various operating systems The installation kit of sequence 400 is downloaded for client 200.Client 200 is accessed after service end 100 by network 300, can pass through network 300 download the installation kit of the application program 400 of the operating system suitable for the client 200 from service end 100, will apply journey Sequence 400 is installed in client 200.
In the embodiment of the present invention, service end 100 is web (website) server.Client 200 may be, but not limited to, intelligence Can mobile phone, PC (personal computer, PC), tablet personal computer, personal digital assistant (personal digital Assistant, PDA), mobile internet surfing equipment (mobile Internet device, MID) etc..The operating system of client 200 It may be, but not limited to, Android (Android) system, IOS (iPhone operating system) system, Windows Phone systems, Windows systems etc..Application program 400 can be that any of the offer of service end 100 is available for client 200 certainly The application program that definition is downloaded and installed, it is preferable that in the present embodiment, application program 400 can be various various comprising picture Application program.
Fig. 2 is refer to, Fig. 2 shows the block diagram of service end 100 provided in an embodiment of the present invention.Service end 100 Including the first picture processing device 110, first memory 120, the communication unit 140 of first processor 130 and first.
First memory 120, first processor 130 and first communication unit, 140 each elements are direct or indirect each other Ground is electrically connected with, to realize the transmission or interaction of data.For example, these elements each other can be total by one or more communication Line or signal wire, which are realized, to be electrically connected with.First picture processing device 110 can be with software or firmware including at least one (firmware) form is stored in first memory 120 or is solidificated in the operating system of the service end 100 Software function module in (operating system, OS).First processor 130 is used to perform to deposit in first memory 120 The executable module of storage, such as software function module and computer program included by the first picture processing device 110.
Wherein, first memory 120 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only storage (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..Wherein, first memory 120 is used for storage program, and first processor 130 is receiving execute instruction Afterwards, described program is performed.First communication unit 140 is used to set up between service end 100 and client 200 by network 300 Communication connection, and for passing through the transceiving data of network 300.
Fig. 3 is refer to, Fig. 3 shows the block diagram of client 200 provided in an embodiment of the present invention.The client 200 include second picture processing unit 210, second memory 220, storage control 230, second processor 240, Peripheral Interface 250th, the second communication unit 260, radio frequency unit 270 and display screen 280.
Second memory 220, storage control 230, second processor 240, Peripheral Interface 250, the second communication unit 260th, radio frequency unit 270 and each element of display screen 280 are directly or indirectly electrically connected with each other, to realize the transmission of data Or interaction.It is electrically connected with for example, these elements can be realized by one or more communication bus or signal wire each other.Second Picture processing device 210, which includes at least one, to be stored in second memory 220 in the form of software or firmware (firmware) In or the software function module that is solidificated in the operating system of client 200 (operating system, OS).Second memory Application program 400 that client 200 downloads and install from service end 100 that 220 are stored with.Second processor 240 is used to perform The executable module stored in second memory 220, for example the software function module included by second picture processing unit 210 or Computer program.
Wherein, second memory 220 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only storage (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..Wherein, second memory 220 is used for storage program, and second processor 240 is receiving execute instruction Afterwards, described program is performed, second processor 240 and other access of possible component to second memory 220 can be in storages Carried out under the control of controller 230.
Second processor 240 can be a kind of IC chip, with signal handling capacity.Above-mentioned second processor 240 can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP), speech processor and video processor etc.;Can also be digital signal processor, it is special It is integrated circuit, field programmable gate array or other PLDs, discrete gate or transistor logic, discrete Nextport hardware component NextPort.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General procedure Device can be microprocessor or the second processor 240 can also be any conventional processor etc..
Peripheral Interface 250 is used to various input/output devices being coupled to second processor 240 and second memory 220.In certain embodiments, Peripheral Interface 250, second processor 240 and storage control 230 can be in one single chips Realize.In some other example, they can be realized by independent chip respectively.
Radio frequency unit 270 is used to receiving and sending radio wave signal (such as electromagnetic wave), realizes radio wave and telecommunications Number mutual conversion, so as to realize the radio communication between client 200 and network 300 or other communication equipments.
Second communication unit 260, which is used to set up by network 300 and service end 100, to be connected, thus realize service end 100 and Communication connection between client 200.For example, the radio frequency letter that second communication unit 260 can be sent using radio frequency unit 270 Network 300 number is connected to, and then passes through network 300 and is set up with service end 100 and communicate to connect.
Display screen 280 is used for the second picture file after the second picture processing unit 210 through client 200 is handled and entered Row display.
First embodiment
Fig. 4 is refer to, Fig. 4 shows provided in an embodiment of the present invention applied to the service end communicated to connect each other 100 and during client 200 image processing method flow chart.Image processing method comprises the following steps:
Step S101, obtains the first picture file of client, wherein, the first picture file is the figure based on markup language Piece file.
In embodiments of the present invention, the first picture file can be pre-stored within the application program for being installed on client 200 It is the picture file of itself of application program 400 under 400 raw catalogues, that is, interface loads institute during the operation of application program 400 The picture needed, service end 100 directly can obtain the first picture file under raw catalogues, the first picture text by network 300 Part may be, but not limited to, based on the mark such as XML, HTML (Hyper Text Marked Language, HTML) Remember the picture of language,
In embodiments of the present invention, the first picture file may be, but not limited to, the application programs such as UC browsers, wechat The picture resource used is needed in 400 runnings, such as can be " it is determined that ", control " completion " or be message box, add The icon of plusing good friend etc..As a kind of embodiment, the first picture file can be the picture file of SVG forms, SVG forms Picture file is to be based on XML language, a kind of graphical format for describing two-dimension vector graphics.
Step S102, the first picture file is converted to and renders code file, to render code file in client quilt Color applying drawing is carried out to obtain second picture file to rendering code file during operation, wherein rendering code file by non-marked language Speech is constituted.
In embodiments of the present invention, can be by that will mark in order to solve the problem of picture file of SVG forms loads slow Language conversion is the mode of non-markup languages, and the first picture file is converted to and renders document code, for example, can be by SVG lattice The picture file of formula is converted to the code file being made up of non-markup languages such as Java, C, C++, as a kind of embodiment, reads After the picture file for getting SVG forms under raw catalogues, the primary SVG resolvers of Android or the SVG increased income are utilized Resolver, Java code is converted into by xml code, the picture file of SVG forms is converted to render code file after, be bundled to In application code, application code may be, but not limited to, the installation kit of the application programs such as UC browsers, wechat 400.
Fig. 5 is refer to, the first picture file is the picture file of SVG forms, and step S102 also includes following sub-step:
Sub-step S1021, is changed to the picture file of SVG forms, generates feature code.
In embodiments of the present invention, picture file can be changed by way of code language is changed, such as SVG The picture file of form is a kind of xml code, xml code first can be converted into abstract syntax tree, then abstract syntax tree is turned It is changed to the code of Java forms.
, can be by the figure of SVG forms in order to reduce resource and the time spent by code conversion as a kind of embodiment The characteristic that piece file is different from the picture file of other SVG forms changes generated Java code, wherein, other SVG The picture file of form refers to the picture file of the converted SVG forms before the first picture file is changed, it possess with First picture file identical code, then the code of same section change the first picture file when do not need reconvert, only will Different part conversions, then by the part of conversion complete feature corresponding with the picture file of Code synthesis first of same section Code.
In embodiments of the present invention, feature code may be, but not limited to, the picture file of a SVG form different from it The characteristic of the picture file of its SVG form changes generated Java code.
Fig. 6 is refer to, sub-step S1021 also includes following sub-step:
Sub-step S10211, when the picture file of SVG forms is to that should have nine icons to clock, nine figures are resolved to by nine icons note Attribute information.
In embodiments of the present invention, nine icons note can be customized, for example, can be marked on the picture of SVG forms Go out a rectangle frame, then this rectangle frame is exactly nine icons note, and it is exactly nine figure content areas that rectangle frame is interior, nine icons note is resolved to Nine figure attribute informations can be the coordinate value for reading the pixel on picture file where four angles of rectangle frame, the figure attribute of file nine Nine figure content areas in the message reflection picture file of SVG forms, definition nine figure attribute informations are ninePatch, if NinePatch=(l40,48t56,57r10,78b0,92), picture size is 92 × 88, then l40, and 48 be left black surround information, table It is the 40th to the 48th pixel to show vertical direction stretch zones;T56,57 be upper black surround information, represents horizontal direction drawing zone Domain is the 56th to the 57th pixel;R10,78 be right black surround information, and it is the 10th to the 78th to represent vertical direction content area Pixel, the 0th to the 10th pixel and the 78th to the 88th pixel are back gauges, do not show content;B0,92 be that lower black surround is believed Breath, it is the 0th to the 92nd pixel to represent horizontal direction content area.
Sub-step S10212, first code file is converted to by the picture file of SVG forms.
In embodiments of the present invention, first code file may be, but not limited to, the figure for the SVG forms remembered with nine icons In piece file, other image contents in addition to nine figure content areas are changed, the Java code generated, that is, Say, other Picture sections in the picture file of SVG forms in addition to nine icons are remembered can be changed generated Java Code.
Sub-step S10213, nine figure attribute informations is added in first code file, to obtain feature code.
In embodiments of the present invention, the left side in nine figure attribute informations/upper black surround information is parsed and needed when generating stretching The logical code of calculating, right/lower black surround is parsed and corresponding content back gauge code is generated, and by the logical code and content side It is added to away from code in first code file, you can obtain feature code.
Sub-step S1022, obtains the same type primitive attribute of the picture file of SVG forms.
In embodiments of the present invention, the same type primitive attribute of picture file can be obtained according to XML tree construction, together Type primitive attribute may be, but not limited to, the color attribute of pel, the shape attribute of pel, gradient attributes of pel etc..
Sub-step S1023, calculates the property value of same type primitive attribute, and property value constitutes attribute array, and by attribute number Group is added in feature code.
In embodiments of the present invention, the property value of same type primitive attribute may be, but not limited to, pel color attribute, The color of the value of the shape attribute of pel etc., such as some pel is red, then the rgb value of its property value namely red is (1,0,0), for shape of pel etc., then needs to read the coordinate value of the pixel of pel profile.
Sub-step S1024, feature code set is used the SVG Code Templates pre-set, and generation renders code file, its In, render code file and be made up of Java code.
As a kind of embodiment, because the document code that renders of conversion is most a java class, a portion at last Content is public, in order to improve the efficiency of code conversion, can pre-define SVG Code Templates, and SVG Code Templates can be with It is, but is not limited to multiple common code parts for rendering code file, the part end to end of such as java class, generation renders code During file, it is only necessary to the feature code of the picture file of SVG forms is write into SVG Code Templates, you can obtain final output Java code.SVG Code Templates include common templates and nine artwork plates, and common templates are used to export the SVG for not having nine icons to remember The picture file of form renders document code, and nine artwork plates are used for the picture file for exporting the SVG forms for having nine icons to remember Render document code.
In embodiments of the present invention, the picture file of SVG forms is multiple, and the picture file of multiple SVG forms is given birth to respectively Code file is rendered into multiple correspondingly.
Sub-step S1025, multiple code files that render are stored in preassigned Resource TOC.
In embodiments of the present invention, render code file by each first and be each packaged, then will be many after encapsulation The individual code file that renders is stored in preassigned Resource TOC, then the Resource TOC is bundled to the installation of application program 400 Bao Zhong, while each render code file by encapsulation, therefore be able to can so be obscured, Resource TOC with reduced code The Resource TOC that application program 400 is specified is referred to, for example, the Resource TOC that UC browsers are specified, only can be bundled to UC and browse In the installation kit of device.
It should be noted that the picture file of SVG forms is converted to and renders after code file that size is still very small, do Code simplifies even also smaller than the picture file of SVG form, therefore can reduce the size of installation kit, is replaced in actual items The picture files of 134 SVG forms, picture resource size reduces about 75%.
In embodiments of the present invention, except multiple code files that render are stored in preassigned Resource TOC, also need To draw and render the rendering objects of code file and cache into rendering objects pond, rendering objects may be, but not limited to, matrix, Rectangle, paintbrush, path etc., corresponding rendering objects pond may be, but not limited to, matrix object pond, rectangular object pond, paintbrush pair As pond, path objects pond etc., rendering objects and rendering objects pond are corresponded, due to each drafting needs for rendering code file Several matrix objects, rectangular object, paintbrush object, path objects etc., and every kind of rendering objects usage quantity with rendering The content of code file is relevant, if allowing each code file that renders to hold corresponding rendering objects, so has certain interior Deposit expense and frequently create the performance loss of rendering objects, in order to be multiplexed internal memory as far as possible, set up rendering objects cache pool machine System, instantiates a number of rendering objects and is put into cache pool in advance, when execution renders the drafting of code file, wherein using Rendering objects be taken from rendering objects pond, only when rendering, code file is more complicated and rendering objects that need to use exceed Ability dynamic creation corresponding rendering objects during rendering objects pond.
It should be noted that in embodiments of the present invention, due to being provided with rendering objects caching mechanism, being available for all render Code file be multiplexed, so be converted to render the EMS memory occupation after code file than dynamic analysis SVG polar plots also it is few very It is many, for example, the internal memory of a SVG polar plot about 0.8k, and the internal memory of a grid map is directly proportional to picture size, icon ranks General ten to tens k, big figure rank even hundreds of k.
Sub-step S1026, obtains multiple corresponding storage address for rendering code file in Resource TOC, and this is more The individual corresponding storage address of code file that renders is added in the address mapping table pre-set.
As a kind of embodiment, some is rendered into code file and is stored in after Resource TOC, Resource TOC can generate one Individual this renders the storage address of code file, and the storage address is read out, and is stored in the address mapping table pre-set.
Step S103, downloads from service end and renders code file, wherein, render code file and turned by the first picture file Change, the first picture file is the picture file based on markup language, renders code file and is made up of non-markup languages.
In embodiments of the present invention, when some client 200 need install application program 400, or be installed on some visitor When the application program 400 at family end 200 needs to update, the client 200 contains from the download package of service end 100 renders code file The installation kit of application program 400, and installed.
Step S104, response user operation, operation render code file, to render code file carry out color applying drawing with To second picture file.
In embodiments of the present invention, the mode of response user operation may be, but not limited to, is installed on visitor when user clicks on During the icon of the application program 400 at family end 200 so that when including the application code operation for rendering code file, then transport Row renders code file, carries out color applying drawing to rendering code file to obtain second picture file, user's operation can answered Run with program 400 so that produced when needing to use the interface of SVG pictures to load, be used as a kind of embodiment, second picture text Part can be the picture shown on the display screen 280 of client 200.
Fig. 7 is refer to, sub-step S104 also includes following sub-step:
Sub-step S1041, it is corresponding that response user operates any one obtained in address mapping table to render code file Storage address.
In embodiments of the present invention, user can be worked as and click on some installation application program 400 so that the application program 400 Application code operation when, obtain address mapping table in any one render the corresponding storage address of code file.
It should be noted that in embodiments of the present invention, code text is rendered due to the picture file of SVG forms being converted to Part so that can directly draw second picture file without any I/O operation during loading, and grid map needs to be IO behaviour during operation Make reading resource, if nine figures also need to parse nine figure information, so the image processing method loading velocity that the present invention is provided It is faster than grid map a lot, in actual items, gradation data statistics shows that loading velocity compares grid first for second picture file Figure is fast more than 8 times, non-first because grid map and second picture file have caching, remains basically stable.
Sub-step S1042, according to any one render the corresponding storage address of code file obtained in Resource TOC with The storage address is corresponding to render code file.
Sub-step S1043, when render code file need modification primitive attribute when, perform attribute modification operation.
In embodiments of the present invention, if same icon has been multiplexed repeatedly, need to change primitive attribute, when modification wash with watercolours When contaminating the primitive attribute in code file, adjacent and property value identical pel is gathered together, " layer " is defined as, and increase Plus figure layer modification interface, if, it is necessary to batch modification is adjacent and during property value identical primitive attribute in actual use scene, The color attribute that interface can rapidly change each pel in " layer " is changed by figure layer, so as to simplify the primitive attribute of this scene Modification, realizes the primitive attribute for quickly changing multiple pels.
It should be noted that the modification of property value, which may be, but not limited to, is rendering modification before the code file seat of honour is rendered, Or changed in the random time section in render process, as long as refreshing view after can ensure that modification property value, in addition, by When being converted into rendering code file storage by the picture file of SVG forms and arriving Resource TOC, it can use and of the same name render generation Code file, during the primitive attribute rendered in code file in order to avoid modification one, has influence on and other of the same name renders code text Part, when carrying out attribute modification operation, it is necessary to first copy portion and render the corresponding object picture of code file and carry out attribute again and repair Change.Further, since primitive attribute can be changed, if the picture file of multiple similar SVG forms be pel color or When special efficacy is different, it is possible to be multiplexed same picture, only different primitive attributes need to be changed.
Fig. 8 is refer to, sub-step S1043 also includes following sub-step:
Sub-step S10431, response user's operation, operation renders code file, obtains attribute array.
In embodiments of the present invention, attribute array may be, but not limited to, background pel or non-background pel member color, The property value of shape etc., the array constituted.
Sub-step S10432, modifies to the property value of the same type primitive attribute in attribute array.
In embodiments of the present invention, after the property value of modification primitive attribute, then its primitive attribute accordingly changes, for example, will The rgb value of some pel is revised as (1,1,0) from (1,0,0), then the color of the pel will be changed into yellow from red accordingly. In addition, when the property value of multiple adjacent same type primitive attributes in attribute array is identical, setting the plurality of same type figure Meta-attribute is pel set, and batch of multiple same type primitive attribute property values is realized by changing the property value of the pel set Amount modification.The background pel of such as some picture is yellow, there is 3 adjacent pels in non-background pel, respectively pel 1, Pel 2 and pel 3, and the color of pel 1, pel 2 and pel 3 is red, then can make pel 1, pel 2 and pel 3 For a figure layer, when the color of pel 1, pel 2 and pel 3 is required to be revised as blueness, only interface need to be changed by figure layer Property value is revised as (0,0,1) from (1,0,0), just may be such that the color of pel 1, pel 2 and pel 3 becomes au bleu.
Sub-step S1044, when rendering code file including nine figure attribute informations, determines to treat wash with watercolours according to nine figure attribute informations Nine figure content areas in the second picture file of dye.
In embodiments of the present invention, nine figure content areas may be, but not limited to, by vertical direction stretch zones l back gauge Value and horizontal direction stretch zones t back gauge value determined by stretch zones, and vertical direction content back gauge r back gauge value and Content area determined by horizontal direction content back gauge b back gauge value.
Sub-step S1045, operation renders code file, and second picture text is obtained to rendering code file progress color applying drawing Part.
Fig. 9 is refer to, sub-step S1045 also includes following sub-step:
Sub-step S10451, obtains zoom factor.
In embodiments of the present invention, zoom factor is set according to the resolution ratio of client 200, can be by replicating Display codes under android system view catalogues obtain the resolution ratio of client 200, the setting standard of zoom factor When being so that second picture file is shown in client 200, amplify undistorted.
Sub-step S10452, according to zoom factor, determines the apex coordinate of second picture file to be rendered.
In embodiments of the present invention, the apex coordinate of second picture file to be rendered may be, but not limited to, scaling system The product of number and the former apex coordinate of second picture file, in other words, reads render second picture text in code file first The apex coordinate of part, the apex coordinate that zoom factor is exactly second picture file to be rendered is multiplied by with the apex coordinate, now Apex coordinate be scaled later apex coordinate.
Figure 10 is refer to, sub-step S10452 also includes following sub-step:
Sub-step S104521, when second picture file to be rendered includes nine figure content areas, calculates nine figure contents The coordinate of representative points of the region after nine figure stretched operations.
In embodiments of the present invention, representative points of the nine figure content areas after nine figure stretched operations for (PathX, PathY), and
PathX=OrgPathX+ (DawableW-OrgW) * LeftTopBWS/TopBWS;
PathY=OrgPathY+ (DawableH-OrgH) * TopLeftBWS/LeftBWS;
Wherein, the apex coordinate of nine figure content areas when OrgPathX/Y is non-stretched, DrawableW/H is client The width of control on 200, it is the dynamic access when client 200 is run, when OrgW/H is non-stretched in nine figures Hold peak width/height, the total proportion of black surround on nine figure content areas when TopBWS is non-stretched, nine when LeftBWS is non-stretched The total proportion of the left black surround of figure content area, the total proportion of black surround on nine figure content areas of summit left when LeftTopBW is non-stretched, The total proportion of the left black surround of nine figure content areas when TopLeftBWS is non-stretched above summit.
By above-mentioned computing, the coordinate of representative points of the nine figure content areas after nine figure stretched operations just can be calculated, The coordinate of usual representative points will not fall in upper/left black surround, and feelings in upper/left black surround are fallen if there is the coordinate of representative points Condition, then also need to carry out following amendment:
PathXTopBL=OrgPathX-CurTopBLeftX;
PathYLeftBL=OrgPathY-CurLeftBTopY;
FixPathX=PathX+ (DawableW-OrgW) * (CurTopBW/TopBWS) * (PathXTopBL/ CurTopBL);
FixPathY=PathY+ (DawableH-OrgH) * (CurLeftBW/LeftBWS) * (PathYLeftBL/ CurLeftBL);
Wherein, FixPathX/Y is the coordinate modification end value of representative points, nine figure contents when CurTopBL is non-stretched Black surround length on region, nine figure content areas left black surround length when CurLeftBL is non-stretched, CurTopBLeftX is non-stretched Black surround left end point x coordinate on Shi Jiutu content areas, nine figure content areas left black surround upper end when CurLeftBTopY is non-stretched Point y-coordinate, PathXTopBL is length of the representative points x coordinate on upper black surround, and PathYLeftBL is representative points y-coordinate Length on left black surround, CurTopBW black surround proportions on nine figures where representative points x, CurLeftBW is target Path The left black surround proportion of nine figures where the y of summit, Path is figure path.
Sub-step S104522, is stretched according to the second picture file that the coordinate pair of representative points is to be rendered.
In embodiments of the present invention, representative points are the pixel coordinate points after nine figure stretched operations, render second picture text Part also needs to calculate the screen apex coordinate corresponding to the representative points, and screen summit is multiplying for representative points and picture element density coefficient Product, picture element density coefficient is relevant with the resolution ratio of client 200.
Sub-step S104523, according to zoom factor, it is determined that the second picture file to be rendered after nine figure stretched operations Graphics vertex coordinate.
Sub-step S10453, based on apex coordinate, operation renders code file and obtains second picture file.
In embodiments of the present invention, according to the apex coordinate after scaling, to render code file carry out color applying drawing with To second picture file, due to being that first scaling summit is drawn again, therefore second picture file can be undistorted after amplification.
The image processing method that first embodiment of the invention is provided, first, the picture file of multiple SVG forms is turned respectively Be changed to it is multiple it is one-to-one render code file, and render code file by each and be each packaged, realize code essence Letter, can effectively reduce the size of committed memory;Second, during conversion renders code file, introduce SVG code moulds Plate, the common code part for rendering code file is repeatedly multiplexed, the speed for turning code is improved;3rd, there is provided wash with watercolours Target cache mechanism is contaminated, will be drawn and rendered the rendering objects of code file and cache into rendering objects pond, is available for all rendering generation Code file multiplexing, improves rendering efficiency;4th, the property value for calculating same type primitive attribute constitutes attribute array, can when rendering Primitive attribute is changed with dynamic, height multiplexing picture resource strengthens the flexibility of picture, while solving the problems, such as resource redundancy; 5th, drawn again by first scaling apex coordinate picture picture render mode solve second picture file amplification it is undistorted The problem of, and remembered by self-defined nine icon of picture file to SVG forms and realize its parsing to solve branch of the SVG to nine figures Hold;It is fast, complicated with loading velocity compared with existing traversal XML mode of the tree construction to parse SVG picture file information The high advantage of picture rendering efficiency.
Second embodiment
Figure 11 is refer to, Figure 11 shows the square frame signal of the first picture processing device 110 provided in an embodiment of the present invention Figure.First picture processing device 110 includes picture acquisition module 111 and file modular converter 112.
Picture acquisition module 111, the first picture file for obtaining client, wherein, the first picture file be based on The picture file of markup language.
In embodiments of the present invention, picture acquisition module 111 can be used for performing step S101.
File modular converter 112, code file is rendered for the first picture file to be converted to, to render code file Color applying drawing is carried out to obtain second picture file to rendering code file when client is run, wherein rendering code file It is made up of non-markup languages.
In embodiments of the present invention, file modular converter 112 can be used for performing step S102.
It refer to Figure 12, Figure 12 is the square frame of file modular converter 112 in the first picture processing device 110 shown in Figure 11 Schematic diagram.File modular converter 112 includes file conversion unit 1121, code generating unit 1122, primitive attribute acquiring unit 1123rd, computing unit 1124, file storage unit 1125 and address storaging unit 1126.
File conversion unit 1121, is changed for the picture file to SVG forms, generates feature code.
In embodiments of the present invention, file conversion unit 1121 can be used for performing sub-step S1021.
Figure 13 is refer to, Figure 13 shows for the square frame of file conversion unit 1121 in the file modular converter 112 shown in Figure 12 It is intended to.File conversion unit 1121 includes the first sub- execution unit 11211, the second sub- of execution unit 11212 and the 3rd and performed Unit 11213.
First sub- execution unit 11211, for the picture file when SVG forms to that should there are nine icons to clock, by nine icons Note resolves to nine figure attribute informations.
In embodiments of the present invention, the first sub- execution unit 11211 can be used for performing sub-step S10211.
Second sub- execution unit 11212, for the picture file of SVG forms to be converted into first code file.
In embodiments of the present invention, the second sub- execution unit 11212 can be used for performing sub-step S10212.
3rd sub- execution unit 11213, for nine figure attribute informations to be added in first code file, to obtain feature Code.
In embodiments of the present invention, the 3rd sub- execution unit 11213 can be used for performing sub-step S10213.
Code generating unit 1122, the same type primitive attribute of the picture file for obtaining SVG forms.
In embodiments of the present invention, code generating unit 1122 can be used for performing sub-step S1022.
Primitive attribute acquiring unit 1123, the property value for calculating same type primitive attribute, property value constitutes attribute number Group, and attribute array is added in feature code.
In embodiments of the present invention, primitive attribute acquiring unit 1123 can be used for performing sub-step S1023.
Computing unit 1124, for feature code set to be used to the SVG Code Templates pre-set, generation renders code text Part, wherein, render code file and be made up of Java code.
In embodiments of the present invention, computing unit 1124 can be used for performing sub-step S1024.
File storage unit 1125, for multiple code files that render to be stored in preassigned Resource TOC.
In embodiments of the present invention, file storage unit 1125 can be used for performing sub-step S1025.
Address storaging unit 1126, for obtaining multiple corresponding storages for rendering code file in Resource TOC Location, and the plurality of corresponding storage address of code file that renders is added in the address mapping table pre-set.
In embodiments of the present invention, address storaging unit 1126 can be used for performing sub-step S1026.
Figure 14 is refer to, Figure 14 shows the square frame signal of second picture processing unit 210 provided in an embodiment of the present invention Figure.Second picture processing unit 210 includes file download module 211 and picture rendering module 212.
File download module 211, code file is rendered for being downloaded from service end, wherein, code file is rendered by the One picture file is converted, and the first picture file is the picture file based on markup language, renders code file by non-marked Language is constituted.
In embodiments of the present invention, file download module 211 can be used for performing step S103.
Picture rendering module 212, for responding user's operation, operation renders code file, is carried out to rendering code file Color applying drawing is to obtain second picture file.
In embodiments of the present invention, picture rendering module 212 can be used for performing step S104.
It refer to Figure 15, Figure 15 is the square frame of picture rendering module 212 in second picture processing unit 210 shown in Figure 14 Schematic diagram.Picture rendering module 212 includes address loading unit 2121, Code obtaining unit 2122, modification unit 2123, region Determining unit 2124 and picture rendering unit 2125.
Address loading unit 2121, operates any one obtained in address mapping table to render code text for responding user The corresponding storage address of part.
In embodiments of the present invention, address loading unit 2121 can be used for performing sub-step S1041.
Code obtaining unit 2122, for rendering the corresponding storage address of code file in Resource TOC according to any one Middle acquisition is corresponding with the storage address to render code file.
In embodiments of the present invention, Code obtaining unit 2122 can be used for performing sub-step S1042.
Change unit 2123, for when render code file need modification primitive attribute when, perform attribute modification operation behaviour Make.
In embodiments of the present invention, modification unit 2123 can be used for performing sub-step S1043.
It refer to Figure 16, Figure 16 is the block diagram that unit 2123 is changed in the picture rendering module 212 shown in Figure 15. Changing unit 2123 includes the 4th sub- execution unit 21232 of sub- execution unit 21231 and the 5th.
4th sub- execution unit 21231, for responding user's operation, operation renders code file, obtains attribute array.
In embodiments of the present invention, the 4th sub- execution unit 21231 can be used for performing sub-step S10431.
5th sub- execution unit 21232, modifies for the property value to the same type primitive attribute in attribute array.
In embodiments of the present invention, the 5th sub- execution unit 21232 can be used for performing sub-step S10432.
Area determination unit 2124, for when rendering code file including nine figure attribute informations, being believed according to nine figure attributes Breath determines nine figure content areas in second picture file to be rendered.
In embodiments of the present invention, area determination unit 2124 can be used for performing sub-step S1044.
Picture rendering unit 2125, code file is rendered for running, and is obtained to rendering code file progress color applying drawing Second picture file.
In embodiments of the present invention, picture rendering unit 2125 can be used for performing sub-step S1045.
Figure 17 is refer to, Figure 17 shows for the square frame of picture rendering unit 2125 in the picture rendering module 212 shown in Figure 17 It is intended to.Picture rendering unit 2125 includes the 6th sub- execution unit 21251, the 7th sub- of execution unit 21252 and the 8th and performed Unit 21253.
6th sub- execution unit 21251, for obtaining zoom factor.
In embodiments of the present invention, the 6th sub- execution unit 21251 can be used for performing sub-step S10451.
7th sub- execution unit 21252, for according to zoom factor, determining that the summit of second picture file to be rendered is sat Mark.
In embodiments of the present invention, the 7th sub- execution unit 21252 can be used for performing sub-step S10452.
It refer to Figure 18, Figure 18 is the side of the 7th sub- execution unit 21252 in picture rendering unit 2125 shown in Figure 17 Frame schematic diagram.7th sub- execution unit 21252 includes coordinate calculating unit 212521, draw unit 212522 and coordinate and determines list Member 212523.
Coordinate calculating unit 212521, for when second picture file to be rendered includes nine figure content areas, counting Calculate the coordinate of representative points of the nine figure content areas after nine figure stretched operations.
In embodiments of the present invention, coordinate calculating unit 212521 can be used for performing sub-step S104521.
Draw unit 212522, the second picture file to be rendered for the coordinate pair according to representative points is stretched.
In embodiments of the present invention, draw unit 212522 can be used for performing sub-step S104522.
Coordinate determining unit 212523, for according to zoom factor, it is determined that to be rendered after nine figure stretched operations The graphics vertex coordinate of two picture files.
In embodiments of the present invention, coordinate determining unit 212523 can be used for performing sub-step S104523.
8th sub- execution unit 21253, for based on apex coordinate, operation to render code file and obtains second picture text Part.
In embodiments of the present invention, the 8th sub- execution unit 21253 can be used for performing sub-step S10453.
In summary, the present invention is provided a kind of image processing method, device, service end and client, service end are obtained First picture file of client, wherein, the first picture file be the picture file based on markup language, and by the first picture text Part, which is converted to, renders code file, to rendering code file render and paint when client is run rendering code file System is made up of with obtaining second picture file wherein rendering code file non-markup languages;Client is downloaded from service end and rendered Code file, wherein, render code file and converted by the first picture file, the first picture file is based on markup language Picture file, render code file and be made up of non-markup languages;Client end response user operates, and operation renders code file, Color applying drawing is carried out to obtain second picture file to rendering code file.Compared with existing grid map, can effectively it reduce The size of committed memory, while picture amplification is undistorted, SVG picture files letter is parsed with existing traversal XML tree construction The mode of breath is compared, with loading velocity it is fast, can locally change and render order, support that nine figures, complicated picture rendering efficiency are high Advantage.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, it can also pass through Other modes are realized.Device embodiment described above is only schematical, for example, flow chart and block diagram in accompanying drawing Show according to the device of multiple embodiments of the present invention, the architectural framework in the cards of method and computer program product, Function and operation.At this point, each square frame in flow chart or block diagram can represent the one of a module, program segment or code Part a, part for the module, program segment or code is used to realize holding for defined logic function comprising one or more Row instruction.It should also be noted that in some implementations as replacement, the function of being marked in square frame can also with different from The order marked in accompanying drawing occurs.For example, two continuous square frames can essentially be performed substantially in parallel, they are sometimes It can perform in the opposite order, this is depending on involved function.It is also noted that every in block diagram and/or flow chart The combination of individual square frame and block diagram and/or the square frame in flow chart, can use the special base for performing defined function or action Realize, or can be realized with the combination of specialized hardware and computer instruction in the system of hardware.
In addition, each functional module in each embodiment of the invention can integrate to form an independent portion Point or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized using in the form of software function module and is used as independent production marketing or in use, can be with It is stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially in other words The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, including some instructions are to cause a computer equipment (can be individual People's computer, server, or network equipment etc.) perform all or part of step of each of the invention embodiment methods described. And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.Need Illustrate, herein, such as first and second or the like relational terms be used merely to by an entity or operation with Another entity or operation make a distinction, and not necessarily require or imply between these entities or operation there is any this reality The relation or order on border.Moreover, term " comprising ", "comprising" or its any other variant are intended to the bag of nonexcludability Contain, so that process, method, article or equipment including a series of key elements are not only including those key elements, but also including Other key elements being not expressly set out, or also include for this process, method, article or the intrinsic key element of equipment. In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including the key element Process, method, article or equipment in also there is other identical element.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.It should be noted that:Similar label and letter exists Similar terms is represented in following accompanying drawing, therefore, once being defined in a certain Xiang Yi accompanying drawing, is then not required in subsequent accompanying drawing It is further defined and explained.

Claims (27)

1. a kind of image processing method, it is characterised in that methods described is applied to the service end with client communication, methods described Including:
The first picture file of client is obtained, wherein, first picture file is the picture file based on markup language;
First picture file is converted to and renders code file, with it is described render code file and be run in client when Color applying drawing is carried out to obtain second picture file to the code file that renders, wherein the code file that renders is by non-marked Language is constituted.
2. the method as described in claim 1, it is characterised in that first picture file is the picture file of SVG forms, institute State and first picture file is converted into the step of rendering code file, including:
The picture file of the SVG forms is changed, feature code is generated;
The feature code set is used to the SVG Code Templates pre-set, generation renders code file, wherein, render code File is made up of Java code.
3. method as claimed in claim 2, it is characterised in that the picture file of the SVG forms be it is multiple, it is the multiple The picture file of SVG forms generate respectively it is multiple it is one-to-one render code file, it is described will first picture file turn The step of rendering code file is changed to, in addition to:
Multiple code files that render are stored in preassigned Resource TOC;
The multiple corresponding storage address for rendering code file in Resource TOC is obtained, and code text is rendered by the plurality of The corresponding storage address of part is added in the address mapping table pre-set.
4. method as claimed in claim 2, it is characterised in that the picture file to the SVG forms is changed, raw The step of into feature code, including:
When the picture file of the SVG forms is to that there should be nine icons to clock, nine icon note is resolved into nine figure attribute informations;
The picture file of the SVG forms is converted into first code file;
The nine figures attribute information is added in the first code file, to obtain the feature code.
5. method as claimed in claim 2, it is characterised in that described to be changed to the SVG picture files, generates feature After the step of code, in addition to:
Obtain the same type primitive attribute of the picture file of the SVG forms;
The property value of the same type primitive attribute is calculated, the property value constitutes attribute array, and the attribute array is added Enter in the feature code.
6. a kind of image processing method, it is characterised in that methods described is applied to the client communicated with service end, methods described Including:
Downloaded from the service end and render code file, wherein, it is described render code file changed by the first picture file and Come, first picture file is the picture file based on markup language, the code file that renders is made up of non-markup languages;
User's operation is responded, operation is described to render code file, code file progress color applying drawing is rendered to obtain the to described Two picture files.
7. method as claimed in claim 6, it is characterised in that the response user operates, code file is rendered described in operation, The step of color applying drawing is to obtain second picture file is carried out to the code file that renders, including:
Any one in response user's operation acquisition address mapping table renders the corresponding storage address of code file;
According to it is described any one render the corresponding storage address of code file obtained in Resource TOC with the storage address pair That answers renders code file;
Code file is rendered described in operation, second picture file is obtained to the code file progress color applying drawing that renders.
8. method as claimed in claim 7, it is characterised in that described in the basis any one to render code file corresponding Storage address obtained in Resource TOC it is corresponding with the storage address the step of rendering code file after, in addition to:
When it is described render code file need modification primitive attribute when, perform attribute modification operation.
9. method as claimed in claim 8, it is characterised in that the attribute modification operation includes:
Respond user to operate, code file is rendered described in operation, obtain attribute array;
The property value of same type primitive attribute in the attribute array is modified.
10. method as claimed in claim 9, it is characterised in that the same type primitive attribute in the attribute array Property value include the step of modify:
When the property value of multiple adjacent same type primitive attributes in attribute array is identical, the plurality of same type pel is set Attribute is pel set, and the plurality of same type primitive attribute property value is realized by changing the property value of the pel set Batch modification.
11. method as claimed in claim 8, it is characterised in that described when the code file that renders needs modification pel category Property when, after performing attribute modification the step of operate, in addition to:
When it is described render code file including nine figure attribute informations when, to be rendered second is determined according to the nine figures attribute information Nine figure content areas in picture file.
12. method as claimed in claim 7, it is characterised in that render code file described in the operation, generation is rendered to described Code file carries out the step of color applying drawing obtains second picture file, including:
Obtain zoom factor;
According to the zoom factor, the apex coordinate of second picture file to be rendered is determined;
Code file, which is rendered, based on the apex coordinate, described in operation obtains second picture file.
13. method as claimed in claim 12, it is characterised in that described according to the zoom factor, determines to be rendered The step of apex coordinate of two picture files, including:
When second picture file to be rendered includes nine figure content areas, calculate the nine figures content area and stretched through nine Tulas The coordinate of representative points after operation;
Stretched according to the second picture file that the coordinate pair of the representative points is to be rendered;
According to the zoom factor, it is determined that the graphics vertex of the second picture file to be rendered after nine figure stretched operations is sat Mark.
14. a kind of picture processing device, it is characterised in that described device is applied to the service end with client communication, the dress Put including:
Picture acquisition module, the first picture file for obtaining client, wherein, first picture file is based on mark The picture file of language;
File modular converter, code file is rendered for first picture file to be converted to, to render code text described Part carries out color applying drawing to obtain second picture file when client is run to the code file that renders, wherein the wash with watercolours Dye code file is made up of non-markup languages.
15. device as claimed in claim 14, it is characterised in that first picture file is the picture file of SVG forms, The file modular converter includes:
File conversion unit, is changed for the picture file to the SVG forms, generates feature code;
Code generating unit, for the feature code set to be used into the SVG Code Templates pre-set, generation renders code text Part.
16. device as claimed in claim 15, it is characterised in that the picture file of the SVG forms be it is multiple, it is the multiple The picture file of SVG forms generate respectively it is multiple render code file correspondingly, the file modular converter also includes:
File storage unit, for multiple code files that render to be stored in preassigned Resource TOC;
Address storaging unit, for obtaining the multiple corresponding storage address for rendering code file in Resource TOC, and The plurality of corresponding storage address of code file that renders is added in the address mapping table pre-set.
17. device as claimed in claim 15, it is characterised in that the file conversion unit includes:
First sub- execution unit, for the picture file when the SVG forms to that should have nine icons to clock, nine icon is remembered Resolve to nine figure attribute informations;
Second sub- execution unit, for the picture file of the SVG forms to be converted into first code file;
3rd sub- execution unit, it is described to obtain for the nine figures attribute information to be added in the first code file Feature code.
18. device as claimed in claim 15, it is characterised in that the file modular converter also includes:
Primitive attribute acquiring unit, the same type primitive attribute of the picture file for obtaining the SVG forms;
Computing unit, the property value for calculating the same type primitive attribute, the property value constitutes attribute array, and by institute Attribute array is stated to add in the feature code.
19. a kind of picture processing device, it is characterised in that described device is applied to the client communicated with service end, the dress Put including:
File download module, code file is rendered for being downloaded from the service end, wherein, the code file that renders passes through institute The first picture file is stated to convert, wherein, the first picture file is the picture file based on markup language, described to render code File is made up of non-markup languages;
Picture rendering module, for being operated based on response user, is rendered code file described in operation, code file is rendered to described Color applying drawing is carried out to obtain second picture file.
20. device as claimed in claim 19, it is characterised in that the picture rendering module includes:
Address loading unit, for responding any one that user's operation obtains in address mapping table, to render code file corresponding Storage address;
Code obtaining unit, for according to it is described any one render the corresponding storage address of code file and obtained in Resource TOC Take and corresponding with the storage address render code file;
Picture rendering unit, for run it is described render code file, to it is described render code file and carry out color applying drawing obtain Second picture file.
21. device as claimed in claim 20, it is characterised in that the picture rendering module also includes:
Change unit, for when it is described render code file need modification primitive attribute when, perform attribute modification operation.
22. device as claimed in claim 21, it is characterised in that the modification unit includes:
4th sub- execution unit, operates for responding user, code file is rendered described in operation, obtain attribute array;
5th sub- execution unit, modifies for the property value to the same type primitive attribute in the attribute array.
23. device as claimed in claim 21, it is characterised in that the picture rendering module also includes:
Area determination unit, for when it is described render code file including nine figure attribute informations when, according to the nine figures attribute believe Breath determines nine figure content areas in second picture file to be rendered.
24. device as claimed in claim 20, it is characterised in that the picture rendering unit includes:
6th sub- execution unit, for obtaining zoom factor;
7th sub- execution unit, for according to the zoom factor, determining the apex coordinate of second picture file to be rendered;
8th sub- execution unit, second picture file is obtained for rendering code based on the apex coordinate, described in operation.
25. device as claimed in claim 24, it is characterised in that the 7th sub- execution unit includes:
Coordinate calculating unit, for when second picture file to be rendered includes nine figure content areas, calculating nine figure The coordinate of representative points of the content area after nine figure stretched operations;
Draw unit, the second picture file to be rendered for the coordinate pair according to the representative points is stretched;
Coordinate determining unit, for according to the zoom factor, it is determined that the second picture to be rendered after nine figure stretched operations The graphics vertex coordinate of file.
26. a kind of service end, it is characterised in that the service end includes:
First memory;
First processor;And
Picture processing device, the picture processing device is installed in the first memory and including one or more by described The software function module that first processor is performed, it includes:
Picture acquisition module, the first picture file for obtaining client, wherein, first picture file is based on mark The picture file of language;
File modular converter, code file is rendered for first picture file to be converted to, to render code text described Color applying drawing is carried out to obtain second picture file to the code file that renders when part is run, wherein described render code text Part is made up of non-markup languages.
27. a kind of client, it is characterised in that the client includes:
Second memory;
Second processor;And
Picture processing device, the picture processing device is installed in the second memory and including one or more by described The software function module that second processor is performed, it includes:
File download module, code file is rendered for being downloaded from service end, wherein, the code file that renders is by described the One picture file is converted, wherein, first picture file is the picture file based on markup language, described to render code File is made up of non-markup languages;
Picture rendering module, is operated for responding user, code file is rendered described in operation, and the code file that renders is carried out Color applying drawing is to obtain second picture file.
CN201710266917.XA 2017-04-21 2017-04-21 Picture processing method and device, server and client Active CN107066430B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710266917.XA CN107066430B (en) 2017-04-21 2017-04-21 Picture processing method and device, server and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710266917.XA CN107066430B (en) 2017-04-21 2017-04-21 Picture processing method and device, server and client

Publications (2)

Publication Number Publication Date
CN107066430A true CN107066430A (en) 2017-08-18
CN107066430B CN107066430B (en) 2021-02-26

Family

ID=59600224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710266917.XA Active CN107066430B (en) 2017-04-21 2017-04-21 Picture processing method and device, server and client

Country Status (1)

Country Link
CN (1) CN107066430B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943363A (en) * 2017-11-21 2018-04-20 广州视睿电子科技有限公司 The collocation method and device of background image, interactive intelligent tablet computer and storage medium
CN110175053A (en) * 2019-04-24 2019-08-27 阿里巴巴集团控股有限公司 Picture loading method and device
CN110263301A (en) * 2019-06-27 2019-09-20 北京百度网讯科技有限公司 Method and apparatus for determining the color of text
CN111124579A (en) * 2019-12-24 2020-05-08 北京金山安全软件有限公司 Special effect rendering method and device, electronic equipment and storage medium
CN111178013A (en) * 2019-12-31 2020-05-19 福建天泉教育科技有限公司 Method and terminal for restoring custom coloring effect of picture in PPT
CN111666318A (en) * 2019-03-05 2020-09-15 阿里巴巴集团控股有限公司 Graph drawing method and device and electronic equipment
WO2020192417A1 (en) * 2019-03-22 2020-10-01 华为技术有限公司 Image rendering method and apparatus, electronic device
CN111897989A (en) * 2020-07-29 2020-11-06 北京字节跳动网络技术有限公司 Image processing method and device, terminal and storage medium
CN112686001A (en) * 2021-01-05 2021-04-20 中科三清科技有限公司 Transformation method and transmission method of meteorological data, server and data transmission system
CN112784188A (en) * 2019-11-07 2021-05-11 武汉金山办公软件有限公司 Page rendering method and device
CN112927312A (en) * 2019-12-05 2021-06-08 广州凡科互联网科技股份有限公司 Novel picture generation method
CN113538208A (en) * 2020-04-20 2021-10-22 华为技术有限公司 Picture loading method and related device
CN113704530A (en) * 2021-08-30 2021-11-26 北京思明启创科技有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114398125A (en) * 2021-12-31 2022-04-26 深圳市珍爱捷云信息技术有限公司 Point nine effect graph generation method and related device thereof
CN114463766A (en) * 2021-07-16 2022-05-10 荣耀终端有限公司 Form processing method and electronic equipment
US11791772B2 (en) 2019-04-04 2023-10-17 Huawei Technologies Co., Ltd. Oscillator and device

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052381A1 (en) * 2006-08-22 2008-02-28 Koon Wah Yu Method and system for selecting a transcoder to convert between content types
US20080127153A1 (en) * 2006-07-20 2008-05-29 Liu Peter T Language for binding Scalable Vector Graphics elements to JAVA classes
CN101202665A (en) * 2007-12-06 2008-06-18 中兴通讯股份有限公司 Method for generating graphical user interface
CN103116490A (en) * 2012-12-04 2013-05-22 广州市久邦数码科技有限公司 Nine-patch photo drawing method based on webpage
CN103208093A (en) * 2013-04-22 2013-07-17 四三九九网络股份有限公司 Method and device for eliminating over-high load of large picture during rendering of graphic processing unit (GPU)
CN103713891A (en) * 2012-10-09 2014-04-09 阿里巴巴集团控股有限公司 Method and device for graphic rendering on mobile device
CN104216700A (en) * 2013-09-10 2014-12-17 侯金涛 Cloud-computing-based HTML5 application packaging, installation, unloading and operation method and system
CN104616331A (en) * 2015-02-16 2015-05-13 百度在线网络技术(北京)有限公司 Image processing method and device on mobile device
CN104680421A (en) * 2013-11-26 2015-06-03 浙江大华系统工程有限公司 Scalable vector graphics (SVG) display method and device
CN105608191A (en) * 2015-12-23 2016-05-25 云南电网有限责任公司 EnersunWebCache based method for dynamically generating cached power grid map tiles
CN105700867A (en) * 2014-12-11 2016-06-22 海德堡印刷机械股份公司 Method for generating executable applications with dynamic scalable vector graphics
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN106021421A (en) * 2016-05-13 2016-10-12 北京视博云科技有限公司 Method and device for accelerating web page rendering
CN106339414A (en) * 2016-08-12 2017-01-18 合网络技术(北京)有限公司 Webpage rendering method and device
CN106484383A (en) * 2015-08-31 2017-03-08 阿里巴巴集团控股有限公司 page rendering method, device and equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080127153A1 (en) * 2006-07-20 2008-05-29 Liu Peter T Language for binding Scalable Vector Graphics elements to JAVA classes
US20080052381A1 (en) * 2006-08-22 2008-02-28 Koon Wah Yu Method and system for selecting a transcoder to convert between content types
CN101202665A (en) * 2007-12-06 2008-06-18 中兴通讯股份有限公司 Method for generating graphical user interface
CN103713891A (en) * 2012-10-09 2014-04-09 阿里巴巴集团控股有限公司 Method and device for graphic rendering on mobile device
CN103116490A (en) * 2012-12-04 2013-05-22 广州市久邦数码科技有限公司 Nine-patch photo drawing method based on webpage
CN103208093A (en) * 2013-04-22 2013-07-17 四三九九网络股份有限公司 Method and device for eliminating over-high load of large picture during rendering of graphic processing unit (GPU)
CN104216700A (en) * 2013-09-10 2014-12-17 侯金涛 Cloud-computing-based HTML5 application packaging, installation, unloading and operation method and system
CN104680421A (en) * 2013-11-26 2015-06-03 浙江大华系统工程有限公司 Scalable vector graphics (SVG) display method and device
CN105700867A (en) * 2014-12-11 2016-06-22 海德堡印刷机械股份公司 Method for generating executable applications with dynamic scalable vector graphics
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN104616331A (en) * 2015-02-16 2015-05-13 百度在线网络技术(北京)有限公司 Image processing method and device on mobile device
CN106484383A (en) * 2015-08-31 2017-03-08 阿里巴巴集团控股有限公司 page rendering method, device and equipment
CN105608191A (en) * 2015-12-23 2016-05-25 云南电网有限责任公司 EnersunWebCache based method for dynamically generating cached power grid map tiles
CN106021421A (en) * 2016-05-13 2016-10-12 北京视博云科技有限公司 Method and device for accelerating web page rendering
CN106339414A (en) * 2016-08-12 2017-01-18 合网络技术(北京)有限公司 Webpage rendering method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘杰 等: "将SVG转化为位图", 《福建电脑》 *

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943363A (en) * 2017-11-21 2018-04-20 广州视睿电子科技有限公司 The collocation method and device of background image, interactive intelligent tablet computer and storage medium
CN107943363B (en) * 2017-11-21 2020-10-02 广州视睿电子科技有限公司 Background image configuration method and device, interactive intelligent panel and storage medium
CN111666318A (en) * 2019-03-05 2020-09-15 阿里巴巴集团控股有限公司 Graph drawing method and device and electronic equipment
CN111666318B (en) * 2019-03-05 2023-10-27 阿里巴巴集团控股有限公司 Graph drawing method and device and electronic equipment
US11816775B2 (en) 2019-03-22 2023-11-14 Huawei Technologies Co., Ltd. Image rendering method and apparatus, and electronic device
WO2020192417A1 (en) * 2019-03-22 2020-10-01 华为技术有限公司 Image rendering method and apparatus, electronic device
US11791772B2 (en) 2019-04-04 2023-10-17 Huawei Technologies Co., Ltd. Oscillator and device
CN110175053A (en) * 2019-04-24 2019-08-27 阿里巴巴集团控股有限公司 Picture loading method and device
CN110175053B (en) * 2019-04-24 2023-10-27 创新先进技术有限公司 Picture loading method and device
CN110263301A (en) * 2019-06-27 2019-09-20 北京百度网讯科技有限公司 Method and apparatus for determining the color of text
CN110263301B (en) * 2019-06-27 2023-12-05 北京百度网讯科技有限公司 Method and device for determining color of text
CN112784188B (en) * 2019-11-07 2022-09-13 武汉金山办公软件有限公司 Page rendering method and device
CN112784188A (en) * 2019-11-07 2021-05-11 武汉金山办公软件有限公司 Page rendering method and device
CN112927312A (en) * 2019-12-05 2021-06-08 广州凡科互联网科技股份有限公司 Novel picture generation method
CN111124579B (en) * 2019-12-24 2023-12-19 北京金山安全软件有限公司 Special effect rendering method and device, electronic equipment and storage medium
CN111124579A (en) * 2019-12-24 2020-05-08 北京金山安全软件有限公司 Special effect rendering method and device, electronic equipment and storage medium
CN111178013A (en) * 2019-12-31 2020-05-19 福建天泉教育科技有限公司 Method and terminal for restoring custom coloring effect of picture in PPT
CN111178013B (en) * 2019-12-31 2022-10-18 福建天泉教育科技有限公司 Method and terminal for restoring custom coloring effect of picture in PPT
WO2021213351A1 (en) * 2020-04-20 2021-10-28 华为技术有限公司 Picture loading method and related apparatus
CN113538208A (en) * 2020-04-20 2021-10-22 华为技术有限公司 Picture loading method and related device
CN111897989A (en) * 2020-07-29 2020-11-06 北京字节跳动网络技术有限公司 Image processing method and device, terminal and storage medium
CN112686001B (en) * 2021-01-05 2021-12-03 中科三清科技有限公司 Transformation method and transmission method of meteorological data, server and data transmission system
CN112686001A (en) * 2021-01-05 2021-04-20 中科三清科技有限公司 Transformation method and transmission method of meteorological data, server and data transmission system
CN114463766A (en) * 2021-07-16 2022-05-10 荣耀终端有限公司 Form processing method and electronic equipment
CN113704530A (en) * 2021-08-30 2021-11-26 北京思明启创科技有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114398125A (en) * 2021-12-31 2022-04-26 深圳市珍爱捷云信息技术有限公司 Point nine effect graph generation method and related device thereof
CN114398125B (en) * 2021-12-31 2024-02-27 深圳市珍爱捷云信息技术有限公司 Point nine effect graph generation method and related device thereof

Also Published As

Publication number Publication date
CN107066430B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN107066430A (en) Image processing method, device, service end and client
CN106484408A (en) A kind of node relationships figure display methods based on HTML5 and system
CN110458173A (en) Method and apparatus for generating article color value
US11645227B2 (en) Mapping tests of spreadsheets in server-browser environments
US20170212964A1 (en) System and method for dynamic content rendering
CN109885301B (en) Method, device, storage medium and equipment for generating scalable vector graphics
CN107301046A (en) Treating method and apparatus, computer equipment and the storage medium of icon
CN109472847A (en) A kind of image processing method, system and terminal device
CN110020376A (en) Data linkage method and system
CN114296722A (en) Visual rapid development method and system applied to digital reform
CN106919406A (en) A kind of desktop application component issue, update method and device
CN111651966A (en) Data report file generation method and device and electronic equipment
CN105912328B (en) Display methods, device and the web system of the web system page
CN112068911A (en) Method, device, system, equipment and medium for generating electronic form
CN106981084A (en) A kind of method and device of drawing isoline
CN113900647A (en) Method, device and equipment for screenshot of webpage
US8051107B2 (en) Method and device for creating relation-type form database
CN112287255A (en) Page construction method and device, computing equipment and computer readable storage medium
CN112486482A (en) Page display method and device
CN111858595B (en) Dynamic configuration method and system for electric power engineering examination record table
CN113312568B (en) Web information extraction method and system based on HTML source code and webpage snapshot
US9811448B2 (en) Event-driven software testing
CN112364282A (en) Webpage darkness mode realization method, device, medium and electronic equipment
CN111782883A (en) View construction method and system
CN112540803B (en) Form design adaptation method, device, equipment 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200604

Address after: 310051 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 510000 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 13 layer self unit 02 (only for office use)

Applicant before: GUANGZHOU AIJIUYOU INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230508

Address after: 201210 3rd floor, building 1, No.400, Fangchun Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai

Patentee after: Shanghai Lingxi Interactive Entertainment Co.,Ltd.

Address before: Room 508, 5 / F, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Alibaba (China) Co.,Ltd.