[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110097147B - Method and system for setting primitive drawing attribute, computer equipment and storage medium - Google Patents

Method and system for setting primitive drawing attribute, computer equipment and storage medium Download PDF

Info

Publication number
CN110097147B
CN110097147B CN201810081730.7A CN201810081730A CN110097147B CN 110097147 B CN110097147 B CN 110097147B CN 201810081730 A CN201810081730 A CN 201810081730A CN 110097147 B CN110097147 B CN 110097147B
Authority
CN
China
Prior art keywords
page
primitive
drawn
preset
setting
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.)
Active
Application number
CN201810081730.7A
Other languages
Chinese (zh)
Other versions
CN110097147A (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.)
Beijing Founder Easiprint Co ltd
New Founder Holdings Development Co ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201810081730.7A priority Critical patent/CN110097147B/en
Publication of CN110097147A publication Critical patent/CN110097147A/en
Application granted granted Critical
Publication of CN110097147B publication Critical patent/CN110097147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K15/00Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a method and a system for setting primitive drawing attributes, computer equipment and a computer readable storage medium, wherein the method for setting the primitive drawing attributes comprises the following steps: scanning the page, and judging whether the page has overprint attributes or not; when the page has the overprint attribute, acquiring a primitive to be drawn and judging whether the primitive to be drawn is overlapped with the background of the page; when the primitive to be drawn is overlapped with the background of the page, judging whether the page needs to be subjected to delayed color correction or not according to the attribute of the primitive; when the page needs to be delayed and corrected, setting a primitive drawing area on the page as a transparent area; and performing overprinting calculation on the primitive to be drawn in the transparent area to obtain a primitive lattice, performing color correction on the primitive lattice, and finally outputting the primitive lattice, so that the number of color channels of the primitive is prevented from being changed before overprinting, and the influence on the final overprinting effect is reduced.

Description

Method and system for setting primitive drawing attribute, computer equipment and storage medium
Technical Field
The invention relates to the technical field of image rasterization, in particular to a method and a system for setting a primitive drawing attribute, computer equipment and a computer readable storage medium.
Background
A Raster Image Processor (RIP) is an interpreter that interprets and converts layout information described in a page description language into data information that can be output by an output device. The RIP is core software of the whole prepress industry, and the output quality, the output speed and the openness of a desktop system are greatly dependent on the quality of the performance of the RIP.
Page description language when describing layout content, two imaging models are generally adopted: alternative to imaging model, transparent imaging model. Alternative imaging modes are imaging models used by previous versions of PS (Adobe Photoshop, image processing software) and PDF (portable document Format) 1.3, whose basic principles are: each primitive newly drawn to a location on the page will completely replace the background content at that location, and the final color of a point on the page at that location is determined by the primitive newly drawn to that location. The basic principle of the transparent imaging model is as follows: the transparent graphic element newly drawn to a certain position in the page needs to be mixed with the background content at the previous position, and the final color of a certain point on the page is determined by all the graphic elements drawn to the position and the transparent attribute of the background.
Non-zero overprinting in primitive overprint attributes is only valid for print colors. If a color plate in the current primitive cmyk color plate is empty, the primitive of the color plate with the background content is transmitted, wherein the cmyk color plate is a color register mode adopted in color printing. When the overprint attribute exists, two modes are generally adopted when the page content is managed in color space: under the replacement imaging model, firstly correcting the color of the primitive, and then completely replacing the background content on the position with the primitive; and the final color of a certain point on the position on the page is determined by the transparency attributes of all the primitives drawn to the position and the background.
In the printing process, a user needs to perform color management on a page, if the primitive has a overprinting effect and meets non-zero overprinting, the number of color channels of the primitive is changed after the color management is performed, for example, some pages have real blank pages in the layout, and the page has contents after the color management, so that when the page is overlapped with other primitives, the overprinting effect cannot be generated.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, one aspect of the present invention is to provide a method for setting primitive drawing attributes.
Another aspect of the present invention is to provide a system for setting primitive drawing attributes.
Yet another aspect of the invention is directed to a computer device.
Yet another aspect of the present invention is to provide a computer-readable storage medium.
In view of the above, according to an aspect of the present invention, a method for setting a primitive drawing attribute is provided, including: scanning the page, and judging whether the page has overprint attributes or not; when the page has the overprint attribute, acquiring a primitive to be drawn and judging whether the primitive to be drawn is overlapped with the background of the page; when the primitive to be drawn is overlapped with the background of the page, judging whether the page needs to be subjected to delayed color correction or not according to the attribute of the primitive; when the page needs to be delayed and corrected, setting a primitive drawing area on the page as a transparent area; and performing overprinting calculation on the pixel to be drawn in the transparent area to obtain a pixel dot matrix, performing color correction on the pixel dot matrix, and finally outputting the pixel dot matrix.
The invention provides a setting method of primitive drawing attributes, which comprises the steps of firstly determining whether a page has overprint attributes, ending a subsequent flow when the page does not have the overprint attributes, saving system resources, judging whether a primitive to be drawn is overlapped with a page background when the page has the overprint attributes, if the primitive is overlapped with the page background, indicating that delayed color correction processing is possibly needed, dividing a primitive drawing area of the page into a non-transparent area and a transparent area after the delayed color correction processing is determined, namely, forcing the primitive drawing area meeting the overprint effect into the transparent area, avoiding the primitive color management time when the page is interpreted, forcing the primitive which is the transparent area to be subjected to overprint calculation when the transparency is removed, and carrying out color management when a dot matrix obtained during assembly is the final display color of the primitive. The final output effect of the primitive is obtained first, and then the color correction of the dot matrix level is carried out, so that the change of the color channel number of the primitive before the overprinting is prevented, and the influence on the final overprinting effect is reduced.
The method for setting the primitive drawing attribute according to the present invention may further have the following technical features:
in the above technical solution, preferably, when the page has the overprint attribute, the method further includes: establishing a resource statistical area table; and carrying out doubling reduction processing on the resource statistical region table.
According to the technical scheme, after the page is judged to have the overprint attribute, a resource statistical area table is established and used for providing basis for judging whether the graphic element to be drawn is overlapped with the page background. The size of the area table is in direct proportion to the output resolution, and when the output resolution is larger, the area table is necessarily large, so if the resource statistics is carried out when the output resolution is higher or the number of sub-pages is very large, a larger memory is occupied, and the resource statistics area table is subjected to doubling processing.
In any of the above technical solutions, preferably, the step of establishing the resource statistics area table specifically includes: the method comprises the steps of partitioning a page according to a first preset height and a first preset width to obtain a first number of page drawing areas; the page is divided into blocks according to a second preset height and a second preset width to obtain a second number of page blocks; recording the page drawing area and the page block to obtain a resource statistical area table; wherein the first number is less than the second number.
According to the technical scheme, the page is firstly partitioned according to a first preset height and width, for example, the page is partitioned into a plurality of page drawing areas according to the width × and the height 32 × 16, then the page is partitioned again according to a second preset height and width, for example, the page is partitioned into a plurality of page blocks according to the width × and the height 8 × 8, the partitioned page drawing areas and the page blocks are recorded in a table to form a resource statistical area table, so that 1 bit in the drawing table represents one page drawing area of the 32 × 16, 0 represents that the area is not covered by a primitive, and 1 represents that the area is covered by the primitive.
In any of the above technical solutions, preferably, the step of obtaining the primitive to be drawn and determining whether the primitive to be drawn overlaps with the background of the page includes: acquiring a primitive to be drawn, determining the drawing range of the primitive to be drawn, and determining a page drawing area corresponding to the drawing range in the resource statistical area table; counting the number of page blocks covered by the drawing range in the resource counting area table; if the number of the page blocks covered by the drawing range is larger than the preset number, determining that the primitive to be drawn is overlapped with the background of the page; and if the number of the page blocks covered by the drawing range is less than or equal to the preset number, determining that the primitive to be drawn does not overlap with the background of the page.
According to the technical scheme, whether the primitive to be drawn covers a certain page or a certain page drawing area and the surplus page blocks with the preset number are searched in the resource statistical area table, if so, the primitive to be drawn is determined to be overlapped with the background of the page, and whether the primitive to be drawn is overlapped is accurately judged. The judgment frequency of whether coverage occurs can be set, namely more than one judgment can be carried out to ensure the accuracy of the judgment result.
In any of the above technical solutions, preferably, the step of performing the doubling-down process on the resource statistics area table specifically includes setting a height of the resource statistics area table according to a first formula and setting a width of the resource statistics area table according to a second formula, where the first formula is Y ═ H '× D)/H' × D, where Y represents the height of the resource statistics area table, H represents the height of the page, H 'represents the first preset height, and D represents the preset multiplying power, and the second formula is X ═ W' × D)/W '× D/W, where X represents the width of the resource statistics area table, W represents the width of the page, W' represents the first preset width, and W ″ represents the second preset width.
In this technical solution, the magnification is an empirical value, and can be obtained by a formula D ═ MaxResolution +600.0)/600.0, where MaxResolution is the maximum resolution of the page. And calculating according to the formula to obtain the height and the width of the resource statistical area table, namely performing doubling processing on the resource statistical area table to reduce the consumption of memory resources.
According to another aspect of the present invention, a system for setting primitive drawing attributes is provided, including: the scanning unit is used for scanning the page and judging whether the page has overprint attributes or not; the primitive acquiring unit is used for acquiring a primitive to be drawn and judging whether the primitive to be drawn is overlapped with the background of the page or not when the page has the overprint attribute; the judging unit is used for judging whether the page needs to be subjected to delayed color correction according to the attribute of the primitive when the primitive to be drawn is overlapped with the background of the page; the setting unit is used for setting a primitive drawing area on the page as a transparent area when the delayed color correction needs to be carried out on the page; and the processing unit is used for performing overprinting calculation on the pixel to be drawn in the transparent area to obtain a pixel dot matrix, performing color correction on the pixel dot matrix, and finally outputting the pixel dot matrix.
The system for setting the primitive drawing attribute comprises the steps of firstly determining whether a page has the overprint attribute, finishing a subsequent flow when the page does not have the overprint attribute, saving system resources, judging whether a primitive to be drawn is overlapped with a page background when the page has the overprint attribute, if the primitive to be drawn is overlapped with the page background, indicating that delayed color correction processing is possibly needed, dividing a primitive drawing area of the page into a non-transparent area and a transparent area after the delayed color correction processing is determined, namely, forcing the primitive drawing area meeting the overprint effect into the transparent area, avoiding the time of primitive color management when the page is interpreted, forcing the primitive which is the transparent area to be subjected to overprint calculation when the transparency is removed, and carrying out color management when a dot matrix obtained during assembly is the final display color of the primitive. The final output effect of the primitive is obtained first, and then the color correction of the dot matrix level is carried out, so that the change of the color channel number of the primitive before the overprinting is prevented, and the influence on the final overprinting effect is reduced.
The system for setting the primitive drawing attribute according to the present invention may further have the following technical features:
in the above technical solution, preferably, the method further includes: the establishing unit is used for establishing a resource statistical area table when the page has the overprint attribute; and carrying out reduction processing on the resource statistical area table.
According to the technical scheme, after the page is judged to have the overprint attribute, a resource statistical area table is established and used for providing basis for judging whether the graphic element to be drawn is overlapped with the page background. The size of the area table is in direct proportion to the output resolution, and when the output resolution is larger, the area table is necessarily large, so if the resource statistics is carried out when the output resolution is higher or the number of sub-pages is very large, a larger memory is occupied, and the resource statistics area table is subjected to doubling processing.
In any of the above technical solutions, preferably, the establishing unit includes: the page blocking unit is used for blocking the pages according to a first preset height and a first preset width to obtain a first number of page drawing areas; partitioning the page according to a second preset height and a second preset width to obtain a second number of page blocks; the establishing unit is specifically used for recording the page drawing area and the page block to obtain a resource statistical area table; wherein the first number is less than the second number.
According to the technical scheme, the page is firstly partitioned according to a first preset height and width, for example, the page is partitioned into a plurality of page drawing areas according to the width × and the height 32 × 16, then the page is partitioned again according to a second preset height and width, for example, the page is partitioned into a plurality of page blocks according to the width × and the height 8 × 8, the partitioned page drawing areas and the page blocks are recorded in a table to form a resource statistical area table, so that 1 bit in the drawing table represents one page drawing area of the 32 × 16, 0 represents that the area is not covered by a primitive, and 1 represents that the area is covered by the primitive.
In any of the above technical solutions, preferably, the primitive obtaining unit is specifically configured to obtain a primitive to be drawn, determine a drawing range of the primitive to be drawn, and determine a page drawing area corresponding to the drawing range in the resource statistics area table; a primitive acquisition unit comprising: the statistical unit is used for counting the number of page blocks covered by the drawing range in the resource statistical area table; the determining unit is used for determining that the primitive to be drawn is overlapped with the background of the page if the number of the page blocks covered by the drawing range is larger than the preset number; and if the number of the page blocks covered by the drawing range is less than or equal to the preset number, determining that the primitive to be drawn does not overlap with the background of the page.
According to the technical scheme, whether the primitive to be drawn covers a certain page or a certain page drawing area and the surplus page blocks with the preset number are searched in the resource statistical area table, if so, the primitive to be drawn is determined to be overlapped with the background of the page, and whether the primitive to be drawn is overlapped is accurately judged. The judgment frequency of whether coverage occurs can be set, namely more than one judgment can be carried out to ensure the accuracy of the judgment result.
In any of the foregoing technical solutions, preferably, the establishing unit is specifically configured to set a height of the resource statistics area table according to a first formula and a width of the resource statistics area table according to a second formula, where the first formula is Y ═ H + H '× D)/H' × D, where Y represents the height of the resource statistics area table, H represents the height of a page, H 'represents the first preset height, and D represents a preset magnification, and the second formula is X ═ W + W' × D)/W '× D/W ″, where X represents the width of the resource statistics area table, W represents the width of the page, W' represents the first preset width, and W ″ represents the second preset width.
In this technical solution, the magnification is an empirical value, and can be obtained by a formula D ═ MaxResolution +600.0)/600.0, where MaxResolution is the maximum resolution of the page. And calculating according to the formula to obtain the height and the width of the resource statistical area table, namely performing doubling processing on the resource statistical area table to reduce the consumption of memory resources.
According to a further aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for setting primitive drawing attributes according to any one of the above when executing the computer program.
The computer equipment provided by the invention has the advantages that whether the page has the overprint attribute or not is determined when the processor executes the computer program, the subsequent flow is ended when the page does not have the overprint attribute, the system resource is saved, whether the primitive to be drawn is overlapped with the page background or not is judged when the overprint attribute exists, if the primitive to be drawn is overlapped, the delayed color correction processing is possibly required, the primitive drawing area of the page is divided into a non-transparent area and a transparent area after the delayed color correction processing is determined, namely the primitive drawing area meeting the overprint effect is forced to be the transparent area, the time for managing the primitive colors during page explanation is avoided, the primitive forced to be the transparent area is subjected to overprint calculation when the transparency is removed, the dot matrix obtained during assembly is the final display color of the primitive, and then the color management is carried. The final output effect of the primitive is obtained first, and then the color correction of the dot matrix level is carried out, so that the change of the color channel number of the primitive before the overprinting is prevented, and the influence on the final overprinting effect is reduced.
According to a further aspect of the present invention, a computer-readable storage medium is proposed, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method for setting primitive drawing attributes according to any one of the above.
The computer readable storage medium provided by the invention can be used for determining whether a page has overprint attributes or not when a computer program is executed by a processor, ending a subsequent process when the page does not have the overprint attributes, saving system resources, judging whether a primitive to be drawn is overlapped with a page background or not when the page has the overprint attributes, if the primitive to be drawn is overlapped with the page background, indicating that delayed color correction processing is possibly needed, dividing a primitive drawing area of the page into a non-transparent area and a transparent area after the delayed color correction processing is determined to be needed, namely, forcing the primitive drawing area meeting the overprint effect to be the transparent area, avoiding the time for managing the primitive color when the page is interpreted, forcing the primitive to be the transparent area to perform overprint calculation firstly when the transparency is removed, and obtaining a dot matrix which is the final display color of the primitive when the. The final output effect of the primitive is obtained first, and then the color correction of the dot matrix level is carried out, so that the change of the color channel number of the primitive before the overprinting is prevented, and the influence on the final overprinting effect is reduced.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow chart illustrating a method for setting primitive drawing attributes according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for setting primitive drawing attributes according to another embodiment of the present invention;
FIG. 3 is a flow chart illustrating a method for setting primitive drawing attributes according to yet another embodiment of the present invention;
FIG. 4 shows a schematic block diagram of a primitive rendering attribute setup system according to an embodiment of the present invention;
FIG. 5 shows a schematic block diagram of a primitive rendering attribute setup system according to another embodiment of the present invention;
FIG. 6 shows a schematic block diagram of a computer device of one embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited to the specific embodiments disclosed below.
An embodiment of a first aspect of the present invention provides a method for setting a primitive drawing attribute, and fig. 1 illustrates a flowchart of the method for setting a primitive drawing attribute according to an embodiment of the present invention. Wherein, the method comprises the following steps:
step 102, scanning a page, and judging whether the page has overprint attributes or not;
104, when the page has the overprint attribute, acquiring a primitive to be drawn and judging whether the primitive to be drawn is overlapped with the background of the page;
step 106, when the primitive to be drawn is overlapped with the background of the page, judging whether the page needs to be delayed and corrected according to the attribute of the primitive;
step 108, when the page needs to be delayed and corrected, setting a primitive drawing area on the page as a transparent area;
and 110, performing overprinting calculation on the pixel to be drawn in the transparent area to obtain a pixel dot matrix, performing color correction on the pixel dot matrix, and finally outputting the pixel dot matrix.
The invention provides a setting method of primitive drawing attributes, which comprises the steps of firstly determining whether a page has overprint attributes, ending a subsequent flow when the page does not have the overprint attributes, saving system resources, judging whether a primitive to be drawn is overlapped with a page background when the page has the overprint attributes, if the primitive is overlapped with the page background, indicating that delayed color correction processing is possibly needed, dividing a primitive drawing area of the page into a non-transparent area and a transparent area after the delayed color correction processing is determined, namely, forcing the primitive drawing area meeting the overprint effect into the transparent area, avoiding the primitive color management time when the page is interpreted, forcing the primitive which is the transparent area to be subjected to overprint calculation when the transparency is removed, and carrying out color management when a dot matrix obtained during assembly is the final display color of the primitive. The final output effect of the primitive is obtained first, and then the color correction of the dot matrix level is carried out, so that the change of the color channel number of the primitive before the overprinting is prevented, and the influence on the final overprinting effect is reduced.
Fig. 2 is a flowchart illustrating a method for setting primitive drawing attributes according to another embodiment of the present invention. Wherein, the method comprises the following steps:
step 202, scanning the page, and determining whether the page has an overprint attribute.
Step 204, when the page has the overprint attribute, establishing a resource statistical area table; and carrying out doubling reduction processing on the resource statistical region table.
In step 204 of this embodiment, when it is determined that the page has the overprint attribute, a resource statistics area table is established for providing a basis for determining whether the primitive to be drawn overlaps with the page background. The size of the area table is in direct proportion to the output resolution, and when the output resolution is larger, the area table is necessarily large, so if the resource statistics is carried out when the output resolution is higher or the number of sub-pages is very large, a larger memory is occupied, and the resource statistics area table is subjected to doubling processing.
And step 206, acquiring a primitive to be drawn and judging whether the primitive to be drawn is overlapped with the background of the page.
And 208, when the primitive to be drawn is overlapped with the background of the page, judging whether the page needs to be delayed and corrected according to the attribute of the primitive.
The method for judging whether the page needs to be delayed and corrected according to the attributes of the primitives comprises the step of judging whether the page needs to be delayed and corrected according to the types, the color spaces, the overprint attributes and the like of the primitives, namely whether the page needs to be forced to be a transparent area. The judgment is made according to the rules described in the PDF manual.
And step 210, when delayed color correction needs to be performed on the page, setting a primitive drawing area on the page as a transparent area.
And 212, performing overprinting calculation on the pixel to be drawn in the transparent area to obtain a pixel dot matrix, performing color correction on the pixel dot matrix, and finally outputting the pixel dot matrix.
Fig. 3 is a flowchart illustrating a method for setting primitive drawing attributes according to still another embodiment of the present invention. Wherein, the method comprises the following steps:
step 302, scan the page, determine whether the page has an overprint attribute.
Step 304, when the page has the overprint attribute, partitioning the page according to a first preset height and a first preset width to obtain a first number of page drawing areas; the page is divided into blocks according to a second preset height and a second preset width to obtain a second number of page blocks; recording the page drawing area and the page block to obtain a resource statistical area table; wherein the first number is less than the second number.
In step 304 of this embodiment, when it is determined that the page has the overprint attribute, a resource statistics area table is established for providing a basis for determining whether a primitive to be drawn overlaps with the page background, specifically, the page is first partitioned into a plurality of page drawing areas according to a first preset height and width, for example, the page is partitioned into a plurality of page blocks according to a width × and a height 32 × 16, then the page is partitioned into a plurality of page blocks according to a second preset height and width, for example, the page is partitioned into a plurality of page blocks according to a width × and a height 8 × 8, and the partitioned page drawing areas and page blocks are recorded in the table to form the resource statistics area table, so that 1 bit in the drawing table represents one page drawing area of 32 × 16, 0 represents that the area is not covered by the primitive, and 1 represents that the area is covered by the primitive.
And step 306, setting the height of the resource statistical area table according to a first formula and the width of the resource statistical area table according to a second formula according to the preset multiplying power.
The first formula is (H + H '× D)/H' × D, wherein Y represents the height of the resource statistic region table, H represents the height of the page, H 'represents the first preset height, and D represents the preset multiplying power, and the second formula is (W + W' × D)/W '× D/W', wherein X represents the width of the resource statistic region table, W represents the width of the page, W 'represents the first preset width, and W' represents the second preset width.
In step 306 of this embodiment, the size of the region table is proportional to the output resolution, and when the output resolution is larger, the region table is inevitably large, so if the resource statistics is performed when the output resolution is higher or the number of sub-pages is very large, a larger memory is occupied, and the resource statistics region table is doubled. The magnification is an empirical value, and can be obtained by the formula D ═ max resolution +600.0)/600.0, where max resolution is the maximum resolution of the page. And calculating according to the formula to obtain the height and the width of the resource statistical area table, namely performing doubling processing on the resource statistical area table to reduce the consumption of memory resources.
And 308, acquiring a primitive to be drawn, determining the drawing range of the primitive to be drawn, and determining the corresponding page drawing area of the drawing range in the resource statistical area table.
Step 310, counting the number of page blocks covered by the drawing range in the resource counting area table; if the number of the page blocks covered by the drawing range is larger than the preset number, determining that the primitive to be drawn is overlapped with the background of the page; and if the number of the page blocks covered by the drawing range is less than or equal to the preset number, determining that the primitive to be drawn does not overlap with the background of the page.
In step 308 and step 310 of this embodiment, it is determined whether the primitive to be drawn overlaps the background of the page if the primitive to be drawn overlaps the page in the resource statistics area table by looking up whether the primitive to be drawn covers a certain page or some page drawing areas with an excessive preset number of page blocks, so as to accurately determine whether the primitive to be drawn overlaps the background of the page. The judgment frequency of whether coverage occurs can be set, namely more than one judgment can be carried out to ensure the accuracy of the judgment result.
And step 312, when the primitive to be drawn overlaps the background of the page, judging whether the page needs to be delayed and color-corrected according to the attribute of the primitive.
The method for judging whether the page needs to be delayed and corrected according to the attributes of the primitives comprises the step of judging whether the page needs to be delayed and corrected according to the types, the color spaces, the overprint attributes and the like of the primitives, namely whether the page needs to be forced to be a transparent area. The judgment is made according to the rules described in the PDF manual.
Step 314, when the page needs to be delayed and corrected, setting a primitive drawing area on the page as a transparent area; and performing overprinting calculation on the pixel to be drawn in the transparent area to obtain a pixel dot matrix, performing color correction on the pixel dot matrix, and finally outputting the pixel dot matrix.
In a second aspect of the present invention, a primitive drawing attribute setting system is proposed, and fig. 4 shows a schematic block diagram of a primitive drawing attribute setting system 400 according to an embodiment of the present invention. Among other things, the system 400 includes:
a scanning unit 402, configured to scan a page and determine whether the page has an overprint attribute; a primitive obtaining unit 404, configured to obtain a primitive to be drawn and determine whether the primitive to be drawn overlaps with a background of the page when the page has an overprint attribute; the judging unit 406 is configured to, when a primitive to be drawn overlaps with a background of the page, judge whether to perform delayed color correction on the page according to an attribute of the primitive; the setting unit 408 is configured to set a primitive drawing area on the page as a transparent area when the page needs to be delayed and color corrected; and the processing unit 410 is configured to perform overprinting calculation on the primitive to be drawn in the transparent area to obtain a primitive dot matrix, perform color correction on the primitive dot matrix, and finally output the primitive dot matrix.
The system 400 for setting the primitive drawing attributes provided by the invention firstly determines whether the page has the overprint attributes, ends the subsequent flow when the page does not have the overprint attributes, saves system resources, judges whether the primitive to be drawn is overlapped with the page background when the overprint attributes exist, if the primitive to be drawn is overlapped with the page background, the delay color correction processing is possibly required, divides the primitive drawing area of the page into a non-transparent area and a transparent area after the delay color correction processing is determined, namely, the primitive drawing area meeting the overprint effect is forced to be the transparent area, the time for managing the primitive colors when the page is explained is avoided, the primitive forced to be the transparent area is subjected to overprint calculation when the transparency is removed, and the obtained dot matrix is the final display color when the dot matrix is assembled, and then the color management is carried out. The final output effect of the primitive is obtained first, and then the color correction of the dot matrix level is carried out, so that the change of the color channel number of the primitive before the overprinting is prevented, and the influence on the final overprinting effect is reduced.
Fig. 5 shows a schematic block diagram of a primitive rendering attribute setup system 500 according to another embodiment of the present invention. Among other things, the system 500 includes:
a scanning unit 502, configured to scan a page and determine whether the page has an overprint attribute;
an establishing unit 504, configured to establish a resource statistics area table when the page has the overprint attribute; and carrying out reduction processing on the resource statistical area table;
the establishing unit 504 specifically includes: the blocking unit 542 is configured to block the page according to a first preset height and a first preset width to obtain a first number of page drawing areas; partitioning the page according to a second preset height and a second preset width to obtain a second number of page blocks; an establishing unit 504, specifically configured to record a page drawing area and a page block, so as to obtain a resource statistics area table; wherein the first number is less than the second number;
the establishing unit 504 is further configured to set a height of the resource statistics area table according to a first formula and a width of the resource statistics area table according to a second formula, where the first formula is Y ═ H '× D)/H' × D, where Y denotes the height of the resource statistics area table, H denotes the height of the page, H 'denotes the first preset height, and D denotes a preset magnification, and the second formula is X ═ W' × D)/W '× D/W ", where X denotes the width of the resource statistics area table, W denotes the width of the page, W' denotes the first preset width, and W ″ denotes the second preset width;
a primitive obtaining unit 506, configured to obtain a primitive to be drawn and determine whether the primitive to be drawn overlaps with a background of the page; the system comprises a resource statistical area table, a drawing range table and a drawing area table, wherein the resource statistical area table is used for storing a resource statistical area table;
the primitive obtaining unit 506 includes: a counting unit 562, configured to count the number of page blocks covered by the drawing range in the resource counting area table; a determining unit 564, configured to determine that a primitive to be drawn overlaps with a background of the page if the number of page blocks covered by the drawing range is greater than a preset number; if the number of the page blocks covered by the drawing range is less than or equal to the preset number, determining that the primitive to be drawn does not overlap with the background of the page;
a judging unit 508, configured to judge whether to perform delayed color correction on the page according to an attribute of the primitive when the primitive to be drawn overlaps with the background of the page;
a setting unit 510, configured to set a primitive drawing area on a page as a transparent area when delayed color correction needs to be performed on the page;
and the processing unit 512 is configured to perform overprinting calculation on the primitive to be drawn in the transparent area to obtain a primitive dot matrix, perform color correction on the primitive dot matrix, and finally output the primitive dot matrix.
Specifically, the page is partitioned according to a first preset height and width, for example, the page is partitioned into a plurality of page drawing areas according to a width × and a height 32 × 16, and then the page is partitioned again according to a second preset height and width, for example, the page is partitioned into a plurality of page blocks according to a width × and a height 8 × 8, and the partitioned page drawing areas and page blocks are recorded in the table to form the resource statistical area table, so that 1 bit in the drawing table represents one page drawing area of 32 × 16, 0 represents that the area is not covered by the graphics primitive, and 1 represents that the area is covered by the graphics primitive.
The size of the area table is in direct proportion to the output resolution, and when the output resolution is larger, the area table is necessarily large, so if the resource statistics is carried out when the output resolution is higher or the number of sub-pages is very large, a larger memory is occupied, and the resource statistics area table is subjected to doubling processing. The magnification is an empirical value, and can be obtained by the formula D ═ max resolution +600.0)/600.0, where max resolution is the maximum resolution of the page. And calculating according to the formula to obtain the height and the width of the resource statistical area table, namely performing doubling processing on the resource statistical area table to reduce the consumption of memory resources.
Whether the primitive to be drawn covers a certain page or a certain page drawing area with excessive page blocks of preset quantity is searched in the resource statistical area table, if so, the primitive to be drawn is determined to be overlapped with the background of the page, and whether the primitive to be drawn is overlapped is accurately judged. The judgment frequency of whether coverage occurs can be set, namely more than one judgment can be carried out to ensure the accuracy of the judgment result.
In embodiments of the third aspect of the present invention, a computer device is provided, and fig. 6 shows a schematic block diagram of a computer device 600 according to an embodiment of the present invention. Wherein the computer device 600 comprises:
a memory 602, a processor 604 and a computer program stored on the memory 602 and executable on the processor 604, the processor 604 implementing the steps of the method for setting primitive drawing attributes according to any one of the above when executing the computer program.
In the computer device 600 provided by the present invention, when the processor 604 executes the computer program, it is determined whether the page has the overprint attribute, when the page does not have the overprint attribute, the subsequent process is terminated, the system resources are saved, when the page has the overprint attribute, it is determined whether the primitive to be drawn overlaps with the page background, if the primitive overlaps with the page background, it indicates that the color correction processing may need to be delayed, after the color correction processing needs to be delayed, the primitive drawing area of the page is divided into a non-transparent area and a transparent area, that is, the primitive drawing area satisfying the overprint effect is forced to be the transparent area, the time for managing the primitive color during page interpretation is avoided, when the transparency is removed, the primitive forced to be the transparent area is subjected to the overprint calculation, and the dot matrix obtained during assembly is the final rendering. The final output effect of the primitive is obtained first, and then the color correction of the dot matrix level is carried out, so that the change of the color channel number of the primitive before the overprinting is prevented, and the influence on the final overprinting effect is reduced.
An embodiment of the fourth aspect of the present invention proposes a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the method for setting primitive drawing attributes according to any one of the above.
The computer readable storage medium provided by the invention can be used for determining whether a page has overprint attributes or not when a computer program is executed by a processor, ending a subsequent process when the page does not have the overprint attributes, saving system resources, judging whether a primitive to be drawn is overlapped with a page background or not when the page has the overprint attributes, if the primitive to be drawn is overlapped with the page background, indicating that delayed color correction processing is possibly needed, dividing a primitive drawing area of the page into a non-transparent area and a transparent area after the delayed color correction processing is determined to be needed, namely, forcing the primitive drawing area meeting the overprint effect to be the transparent area, avoiding the time for managing the primitive color when the page is interpreted, forcing the primitive to be the transparent area to perform overprint calculation firstly when the transparency is removed, and obtaining a dot matrix which is the final display color of the primitive when the. The final output effect of the primitive is obtained first, and then the color correction of the dot matrix level is carried out, so that the change of the color channel number of the primitive before the overprinting is prevented, and the influence on the final overprinting effect is reduced.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method for setting primitive drawing attributes, the method comprising:
scanning a page, and judging whether the page has overprint attributes or not;
when the page has the overprint attribute, acquiring a primitive to be drawn and judging whether the primitive to be drawn is overlapped with the background of the page;
when the primitive to be drawn is overlapped with the background of the page, judging whether the page needs to be subjected to delayed color correction according to the attribute of the primitive;
when the page needs to be delayed and corrected, setting a primitive drawing area on the page as a transparent area;
and performing overprinting calculation on the pixel to be drawn in the transparent area to obtain a pixel dot matrix, performing color correction on the pixel dot matrix, and finally outputting the pixel dot matrix.
2. The method for setting primitive drawing attributes according to claim 1, wherein when the page has an overprint attribute, further comprising:
establishing a resource statistical area table;
and carrying out reduction processing on the resource statistical area table.
3. The method for setting the primitive drawing attribute according to claim 2, wherein the step of establishing the resource statistics area table specifically includes:
the page is partitioned according to a first preset height and a first preset width to obtain a first number of page drawing areas;
partitioning the page according to a second preset height and a second preset width to obtain a second number of page blocks;
recording the page drawing area and the page block to obtain the resource statistical area table;
wherein the first number is less than the second number.
4. The method for setting the primitive drawing attribute according to claim 3, wherein the step of obtaining the primitive to be drawn and determining whether the primitive to be drawn overlaps with the background of the page specifically includes:
acquiring the primitive to be drawn, determining the drawing range of the primitive to be drawn, and determining the corresponding page drawing area of the drawing range in the resource statistical area table;
counting the number of the page blocks covered by the drawing range in the resource counting area table;
if the number of the page blocks covered by the drawing range is larger than the preset number, determining that the primitive to be drawn is overlapped with the background of the page;
and if the number of the page blocks covered by the drawing range is less than or equal to the preset number, determining that the primitive to be drawn does not overlap with the background of the page.
5. The method for setting the primitive drawing attribute according to claim 3 or 4, wherein the step of performing the reduction processing on the resource statistics area table specifically includes:
setting the height of the resource statistical area table according to a first formula and the width of the resource statistical area table according to a second formula according to a preset multiplying power;
the first formula is (H + H ' × D)/H ' × D, where Y represents a height of the resource statistics area table, H represents a height of the page, H ' represents the first preset height, and D represents the preset magnification;
the second formula is (W + W ' × D)/W ' × D/W ″, where X represents a width of the resource statistics area table, W represents a width of the page, W ' represents the first preset width, and W ″ represents the second preset width;
the size of the resource statistics area table is proportional to the output resolution.
6. A system for setting primitive drawing attributes, the system comprising:
the scanning unit is used for scanning a page and judging whether the page has overprint attributes or not;
the primitive obtaining unit is used for obtaining a primitive to be drawn and judging whether the primitive to be drawn is overlapped with the background of the page or not when the page has the overprint attribute;
the judging unit is used for judging whether the page needs to be subjected to delayed color correction according to the attribute of the primitive when the primitive to be drawn is overlapped with the background of the page;
the setting unit is used for setting a primitive drawing area on the page as a transparent area when the page needs to be delayed and corrected;
and the processing unit is used for performing overprinting calculation on the pixel to be drawn in the transparent area to obtain a pixel dot matrix, performing color correction on the pixel dot matrix, and finally outputting the pixel dot matrix.
7. The system for setting primitive drawing attributes according to claim 6, further comprising:
the establishing unit is used for establishing a resource statistical area table when the page has the overprint attribute; and carrying out reduction processing on the resource statistical area table.
8. The system for setting primitive drawing attributes according to claim 7, wherein the creating unit includes:
the blocking unit is used for blocking the page according to a first preset height and a first preset width to obtain a first number of page drawing areas; partitioning the page according to a second preset height and a second preset width to obtain a second number of page blocks;
the establishing unit is specifically configured to record the page drawing area and the page block to obtain the resource statistics area table;
wherein the first number is less than the second number.
9. The system for setting primitive drawing attributes according to claim 8,
the primitive obtaining unit is specifically configured to obtain the primitive to be drawn, determine a drawing range of the primitive to be drawn, and determine a page drawing area corresponding to the drawing range in the resource statistics area table;
the primitive obtaining unit includes:
a counting unit, configured to count the number of the page blocks covered by the drawing range in the resource counting area table;
the determining unit is used for determining that the primitive to be drawn is overlapped with the background of the page if the number of the page blocks covered by the drawing range is larger than a preset number; and if the number of the page blocks covered by the drawing range is less than or equal to the preset number, determining that the primitive to be drawn does not overlap with the background of the page.
10. The system for setting primitive drawing attributes according to claim 8 or 9,
the establishing unit is specifically configured to set a height of the resource statistics area table according to a first formula and set a width of the resource statistics area table according to a second formula according to a preset multiplying power;
the first formula is (H + H ' × D)/H ' × D, where Y represents a height of the resource statistics area table, H represents a height of the page, H ' represents the first preset height, and D represents the preset magnification;
the second formula is (W + W ' × D)/W ' × D/W ″, where X represents a width of the resource statistics area table, W represents a width of the page, W ' represents the first preset width, and W ″ represents the second preset width;
the size of the resource statistics area table is proportional to the output resolution.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method for setting primitive drawing properties according to any one of claims 1 to 5 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for setting primitive drawing attributes according to any one of claims 1 to 5.
CN201810081730.7A 2018-01-29 2018-01-29 Method and system for setting primitive drawing attribute, computer equipment and storage medium Active CN110097147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810081730.7A CN110097147B (en) 2018-01-29 2018-01-29 Method and system for setting primitive drawing attribute, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810081730.7A CN110097147B (en) 2018-01-29 2018-01-29 Method and system for setting primitive drawing attribute, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110097147A CN110097147A (en) 2019-08-06
CN110097147B true CN110097147B (en) 2020-07-14

Family

ID=67442632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810081730.7A Active CN110097147B (en) 2018-01-29 2018-01-29 Method and system for setting primitive drawing attribute, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110097147B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111610915A (en) * 2020-05-13 2020-09-01 杭州优稳自动化系统有限公司 Picture track high-frequency drawing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101408989A (en) * 2008-10-17 2009-04-15 北大方正集团有限公司 Method and apparatus for filling primitive base on graphics set split joint
CN101499172A (en) * 2009-03-06 2009-08-05 深圳华为通信技术有限公司 ActiveX drafting method and device
CN103186512A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Rasterization processing method and device for transparent page
CN103186909A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Method and device for improving rasterization speed of transparent image
CN103186648A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Page graphic primitive overprint processing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4763688B2 (en) * 2004-05-05 2011-08-31 コダック グラフィック コミュニケーションズ カナダ カンパニー System and method for color matching overprinted documents
CN1307484C (en) * 2005-01-07 2007-03-28 北京北大方正电子有限公司 Method for color separation page description grey scale grating
GB2526598B (en) * 2014-05-29 2018-11-28 Imagination Tech Ltd Allocation of primitives to primitive blocks
CN106326842B (en) * 2016-08-15 2019-05-24 深圳市茁壮网络股份有限公司 A kind of document text area recognizing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101408989A (en) * 2008-10-17 2009-04-15 北大方正集团有限公司 Method and apparatus for filling primitive base on graphics set split joint
CN101499172A (en) * 2009-03-06 2009-08-05 深圳华为通信技术有限公司 ActiveX drafting method and device
CN103186512A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Rasterization processing method and device for transparent page
CN103186909A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Method and device for improving rasterization speed of transparent image
CN103186648A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Page graphic primitive overprint processing method and device

Also Published As

Publication number Publication date
CN110097147A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
US6020897A (en) Dehalftoning of digital images
DE60108093T2 (en) FORM DATA PROCESSOR
EP0862136B1 (en) Vector map planarization and trapping
JP5066573B2 (en) Lattice type processing method and apparatus for transparent pages
US20070002348A1 (en) Method and apparatus for producing images by using finely optimized image processing parameters
US7379209B1 (en) Color separation of pattern color spaces and form XObjects
DE69621097T2 (en) Printer driver architecture for the reduction of tape storage
US7317543B2 (en) Method of converting a linework data format to the format of a page description language
US8780127B2 (en) Image forming apparatus, method for controlling same, and storage medium
US8237985B2 (en) Softproofing via modeling print engine rendering characteristics
US9158485B2 (en) Image processing device that performs image processing for variable printing and host data generating device
DE69628809T2 (en) Process and system for digital color printing
CN110097147B (en) Method and system for setting primitive drawing attribute, computer equipment and storage medium
JP5023036B2 (en) Profile generation apparatus, profile generation program, profile generation method, image processing apparatus, image processing program, and image processing method
US8139266B2 (en) Color printing control device, color printing control method, and computer readable recording medium stored with color printing control program
JPH07222018A (en) Mapping method
EP0782097A2 (en) Method and system for digital color printing
JP6904717B2 (en) Image processing equipment, its control method, and programs
JP3981779B2 (en) Image processing apparatus, image processing method, and medium on which image processing program is recorded
CN102572203B (en) Compression method and device for latticed page
CN101365043B (en) Spot array stage pixel point color calibrating method and device
US9594535B2 (en) Image processing apparatus for printing object of original image within printable area on print medium, and non-transitory computer-readable medium
US20060061614A1 (en) Image processing apparatus
JP5012871B2 (en) Image processing apparatus, image forming apparatus, and image processing program
CN102096903B (en) Page rasterized character smooth processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220616

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District Cheng Fu Road 298, founder building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240522

Address after: 3007, Hengqin International Financial Center Building, No. 58 Huajin Street, Hengqin New District, Zhuhai City, Guangdong Province, 519030

Patentee after: New founder holdings development Co.,Ltd.

Country or region after: China

Patentee after: BEIJING FOUNDER EASIPRINT CO.,LTD.

Address before: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee before: New founder holdings development Co.,Ltd.

Country or region before: China

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.