Summary of the invention
Technical problem to be solved by this invention is to provide a kind of method of processing graphics, the time that is spent during with the minimizing processing graphics.
General printer is in processing graphics, when printing with work, can adopt dual mode, first processing method is the processing of being done at the figure that change color is arranged (for example: figure of layer change color or the like is arranged gradually), because the color of each point is different in the figure, so first processing method must be converted to cmyk color space from rgb color space as colour gamut with each point in the figure one by one, remake the processing of layouting, just after graph data self-access address is taken out, do color gamut conversion again after doing logical operation earlier, and deposit in destination address.Second processing method be at no change color figure (for example: the processing of being done figure of monochromatic no change color or the like), because the color of each point is identical in the figure, so second processing method is different from the first above-mentioned processing method, second processing method does not need one by one each point in the figure to be done the logical operation of colour gamut conversion, and only need after the taking-up of graphic documentation self-access address, make in the figure color wherein do the colour gamut conversion, can change the color of other point in the figure in the lump, and deposit in destination address again, just second processing method system is converted to cmyk color space from rgb color space as colour gamut with the color part of figure (in the figure wherein), again with the processing of layouting in the lump of the shape part of figure.Because when processing graphics, normally adopt first processing method or the figure of second disposal methods, one whole page or leaf, certainly, at the number of figure more for a long time, when adopting different disposal methods figure, having the situation of suitable big-difference in the time cost, so which kind of disposal methods figure decision adopts, is necessary to reduce the time that is spent.
The method of disclosed processing graphics according to the present invention, be in order to determine one of above-mentioned processing method, to improve the processing speed of figure, mainly be to confirm in one page, whether have the number of figure more earlier, and two kinds of processing methods that adopt have the situation of suitable big-difference in the time cost, when such situation is arranged, must cut apart several sticks of this page one-tenth, and stick taken a sample, and with first processing method and second processing method stick of sampling being made figure handles, with the time less that graphics process was spent of knowing which kind of processing method is done, and deal with the figure of this processing method to this page.The present invention includes the following step:
At first, confirm in one page the processing command of the figure of this page greater than to the processing command of the literal of this page and to the processing command of the image of this page.
Cut apart several sticks of this page one-tenth again, and store, and in several sticks, take a sample, form several sampling sticks, and store.
Then, with first processing method and second disposal methods stick of respectively taking a sample, and obtain first processing time and second processing time.
At last, confirm less person in first processing time and second processing time, and obtain corresponding processing method, again this page or leaf of disposal methods according to this.
So can do the figure processing to this page or leaf according to first processing method or second processing method of above-mentioned gained, and spend the less time.
Therefore, the method for a kind of processing graphics provided by the invention, its characteristics are that this method includes following steps:
Confirm in one page the processing command of the figure of this page greater than to the processing command of the literal of this page and to the processing command of the image of this page;
Cut apart a plurality of sticks of this page one-tenth, and store;
In these a plurality of sticks, take a sample, form a plurality of sampling sticks, and store;
Respectively be somebody's turn to do the sampling stick with one first processing method and one second disposal methods, and obtain one first processing time and one second processing time, wherein this first processing method is for to be converted to cmyk color space from rgb color space as colour gamut with figure, remake the processing of layouting, and this second processing method is for being converted to cmyk color space from rgb color space as colour gamut with the color of figure part, again with the processing of layouting in the lump of the shape part of figure;
Confirm less person in this first processing time and this second processing time, and obtain a corresponding processing method; And
According to this page or leaf of this disposal methods.
The method of above-mentioned processing graphics, its characteristics are, should respectively be somebody's turn to do the sampling stick with one first processing method and one second disposal methods, also include the following step and obtain the step in one first processing time and one second processing time:
Obtain one of them in this sampling stick;
Be somebody's turn to do the sampling stick with this first disposal methods, and obtain a very first time;
Storage is through this sampling stick and this very first time of this first disposal methods;
Be somebody's turn to do the sampling stick with this second disposal methods, and obtained for one second time;
Storage is through this sampling stick and this second time of this second disposal methods;
Confirm to handle the stick of respectively should taking a sample; And
Summation respectively is somebody's turn to do this very first time of sampling stick, and reach summation and respectively should take a sample this second time of stick, and obtain this first processing time and obtain this second processing time, and storage.
The method of above-mentioned processing graphics, its characteristics are that the step of complying with this this page or leaf of disposal methods also includes the following step:
Obtain undressed this stick, form a plurality of processing sticks;
Be somebody's turn to do one of them that handle stick with this disposal methods;
Storage is through this processing stick of this disposal methods;
Confirm to handle respectively and should handle stick;
Take out previous this sampling stick that stores through this disposal methods; And
Merging is through this sampling stick and this processing stick of this disposal methods.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
The specific embodiment
General printer is in processing graphics, when printing with work, can adopt dual mode, first processing method is the processing of being done at the figure that change color is arranged (for example: figure of layer change color or the like is arranged gradually), because the color of each point is different in the figure, so first processing method must be converted to cmyk color space from rgb color space as colour gamut with each point in the figure one by one, remake the processing of layouting, just after graph data self-access address is taken out, do color gamut conversion again after doing logical operation earlier, and deposit in destination address.Second processing method be at no change color figure (for example: the processing of being done figure of monochromatic no change color or the like), because the color of each point is identical in the figure, so second processing method is different from the first above-mentioned processing method, second processing method does not need one by one each point in the figure to be done the logical operation of colour gamut conversion, and only need after the taking-up of graphic documentation self-access address, make in the figure color wherein do the colour gamut conversion, can change the color of other point in the figure in the lump, and deposit in destination address again, just second processing method is that the color of figure part (in the figure wherein) is converted to cmyk color space from rgb color space as colour gamut, again with the processing of layouting in the lump of the shape part of figure.Because when processing graphics, normally adopt first processing method or the figure of second disposal methods, one whole page or leaf, certainly, at the number of figure more for a long time, when adopting different disposal methods figure, having the situation of suitable big-difference in the time cost, so which kind of disposal methods figure decision adopts, is necessary to reduce the time that is spent.
The method of a kind of processing graphics of the present invention, in order to determine one of above-mentioned processing method, to improve the processing speed of figure, mainly be to confirm in one page, whether have the number of figure more earlier, and two kinds of processing methods that adopt have the situation of suitable big-difference in the time cost, when such situation is arranged, must cut apart several sticks of this page one-tenth, and stick taken a sample, and with first processing method and second processing method stick of sampling being made figure handles, with the time less that graphics process was spent of knowing which kind of processing method is done, and deal with the figure of this processing method to this page.See also of the present invention main flow chart shown in Figure 1, the present invention includes the following step:
Step 101, at first, confirm in one page to the processing command of the figure of this page whether greater than to the processing command of the literal of this page and to the processing command of the image of this page, just confirming earlier has the number of figure more in one page, and the time cost there is the situation of suitable big-difference.
Step 102 is cut apart several sticks of this page one-tenth again, and stores.
Step 103 is taken a sample in several sticks, forms several sampling sticks, and stores.Just earlier this page or leaf is divided into several sticks, in several sticks, take a sample again, and the stick that obtains taking a sample, certainly get over for a long time at the number of sampling stick, in the subsequent step time of required cost also just many more, but can assess first processing method or the time less of the required cost of second processing method also more exactly.
Step 104, then, with first processing method and second disposal methods stick of respectively taking a sample, and obtain first processing time and second processing time, just according to first disposal methods stick of respectively taking a sample, and obtained for first processing time, and according to second disposal methods stick of respectively taking a sample, and obtained for second processing time.
Step 105, confirm less person in first processing time and second processing time, and obtain corresponding processing method, confirming during the time less of required cost, then to adopt first processing method with first processing time processing sampling stick, otherwise, confirming during the time less of required cost, then to adopt second processing method with second processing time processing sampling stick.
Step 106, last, this page or leaf of disposal methods be done the figure processing so can comply with first processing method or second processing method of above-mentioned gained to this page or leaf, and spend the less time according to this.
See also sampling mode schematic diagram shown in Figure 4, after doing the affirmation process of step 101, can in one page P, do cut apart (being stick 1,2,3, N, N+1, N+2, M+2, M+1, M shown in the figure) of stick, in stick, take out sampling stick 3, N, (M+2) again, afterwards, respectively sampling stick 3, N, (M+2) are dealt with first processing method and second processing method, and obtain first processing time and second processing time, get then the cost short period processing method, and according to this disposal methods this page or leaf.
Certainly, see also the flow chart of step 104 of the present invention among Fig. 1 shown in Figure 2, step 104 also includes the following step, successively each sampling stick is done the processing of first processing method, and obtain the very first time, and successively each sampling stick is done the processing of second processing method, and obtained for second time:
Step 201 at first, obtains one of them of this sampling stick.
Step 202 with this sampling stick of first disposal methods, and obtains the very first time, and this very first time is the time of carrying out the processing gained of first processing method at this sampling stick.
Step 203 stores this sampling stick and very first time through first disposal methods, and this this sampling stick through first disposal methods was made graphics process, and is can be for follow-up flow process use to its action of doing to store.
Step 204 with this sampling stick of second disposal methods, and obtained for second time, and this second time is the time of carrying out the processing gained of second processing method at this sampling stick.
Step 205 stores this sampling stick and second time through second disposal methods, and this this sampling stick through second disposal methods was made graphics process, and is can be for follow-up flow process use to its action of doing to store.
Step 206 confirms to handle the stick of respectively taking a sample, and when still having the sampling stick to be untreated, then gets back to step 201, and proceeds follow-up flow process, up to confirming to handle the stick of respectively taking a sample.
Step 207, summation are respectively taken a sample very first time of stick, and summation respectively takes a sample second time of stick, and obtain for first processing time and obtained for second processing time, and store, and therefore can do the comparison of the very first time and the second time length for follow-up flow process.
See also the flow chart of step 106 of the present invention among Fig. 1 shown in Figure 3, item also include the following step, handle to make figure at previous untreated stick, thereby can reduce the time of graphics process as for step 106:
Step 301 obtains undressed stick, and form several and handle stick, because of before these sticks not being dealt with, thereby be these sticks of taking-up, these sticks are dealt with in follow-up flow process herein.
Step 302 should be handled one of them of stick with this disposal methods, handled handling stick with the processing method of less time of cost of previous gained.
Step 303 stores the processing stick through this disposal methods, just handling stick through after this disposal methods, does the action that stores.
Step 304 is confirmed to handle and is respectively handled stick, when still having the processing stick to be untreated, then gets back to step 302, and proceeds follow-up flow process, respectively handles stick up to confirming to handle.
Step 305 is taken out the previous sampling stick through this disposal methods that stores.
Step 306 merges sampling stick and processing stick through this disposal methods, thereby at the sampling stick and after handling the stick merging, just can obtain the one page through this disposal methods.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.