JP2018152113A - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP2018152113A
JP2018152113A JP2018095500A JP2018095500A JP2018152113A JP 2018152113 A JP2018152113 A JP 2018152113A JP 2018095500 A JP2018095500 A JP 2018095500A JP 2018095500 A JP2018095500 A JP 2018095500A JP 2018152113 A JP2018152113 A JP 2018152113A
Authority
JP
Japan
Prior art keywords
group
image processing
intermediate data
processing apparatus
synthesis
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
JP2018095500A
Other languages
Japanese (ja)
Other versions
JP6636083B2 (en
Inventor
孝之 一杉
Takayuki Ichisugi
孝之 一杉
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2018095500A priority Critical patent/JP6636083B2/en
Publication of JP2018152113A publication Critical patent/JP2018152113A/en
Application granted granted Critical
Publication of JP6636083B2 publication Critical patent/JP6636083B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of synthesizing group elements so as to finally output color intended by a user even in the case of performing flattening in a middle of a group.SOLUTION: An image processing apparatus for generating a raster image from an inputted drawing instruction includes: intermediate data generation means (200) for generating intermediate data from the drawing instruction; rendering means (201) for rendering the intermediate data to generate the raster image; and synthesis means (202) for cooperating with the intermediate data generation means and the rendering means to synthesize the intermediate data. The image processing apparatus is characterized with that a processing procedure of the synthesis means is switched on the basis of an execution state showing whether the synthesis means has processed up to which object, and a synthesis method of groups in the drawing instruction (S1908 and S1909).SELECTED DRAWING: Figure 19

Description

本発明は、ラスタ画像を生成する画像処理装置、画像処理方法、及びプログラムに関する。特に、本発明は、合成を伴う画像処理に関するものであり、ラスタ画像のレンダリングに好適である。   The present invention relates to an image processing apparatus, an image processing method, and a program for generating a raster image. In particular, the present invention relates to image processing that involves composition, and is suitable for rendering raster images.

レンダリングにおける合成処理とは、前面画像と、背面画像とを合成して該合成結果の画像を形成する処理である。一例として、非特許文献1に記載されたPorter−Duffルールでは、12個の合成演算子を体系化し、透過合成に対応している。別の例として、非特許文献2では、PDF(Portable Document Format)のTransparency Groupsという、連続したオブジェクトの集合をまとめて透過合成する方法を規定している。前記連続したオブジェクトの集合(本明細書では、「グループ」と記載する。)は、別のグループを要素に持つことができる。グループが別のグループを要素に持つとは、グループがネスト構造であることを意味する。本明細書では、グループの要素を「グループ要素」と記載する。   The compositing process in rendering is a process of composing the front image and the back image to form an image of the composite result. As an example, the Porter-Duff rule described in Non-Patent Document 1 systematizes twelve compositing operators and supports transparent composition. As another example, Non-Patent Document 2 defines a method of transparently combining a set of consecutive objects, called Transparency Groups of PDF (Portable Document Format). The set of continuous objects (referred to as “group” in this specification) can have another group as an element. A group having another group as an element means that the group has a nested structure. In this specification, a group element is referred to as a “group element”.

また、レンダリングに関連する技術として、中間データを格納するメモリ領域がオーバーフローしてしまった場合に、該オーバーフロー時点の中間データを一旦レンダリングすることでデータサイズの削減を図る技術が知られている(特許文献1を参照)。この技術のうち特に合成処理によってデータサイズの削減を図ることを、本明細書では、「フラット化」と記載する。   Further, as a technique related to rendering, when a memory area for storing intermediate data overflows, a technique for reducing the data size by temporarily rendering the intermediate data at the time of the overflow is known ( (See Patent Document 1). In this specification, reducing the data size by combining processing among these techniques is referred to as “flattening”.

特開2011−61555号公報JP 2011-61555 A

T.Porter and T.Duff: ”Compositing Digital Images”, Computer Graphics, Vol.18, No.3, ACM 1984.T.A. Porter and T. Duff: “Composing Digital Images”, Computer Graphics, Vol. 18, no. 3, ACM 1984. Adobe Systems: ”Document management − Portable document format − Part 1: PDF 1.7”, ISO 32000−1, 2008.Adobe Systems: "Document management-Portable document format-Part 1: PDF 1.7", ISO 32000-1, 2008.

上述の如く、中間データを格納するメモリ領域がオーバーフローしてしまった場合に、該オーバーフロー時点の中間データを一旦レンダリングすることでデータサイズの削減を図る技術が知られている。しかしながら、グループを有する画像をフラット化する際、本来まとめて合成するべきグループの合成処理においても、段階的に合成処理が行われる場合があり、ユーザーが意図していた色とは異なる色が出力される場合があった。   As described above, when a memory area for storing intermediate data overflows, a technique for reducing the data size by rendering the intermediate data at the time of overflow once is known. However, when flattening images that have groups, the composition processing of groups that should be combined together may be performed step by step, and a color different from the color intended by the user is output. There was a case.

本発明は、上述の課題を解決するための装置を提供することを目的とする。   An object of this invention is to provide the apparatus for solving the above-mentioned subject.

本発明は、入力された描画命令からラスタ画像を生成する画像処理装置であって、前記描画命令から中間データを生成する中間データ生成手段と、前記中間データをレンダリングして前記ラスタ画像を生成するレンダリング手段と、前記中間データ生成手段及び前記レンダリング手段と協働して、前記中間データを合成する合成手段とを備え、前記合成手段がどのオブジェクトまで処理したかを示す実行状況と、前記描画命令におけるグループの合成方法とに基づき、前記合成手段の処理手順を切り替えることを特徴とする。   The present invention is an image processing device that generates a raster image from an input drawing command, and generates intermediate data from the drawing command and intermediate data generating means for generating the raster image by rendering the intermediate data. A rendering unit; a synthesizing unit that synthesizes the intermediate data in cooperation with the intermediate data generating unit and the rendering unit; an execution status indicating to which object the synthesizing unit has processed; and the drawing command The processing procedure of the synthesizing means is switched based on the group synthesizing method.

本発明によれば、グループの途中でフラット化を行った場合であっても、ユーザーが意図していた色が最終的に出力されるようにグループ要素を合成できる。   According to the present invention, even when flattening is performed in the middle of a group, the group elements can be combined so that the color intended by the user is finally output.

実施例1における画像処理装置100の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus 100 in Embodiment 1. FIG. 実施例1における画像処理装置100におけるデータフローを示す図である。3 is a diagram illustrating a data flow in the image processing apparatus 100 according to the first embodiment. FIG. 実施例1における中間データ生成部200により実行される処理のフローチャートである。5 is a flowchart of processing executed by an intermediate data generation unit 200 according to the first embodiment. 実施例1における入力データ203の例を示す図である。6 is a diagram illustrating an example of input data 203 according to the first embodiment. FIG. 実施例1においてオブジェクト及びBackGroundの重なる範囲毎に領域分割した様子を示す図である。FIG. 6 is a diagram illustrating a state in which an area is divided for each overlapping range of an object and a BackGround in the first embodiment. 実施例1における領域リスト600のデータ構造を示す図である。It is a figure which shows the data structure of the area | region list | wrist 600 in Example 1. FIG. 実施例1における合成スタックのデータ構造を示す図である。6 is a diagram illustrating a data structure of a composite stack in Embodiment 1. FIG. 実施例1におけるFillテーブル800の構造を示す図である。It is a figure which shows the structure of the Fill table 800 in Example 1. FIG. 実施例1における合成演算子709の構造を示す図である。6 is a diagram illustrating a structure of a composition operator 709 in Embodiment 1. FIG. 実施例1におけるレンダリング部201によって実行されるラスタ画像生成処理のフローチャートである。6 is a flowchart of raster image generation processing executed by the rendering unit 201 according to the first embodiment. 実施例1におけるフラット化を行わない場合の合成部202によって実行される合成ノード合成処理のフローチャートである。10 is a flowchart of a synthesis node synthesis process executed by the synthesis unit 202 when flattening is not performed in the first embodiment. 実施例1における参照カウント803の更新処理のフローチャートである。6 is a flowchart of a reference count 803 update process according to the first embodiment. 実施例1におけるグループの例を示す図である。6 is a diagram illustrating an example of a group in Embodiment 1. FIG. 実施例1においてグループがある場合の中間データ205(特に合成スタック)の例を示す図である。FIG. 6 is a diagram illustrating an example of intermediate data 205 (particularly a composite stack) when there is a group in the first embodiment. 実施例1におけるフラット化を行わない場合のグループ処理のフローチャートである。6 is a flowchart of group processing when flattening is not performed in the first embodiment. 実施例1においてグループノードがグループスタートであるときの合成スタック等の様子を表した図である。FIG. 5 is a diagram illustrating a state of a composite stack or the like when a group node is a group start in the first embodiment. 実施例1においてグループノードがグループエンドであるときの合成スタック等の様子を表した図である。FIG. 6 is a diagram illustrating a state of a composite stack and the like when a group node is a group end in the first embodiment. 実施例1においてグループの途中でフラット化を行う場合の中間データ205(特に合成スタック)の例を示す図である。FIG. 10 is a diagram illustrating an example of intermediate data 205 (particularly a composite stack) when flattening is performed in the middle of a group in the first embodiment. 実施例1においてフラット化を行う場合のグループ処理のフローチャートである。6 is a flowchart of group processing when flattening is performed in the first embodiment. 実施例1においてフラット化を行う場合の合成部202によって実行される合成ノード合成処理のフローチャートである。10 is a flowchart of a synthesis node synthesis process executed by the synthesis unit 202 when flattening is performed in the first embodiment. 実施例1においてフラット化を行っているときの合成スタック等の様子を表した図である。It is a figure showing the appearance of a synthetic stack etc. when performing flattening in Example 1. 実施例1においてフラット化を行った後の合成スタック等の様子を表した図である。It is a figure showing the appearance of a synthetic stack after flattening in Example 1.

以下に、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

[実施例1]
(画像処理装置100の構成)
図1は、実施例1における画像処理装置100の構成を示すブロック図である。画像処理装置は、入力部101と、解釈部102と、ラスタ画像処理部103と、出力部104とから成る。入力部101は、画像処理装置100に接続されている外部装置から入力データを受け取る。解釈部102は、入力部101で受け取った入力データを解釈して描画命令を抽出し、背面から前面への描画順に描画命令をソートする。実施例1における入力データはPDL(Page Description Language)で記述されたPDLデータである。入力データの好適なフォーマットは非特許文献2に記載のPDFであり、好適な描画命令は該PDFのオブジェクトである。ラスタ画像処理部103は、解釈部102により抽出された描画命令に基づきラスタ画像を生成する。出力部104は、ラスタ画像処理部103により生成されたラスタ画像に対して、ハーフトーン処理等の画像処理を施して出力データを生成し、該生成した出力データを出力する。
[Example 1]
(Configuration of the image processing apparatus 100)
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus 100 according to the first embodiment. The image processing apparatus includes an input unit 101, an interpretation unit 102, a raster image processing unit 103, and an output unit 104. The input unit 101 receives input data from an external device connected to the image processing apparatus 100. The interpretation unit 102 interprets the input data received by the input unit 101, extracts drawing commands, and sorts the drawing commands in the drawing order from the back to the front. The input data in the first embodiment is PDL data described in PDL (Page Description Language). A preferred format of the input data is a PDF described in Non-Patent Document 2, and a suitable drawing command is an object of the PDF. The raster image processing unit 103 generates a raster image based on the drawing command extracted by the interpretation unit 102. The output unit 104 performs image processing such as halftone processing on the raster image generated by the raster image processing unit 103 to generate output data, and outputs the generated output data.

なお、実施例1における画像処理装置100は、MFP(Multi Function Printer)であり、出力部104は、記録紙に印刷を行うことで出力データを出力する。入力部101と、解釈部102と、ラスタ画像処理部103と、出力部104とは、各種プログラムをRAM(Random Access Memory)にロードし、ロードしたプログラムをCPUが実行することで実現される。また、ラスタ画像処理部103は、CPUではなくラスタ画像を生成するためのASIC(Application Specific Integrated Circuit)で実現されてもよい。   The image processing apparatus 100 according to the first exemplary embodiment is an MFP (Multi Function Printer), and the output unit 104 outputs output data by printing on a recording sheet. The input unit 101, the interpretation unit 102, the raster image processing unit 103, and the output unit 104 are realized by loading various programs into a RAM (Random Access Memory) and executing the loaded programs by the CPU. Further, the raster image processing unit 103 may be realized by an ASIC (Application Specific Integrated Circuit) for generating a raster image instead of the CPU.

(画像処理装置100におけるデータフロー)
図2は、画像処理装置100におけるデータフローを示す図である。ラスタ画像処理部103は、中間データ生成部200と、レンダリング部201と、合成部202とから成る。中間データ生成部200は、描画命令204から中間データ205を生成する。レンダリング部201は、中間データ205をレンダリングしてラスタ画像206を生成する。中間データ生成部200及びレンダリング部201は、夫々の処理において、合成部202を用いて中間データの合成処理を行う。
(Data flow in the image processing apparatus 100)
FIG. 2 is a diagram illustrating a data flow in the image processing apparatus 100. The raster image processing unit 103 includes an intermediate data generation unit 200, a rendering unit 201, and a synthesis unit 202. The intermediate data generation unit 200 generates intermediate data 205 from the drawing command 204. The rendering unit 201 renders the intermediate data 205 to generate a raster image 206. The intermediate data generation unit 200 and the rendering unit 201 perform intermediate data combining processing using the combining unit 202 in each process.

(中間データ生成部200における処理)
図3は、中間データ生成部200により実行される処理のフローチャートである。ステップS300(以降、「ステップS300」を「S300」と略記し、他のステップも同様に略記する。)で、中間データ205のデータサイズが予め定めた閾値以上であるか否かを判断する。中間データ205のデータサイズが閾値以上であると判断した場合、S301で、合成部202を用いて中間データ205を合成し、フラット化したラスタ画像を新たな描画命令にする。中間データ205のデータサイズが閾値以上ではないと判断した場合、又は、S301で中間データ205を合成すると、次にS302で、描画命令204のうち1つを取り出す。次いで、S303で該取り出した描画命令からオブジェクトの描画座標を計算し、S304でオブジェクトのFill情報を生成する。このオブジェクトの描画座標の計算では、ページ座標系から出力座標系への変換を行う。また、オブジェクトがベクタ形式であれば、オブジェクトの輪郭の座標を出力座標系で求める。次いで、S305で、オブジェクトの座標情報及びFill情報に基づき中間データを更新する。ここで未だ中間データを生成していなかった場合には、中間データを新規生成する。次いで、S306で、描画命令204を全て取り出したか否かを判断する。描画命令204を全て取り出していないと判断した場合、S300に戻る。描画命令204を全て取り出していると判断した場合、処理を終了する。
(Processing in the intermediate data generation unit 200)
FIG. 3 is a flowchart of processing executed by the intermediate data generation unit 200. In step S300 (hereinafter, “step S300” is abbreviated as “S300”, and other steps are also abbreviated in the same manner), it is determined whether or not the data size of the intermediate data 205 is equal to or larger than a predetermined threshold value. If it is determined that the data size of the intermediate data 205 is greater than or equal to the threshold value, in step S301, the intermediate data 205 is combined using the combining unit 202, and the flattened raster image is used as a new drawing command. If it is determined that the data size of the intermediate data 205 is not equal to or greater than the threshold value, or if the intermediate data 205 is combined in S301, then in S302, one of the drawing commands 204 is extracted. Next, the drawing coordinates of the object are calculated from the extracted drawing command in S303, and the Fill information of the object is generated in S304. In the calculation of the drawing coordinates of this object, conversion from the page coordinate system to the output coordinate system is performed. If the object is a vector format, the coordinates of the contour of the object are obtained in the output coordinate system. In step S305, the intermediate data is updated based on the object coordinate information and the fill information. If intermediate data has not yet been generated, new intermediate data is generated. In step S306, it is determined whether all drawing commands 204 have been extracted. If it is determined that all drawing commands 204 have not been extracted, the process returns to S300. If it is determined that all the drawing commands 204 have been extracted, the process is terminated.

(中間データ)
以下、中間データ205を詳細に説明する。
(Intermediate data)
Hereinafter, the intermediate data 205 will be described in detail.

図4は、入力データ203の例を示す図であり、図4(a)が立体関係を表す斜視図であり、図4(b)が断面図であり、図4(c)が上面図である。この例では、オブジェクト400〜402と、BackGround403とが重なっている。中間データ205では、オブジェクト及びBackGroundの重なる範囲毎に、領域に分割する。   4 is a diagram showing an example of the input data 203, FIG. 4 (a) is a perspective view showing a three-dimensional relationship, FIG. 4 (b) is a sectional view, and FIG. 4 (c) is a top view. is there. In this example, the objects 400 to 402 overlap with the BackGround 403. The intermediate data 205 is divided into areas for each overlapping range of the object and BackGround.

図5は、中間データ205において領域に分割した様子を示す図である。上面図5(a)を参照すると、領域500〜504の5つの領域に分割していることが分かる。例えば、領域500は、オブジェクト400と、オブジェクト401と、BackGround403との重なりから成る領域である。図5(b)は、領域500〜504の夫々が、どのオブジェクト及びBackGroundの重なりから成るかを表している。   FIG. 5 is a diagram illustrating a state where the intermediate data 205 is divided into regions. Referring to the top view 5 (a), it can be seen that the region is divided into five regions 500-504. For example, the area 500 is an area formed by overlapping the object 400, the object 401, and the BackGround 403. FIG. 5B shows which objects and BackGround overlap each of the areas 500 to 504.

以下、中間データ205のデータ構造を説明する。   Hereinafter, the data structure of the intermediate data 205 will be described.

図6は、領域リスト600のデータ構造を示す図である。領域リスト600は、前記分割した領域に関する情報を管理するデータであり、夫々の領域に対応する該情報をリスト構造で繋げている。好適な実施形態では、入力データ203の1ページにつき、1つの領域リスト600が存在する。図6の領域リスト600では、領域500〜504に対応する前記情報をリスト構造で繋げている。前記情報は、描画座標601と、合成スタックポインタ602とから構成される。描画座標601は、出力座標系のXY座標(左上を原点とする)で示され、好適な実施形態では、領域における、Y座標の最大値と最小値、及び、各Y座標でのX座標の最大値と最小値によって表現される。合成スタックポインタ602は、合成スタックを参照するために用いられるデータである。好適な実施形態では、領域リスト600に含まれる情報は、描画座標601のY座標の最小値に従って昇順ソートされる。   FIG. 6 is a diagram showing the data structure of the area list 600. The area list 600 is data for managing information on the divided areas, and the information corresponding to each area is connected in a list structure. In the preferred embodiment, there is one region list 600 per page of input data 203. In the area list 600 of FIG. 6, the information corresponding to the areas 500 to 504 is connected in a list structure. The information includes drawing coordinates 601 and a composite stack pointer 602. The drawing coordinates 601 are indicated by XY coordinates (the upper left is the origin) of the output coordinate system, and in a preferred embodiment, the maximum and minimum values of the Y coordinates in the region, and the X coordinates at each Y coordinate. Expressed by maximum and minimum values. The composite stack pointer 602 is data used to refer to the composite stack. In the preferred embodiment, the information contained in the region list 600 is sorted in ascending order according to the minimum Y coordinate of the drawing coordinates 601.

図7は、合成スタックのデータ構造を示す図である。合成スタックは、重なりに関する情報を管理するデータであり、分割後の1つの領域につき、1つの合成スタックが存在する。例えば、合成スタック700は領域500に対応する合成スタックであり、領域500に対応する合成スタックポインタ602から参照される。   FIG. 7 shows the data structure of the composite stack. The composite stack is data for managing information related to overlap, and there is one composite stack for each divided area. For example, the composite stack 700 is a composite stack corresponding to the area 500 and is referred to from the composite stack pointer 602 corresponding to the area 500.

さらに、合成スタックは、合成ノードをスタック要素として持つ、スタック構造になっている。合成ノードは夫々、重なっているオブジェクト又はBackGroundに対応する情報を持つデータである。例えば、合成スタック700は、3つの合成ノード705〜707を持つ。合成ノード705はオブジェクト400、合成ノード706はオブジェクト401、合成ノード707はBackGround403に夫々対応している。なお、合成ノードはオブジェクト及びBackGroundの重なる順序でスタックに積まれ、背面側がスタックのトップになる(即ち、最も背面側にある合成ノードが最後に積まれる)。また、夫々の合成スタックには、必ず1つ以上の合成ノードが存在する。   Furthermore, the composite stack has a stack structure having composite nodes as stack elements. Each composite node is data having information corresponding to an overlapping object or BackGround. For example, the synthesis stack 700 has three synthesis nodes 705 to 707. The composition node 705 corresponds to the object 400, the composition node 706 corresponds to the object 401, and the composition node 707 corresponds to the BackGround 403. Note that the composite node is stacked on the stack in the order in which the object and BackGound overlap, and the back side is the top of the stack (that is, the composite node on the back side is stacked last). Each composition stack always has one or more composition nodes.

合成ノードは、Fill識別子708と、合成演算子709とから構成される。Fill識別子708は、Fillテーブル800内のFill識別子801と結び付いている。図8は、Fillテーブル800の構造を示す図である。Fillテーブル800は、Fill識別子801と、Fill情報802と、参照カウント803との3つの列項目から成る。Fill情報802は、オブジェクト及びBackGroundの色のデータであり、例えば単色のRGB値、グラデーション、画像データ等である。参照カウント803は、いくつの合成ノードから参照されているかをカウントした値である。   The composition node is composed of a Fill identifier 708 and a composition operator 709. The Fill identifier 708 is associated with the Fill identifier 801 in the Fill table 800. FIG. 8 is a diagram showing the structure of the fill table 800. The fill table 800 includes three column items, a fill identifier 801, fill information 802, and a reference count 803. The Fill information 802 is data of an object and BackGround color, and is, for example, a monochrome RGB value, gradation, image data, or the like. The reference count 803 is a value obtained by counting how many synthesis nodes are referenced.

合成演算子709は、夫々の重なりにおいてどのような合成を行うかを指定する演算子である。図7では合成演算子709を「OP」と表記しているが、合成演算子709の具体的な内部構造については図9に示している。図9(a)で示すように、合成演算子709は、色演算子901と、透過演算子902と、透明度903とから成る。色演算子901は、合成結果の色をどのように計算するかを指定する。透過演算子902は、合成結果の透明度をどのように計算するかを指定する。透明度903は、オブジェクト又はBackGroundの透過の程度を表す。好適な実施形態では、色演算子901及び透過演算子902は、非特許文献1のCompositing Operators又は非特許文献2のPDFのブレンドモードで指定される。透明度903は、0〜1の範囲の何れかの値を取り、0は完全な透明、1は不透明(透過無し)を意味する。図9(b)において、合成ノード705〜707の合成演算子709の例を、合成演算子904〜906として夫々示している。なお、合成演算子906のように、最背面の合成ノードに対しては、色演算子901及び透過演算子902を指定しなくてよい。   The composition operator 709 is an operator that specifies what composition is performed in each overlap. In FIG. 7, the composition operator 709 is represented as “OP”, but the specific internal structure of the composition operator 709 is shown in FIG. 9. As shown in FIG. 9A, the composition operator 709 includes a color operator 901, a transmission operator 902, and a transparency 903. A color operator 901 specifies how to calculate the color of the synthesis result. The transparency operator 902 specifies how to calculate the transparency of the synthesis result. Transparency 903 represents the degree of transparency of the object or BackGround. In a preferred embodiment, the color operator 901 and the transparency operator 902 are specified in the Non-Patent Document 1 Composing Operators or the Non-Patent Document 2 PDF blend mode. The transparency 903 takes any value in the range of 0 to 1, with 0 being completely transparent and 1 being opaque (no transmission). In FIG. 9B, examples of the composition operator 709 of the composition nodes 705 to 707 are shown as composition operators 904 to 906, respectively. Note that the color operator 901 and the transparency operator 902 need not be specified for the backmost composite node, such as the composite operator 906.

(ラスタ画像生成処理)
以下、レンダリング部201が中間データ205をレンダリングしてラスタ画像206を生成する処理を説明する。
(Raster image generation processing)
Hereinafter, a process in which the rendering unit 201 generates the raster image 206 by rendering the intermediate data 205 will be described.

図10は、レンダリング部201によって実行されるラスタ画像生成処理のフローチャートである。まずS1000で、スキャンラインを1つ選択する。好適な実施形態では、ページ原点を通るスキャンラインから主走査方向の順序で選択していく。次いで、S1001に進む。S1001で、スキャンライン上にある領域の情報を、領域リスト600から取得する。次いで、S1002に進む。S1002で、取得した情報に含まれる合成スタックポインタ602が参照する、合成スタックを取得する。次いで、S1003に進む。S1003で、取得した合成スタックに含まれる合成ノードを、合成部202を用いて合成する。S1003での合成が終了すると、合成スタックには合成ノードが1つだけ残っている。次いで、S1004に進む。S1004で、前記1つだけ残っている合成ノードに対応するFill情報802に従い、出力先のメモリアドレスに書き込むことでラスタ画像を生成する。ここで、合成ノードに対応するFill情報802は、Fill識別子708と一致するものをFill識別子801の項目の中からサーチすることでFillテーブル800から取得できる。合成ノードに対応するFill情報802に従って書き込むとき、例えばFill情報802が単色の色値であれば、該色値をそのまま書き込む。また、例えばFill情報802が画像データであれば、該画像データに対する出力解像度への拡縮処理を行い、当該拡縮処理後にクリッピング処理を施してから書き込む。次いで、S1005に進む。S1005で、スキャンライン上にある全ての領域の情報を、取得したか否かを判断する。判断の結果、取得していない場合、S1001に戻り、取得した場合、S1006に進む。S1006で、全てのスキャンラインを選択したか否かを判断する。判断の結果、全てのスキャンラインを選択していない場合、S1000に戻り、全てのスキャンラインを選択した場合、処理を終了する。   FIG. 10 is a flowchart of raster image generation processing executed by the rendering unit 201. First, in S1000, one scan line is selected. In the preferred embodiment, selection is made in the order of the main scanning direction from the scan line passing through the page origin. Next, the process proceeds to S1001. In step S <b> 1001, information on the area on the scan line is acquired from the area list 600. Next, the process proceeds to S1002. In S1002, a composite stack referenced by the composite stack pointer 602 included in the acquired information is acquired. Next, the process proceeds to S1003. In step S <b> 1003, the synthesis node included in the obtained synthesis stack is synthesized using the synthesis unit 202. When the composition in S1003 is completed, only one composition node remains in the composition stack. Next, the process proceeds to S1004. In S1004, a raster image is generated by writing to the memory address of the output destination in accordance with the Fill information 802 corresponding to the only one remaining synthesis node. Here, the Fill information 802 corresponding to the composite node can be acquired from the Fill table 800 by searching the items of the Fill identifier 801 for information that matches the Fill identifier 708. When writing according to the Fill information 802 corresponding to the composition node, for example, if the Fill information 802 is a single color value, the color value is written as it is. For example, if the Fill information 802 is image data, the image data is subjected to enlargement / reduction processing to the output resolution, and after the enlargement / reduction processing, clipping processing is performed before writing. Next, the process proceeds to S1005. In step S1005, it is determined whether information on all the regions on the scan line has been acquired. As a result of the determination, if not acquired, the process returns to S1001, and if acquired, the process proceeds to S1006. In step S1006, it is determined whether all scan lines have been selected. If all the scan lines have not been selected as a result of the determination, the process returns to S1000, and if all the scan lines have been selected, the process ends.

(ラスタ画像生成処理−合成ノード合成処理)
図11は、S1003で合成部202を使って合成スタックに含まれる合成ノードを合成する処理のフローチャートである。なお、スタックにおけるpushとpopの操作は、当該スタックのトップに存在するノードに対して行われるものとする。また、一時データへのデータ格納は上書きで行われるものとする。まずS1100で、合成スタックに合成ノードが2つ以上あるか否かを判断する。判断の結果、合成スタックに合成ノードが2つ以上ある場合、S1101に進み、合成スタックに合成ノードが2つ以上ない場合、処理を終了する。S1101で、合成スタックから合成ノードをpopして、一時データDestとして格納する。次いで、S1102に進む。S1102で、さらに合成スタックから合成ノードをpopして、一時データSrcとして格納する。次いで、S1103に進む。S1103で、一時データSrcがグループノードか否かを判断する(グループノードについては後で詳しく説明する)。判断の結果、Srcがグループノードである場合、S1104に進み、そうでない場合、S1105に進む。ここではグループノードが存在しないものとして説明する(S1103→S1105)。Srcがグループノードでない場合、S1105で、SrcとDestとの合成演算子709に従って、SrcとDestとの合成結果を計算して、該計算結果を一時データResとして格納する。次いで、S1106に進む。S1106で、Srcとして格納された合成ノードに対する参照カウント803を更新する。次いで、S1107に進む。S1107で、Destとして格納された合成ノードに対する参照カウント803を更新する。次いで、S1108に進む。S1108で、Resとして格納されたノードのFill情報がFillテーブル800にあるか否かを判断する。判断の結果、Resして格納されたノードのFill情報がFillテーブル800にある場合、S1110に進み、Resして格納されたノードのFill情報がFillテーブル800にない場合、S1109に進む。S1109で、Resとして格納されたノードに対応するFill識別子と、Fill情報と、参照カウントとを、Fillテーブル800に追加する。次いで、S1110に進む。S1110で、Resとして格納された合成ノードを合成スタックにpushする。次いで、S1100に戻る。S1100で、合成スタックに合成ノードが2つ以上ないと判断された場合、即ち、合成スタックに合成ノードが1つだけ残っている場合に、処理を終了する。処理を終了する際に、Src、Dest、Resとして格納されていた一時データは破棄される。
(Raster image generation process-Composite node composite process)
FIG. 11 is a flowchart of a process for synthesizing the synthesis nodes included in the synthesis stack using the synthesis unit 202 in S1003. It should be noted that the push and pop operations in the stack are performed on the node existing at the top of the stack. In addition, data storage to temporary data is performed by overwriting. First, in S1100, it is determined whether or not there are two or more composite nodes in the composite stack. As a result of the determination, if there are two or more composite nodes in the composite stack, the process proceeds to S1101, and if there are no two composite nodes in the composite stack, the process ends. In S1101, a composite node is popped from the composite stack and stored as temporary data Dest. Next, the process proceeds to S1102. In S1102, the composite node is further popped from the composite stack and stored as temporary data Src. Next, the process proceeds to S1103. In S1103, it is determined whether or not the temporary data Src is a group node (the group node will be described in detail later). As a result of the determination, if Src is a group node, the process proceeds to S1104; otherwise, the process proceeds to S1105. Here, it is assumed that there is no group node (S1103 → S1105). If Src is not a group node, in S1105, the combined result of Src and Dest is calculated according to the combined operator 709 of Src and Dest, and the calculated result is stored as temporary data Res. Next, the process proceeds to S1106. In S1106, the reference count 803 for the composite node stored as Src is updated. Next, the process proceeds to S1107. In step S1107, the reference count 803 for the composite node stored as Dest is updated. Next, the process proceeds to S1108. In step S1108, it is determined whether or not the fill information of the node stored as Res exists in the fill table 800. As a result of the determination, if the Fill information of the node stored as Res is in the Fill table 800, the process proceeds to S1110. If the Fill information of the node stored as Res is not in the Fill table 800, the process proceeds to S1109. In S 1109, the Fill identifier, the Fill information, and the reference count corresponding to the node stored as Res are added to the Fill table 800. Next, the process proceeds to S1110. In step S1110, the composite node stored as Res is pushed into the composite stack. Next, the process returns to S1100. If it is determined in S1100 that there are no two or more composite nodes in the composite stack, that is, if only one composite node remains in the composite stack, the process ends. When the process ends, the temporary data stored as Src, Dest, Res is discarded.

(ラスタ画像生成処理−合成ノード合成処理−参照カウント更新処理)
図12は、S1106及びS1107における、参照カウント803の更新処理のフローチャートである。まずS1200で、対応する参照カウント803を1つ減らす。次いで、S1201に進む。S1201で、参照カウントが0になったか否かを判断する。判断の結果、参照カウントが0になった場合、S1202に進み、参照カウントが0になっていない場合、処理を終了する。S1202で、対応するFill識別子801と、Fill情報802と、参照カウント803との項目を、Fillテーブル800から行ごと削除し、処理を終了する。
(Raster image generation process-Composite node composite process-Reference count update process)
FIG. 12 is a flowchart of the update processing of the reference count 803 in S1106 and S1107. First, in S1200, the corresponding reference count 803 is decreased by one. Next, the process proceeds to S1201. In step S1201, it is determined whether the reference count has become zero. If the reference count is 0 as a result of the determination, the process proceeds to S1202, and if the reference count is not 0, the process is terminated. In step S1202, the corresponding items of the fill identifier 801, the fill information 802, and the reference count 803 are deleted from the fill table 800 for each row, and the process ends.

(グループの説明)
以下、グループについて説明する。
(Group description)
Hereinafter, the group will be described.

図13は、グループの例を示す図であり、図13(a)は斜視図であり、図13(b)は断面図である。この例では、BackGround1303の上の3つのオブジェクト1300〜1302がグループ1304を構成するグループ要素になっている。   FIG. 13 is a diagram illustrating an example of a group, FIG. 13A is a perspective view, and FIG. 13B is a cross-sectional view. In this example, three objects 1300 to 1302 on the BackGround 1303 are group elements constituting the group 1304.

図14は、図13の例における、合成スタックの構造を示す図である。グループ要素は、グループスタート(Grp Start)及びグループエンド(Grp End)という特殊な合成ノード(本明細書では「グループノード」と呼ぶ)に挟まれる。このとき、グループスタートが背面(合成スタックのトップ)側、グループエンドが前面(合成スタックのボトム)側になる。グループスタートは、グループ演算子Grp OPとセットになっており、グループ演算子はグループの合成方法を指定している。実施例1におけるグループの合成方法は、IsolatedかNon−Isolatedか、及び、KnockoutかNon−Knockoutかによる計4(=2×2)通りの方法を想定している。夫々の合成方法については、非特許文献2のPDFのTransparency Groupsで既定されている。   FIG. 14 is a diagram showing the structure of the composite stack in the example of FIG. The group element is sandwiched between special composite nodes (referred to herein as “group nodes”) called group start (Grp Start) and group end (Grp End). At this time, the group start is on the back (top of the composite stack) side, and the group end is on the front (bottom of the composite stack) side. The group start is set with the group operator Grp OP, and the group operator designates a group synthesis method. The group synthesis method in the first embodiment assumes a total of 4 (= 2 × 2) methods depending on whether it is Isolated or Non-Isolated, and Knockout or Non-Knockout. The respective synthesis methods are defined in the PDF Transparency Groups of Non-Patent Document 2.

(ラスタ画像生成処理−合成ノード合成処理−グループノード処理)
図11のS1103でSrcがグループノードであると判断した場合、S1104でグループノードを処理して、S1100に戻る。図15は、S1104の詳細なフローチャートである。まずS1500で、グループノードがグループスタートであるか否かを判断する。判断の結果、グループノードがグループスタートである場合、S1501に進み、グループノードがグループスタートではない(即ち、グループノードがグループエンドである)場合、S1507に進む。S1501で、グループ演算子を参照して合成方法がKnockoutであるか否かを判断する。判断の結果、合成方法がKnockoutである場合、S1502に進み、合成方法がKnockoutではない場合、S1503に進む。S1502で、グループの最前面以外のグループ要素を削除する。次いで、S1503に進む。S1503で、グループ演算子を参照して合成方法がIsolatedであるか否かを判断する。判断の結果、合成方法がIsolatedである場合、S1504に進み、合成方法がIsolatedではない場合、S1505に進む。S1504で、完全に透明な合成ノードを作成し、合成スタックにpushする。次いで、S1506に進む。一方、S1503の判断の結果、合成方法がIsolatedではない場合、S1505で、Destのコピーの合成ノードを作成し、合成スタックにpushする。次いで、S1506に進む。S1504又はS1505で、合成スタックに合成ノードをpushすると、続いてS1506で、Destをグループスタックという一時スタックにpushして、処理を終了する。なお、グループスタックは初期状態で空である。S1500で、グループノードがグループスタートではない(即ち、グループノードがグループエンドである)と判断した場合、S1507で、Destを合成スタックにpushする。次いで、S1508に進む。S1508で、グループスタックから合成ノードをpopして、該popした合成ノードを合成スタックにpushして、処理を終了する。
(Raster image generation process-Composite node composite process-Group node process)
If it is determined in S1103 in FIG. 11 that Src is a group node, the group node is processed in S1104, and the process returns to S1100. FIG. 15 is a detailed flowchart of S1104. First, in S1500, it is determined whether or not the group node is a group start. As a result of the determination, if the group node is a group start, the process proceeds to S1501. If the group node is not a group start (that is, the group node is a group end), the process proceeds to S1507. In S1501, it is determined whether or not the synthesis method is Knockout with reference to the group operator. As a result of the determination, if the combining method is Knockout, the process proceeds to S1502, and if the combining method is not Knockout, the process proceeds to S1503. In step S1502, group elements other than the forefront of the group are deleted. Next, the process proceeds to S1503. In step S1503, it is determined whether the synthesis method is Isolated with reference to the group operator. As a result of the determination, if the combining method is Isolated, the process proceeds to S1504, and if the combining method is not Isolated, the process proceeds to S1505. In S1504, a completely transparent composition node is created and pushed to the composition stack. Next, the process proceeds to S1506. On the other hand, if the result of determination in S1503 is that the composition method is not Isolated, a composite node for a copy of Dest is created and pushed to the composition stack in S1505. Next, the process proceeds to S1506. In step S1504 or S1505, when a composite node is pushed to the composite stack, in step S1506, Dest is pushed to a temporary stack called a group stack, and the process ends. The group stack is empty in the initial state. If it is determined in S1500 that the group node is not a group start (that is, the group node is a group end), Dest is pushed to the composite stack in S1507. Next, the process proceeds to S1508. In step S1508, the composite node is popped from the group stack, the popped composite node is pushed to the composite stack, and the process ends.

図16は、図15のフローチャートにおいて、グループノードがグループスタートであるときの合成スタック等の様子を表した図である。図16では、図の左から右へ処理が流れる様子を示している。図16の例ではグループの合成方法がKnockoutかつIsolatedの場合を想定している。グループの合成方法がKnockoutであるため、グループの最前面以外のグループ要素である、合成ノード1601と合成ノード1602とは削除される。また、グループの合成方法がIsolatedであるため、完全に透明な合成ノードである、合成ノード1603が合成スタックにpushされる。さらに、Destとして格納された合成ノード1604はグループスタックにpushされる(S1500→S1501→S1502→S1503→S1504→S1506)。   FIG. 16 is a diagram showing the state of the composite stack and the like when the group node is a group start in the flowchart of FIG. FIG. 16 shows a state in which processing flows from the left to the right in the figure. In the example of FIG. 16, it is assumed that the group combining method is Knockout and Isolated. Since the group combining method is Knockout, the combination node 1601 and the combination node 1602 which are group elements other than the forefront of the group are deleted. Since the group composition method is Isolated, a composition node 1603, which is a completely transparent composition node, is pushed to the composition stack. Further, the composite node 1604 stored as Dest is pushed to the group stack (S1500 → S1501 → S1502 → S1503 → S1504 → S1506).

図17は、図16の続きでグループノードがグループスタートでない(即ち、グループノードがグループエンドである)ときの合成スタック等の様子を表した図である。図17も、図16と同様に図の左から右へ処理が流れる様子を示している。合成ノード1600と、合成ノード1603とは、図11で示したフローチャートに沿って合成されており、図17を参照すると、該合成結果である合成ノード1700が合成スタックに積まれている。なお、その合成の際に、Srcとして格納されていたグループスタートは上書きされて消えている。合成ノード1700はDestにpopされた後、Srcがグループエンドであるため、再度合成スタックにpushされる。そして、グループスタックに積まれていた合成ノード1604が、グループスタックからpopされて、合成スタックにpushされる(S1101→S1102→S1103→S1104,S1500→S1507→S1508)。   FIG. 17 is a continuation of FIG. 16 and shows the state of the composite stack and the like when the group node is not the group start (that is, the group node is the group end). FIG. 17 also shows a state in which processing flows from the left to the right in the figure as in FIG. The synthesis node 1600 and the synthesis node 1603 are synthesized according to the flowchart shown in FIG. 11, and referring to FIG. 17, the synthesis node 1700 as the synthesis result is stacked on the synthesis stack. At the time of the synthesis, the group start stored as Src is overwritten and disappears. After the synthesis node 1700 is popped to Dest, since Src is a group end, it is pushed to the synthesis stack again. Then, the synthesis node 1604 loaded in the group stack is popped from the group stack and pushed into the synthesis stack (S1101 → S1102 → S1103 → S1104, S1500 → S1507 → S1508).

後の合成処理は、図11で示した通りである。これまでに説明した処理フローによって、フラット化を行う場合を除いて、一連の合成処理が実現される。   The subsequent synthesis process is as shown in FIG. A series of composition processing is realized by the processing flow described so far, except when flattening is performed.

(フラット化)
以下、フラット化について説明する。
(Flattened)
Hereinafter, flattening will be described.

上(「中間データ生成部200の処理」の章)で説明した通り、図3のS300で、中間データ205のデータサイズが閾値以上と判断した場合、合成部202を用いてフラット化を行う。フラット化とはS300の判断時点の中間データ205である合成ノードを合成する処理であり、実施例1においては参照されなくなったFill情報802の項目等をFillテーブル800から行ごと削除することで、データサイズの削減を実現する。   As described above (Chapter “Processing of Intermediate Data Generating Unit 200”), if it is determined in S300 of FIG. 3 that the data size of the intermediate data 205 is equal to or larger than the threshold, flattening is performed using the synthesizing unit 202. Flattening is a process of compositing a composite node that is the intermediate data 205 at the time of determination in S300. By deleting items of the Fill information 802 that are no longer referred to in the first embodiment from the Fill table 800, Realize data size reduction.

フラット化は、グループの途中までしか中間データ205を生成していないときでも、行われる可能性がある。図18は、グループの途中でフラット化を行う場合の中間データ205(特に合成スタック)の例を示す図である。図18(a)の例では、グループ1800のグループ要素に、3つのオブジェクト1801〜1803がある。ここで、オブジェクト1802まで中間データ205を生成した直後にフラット化が行われる場合、オブジェクト1801がどのようなオブジェクトであり、どのように重なるかは該生成した直後の時点では不明である。図18(b)は、前記時点での中間データ205の合成スタックを示す図である。グループの途中までしか中間データ205を生成していないときにフラット化が行われた状況であっても最終的に意図していた色が出力されるように合成する方法について、以下説明する。   Flattening may be performed even when the intermediate data 205 is generated only halfway through the group. FIG. 18 is a diagram illustrating an example of intermediate data 205 (particularly, a composite stack) when flattening is performed in the middle of a group. In the example of FIG. 18A, there are three objects 1801 to 1803 in the group element of the group 1800. Here, when flattening is performed immediately after the generation of the intermediate data 205 up to the object 1802, what kind of object the object 1801 is and how it overlaps is unknown at the time immediately after the generation. FIG. 18B is a diagram showing a composite stack of the intermediate data 205 at the time point. A method of synthesizing so that the final intended color is output even when flattening is performed when the intermediate data 205 is generated only halfway through the group will be described below.

図19は、フラット化を行う場合のグループ処理のフローチャートである。図19に示すフローに応じてグループ処理の方法が決定される。S1900〜S1906は、フラット化を行わない場合(図15)と同様である。しかし、S1907で、Src(即ちグループスタート)もグループスタックにpushする点で、図15と異なる。   FIG. 19 is a flowchart of group processing when flattening is performed. The group processing method is determined according to the flow shown in FIG. S1900 to S1906 are the same as when flattening is not performed (FIG. 15). However, in S1907, Src (that is, group start) is also pushed to the group stack, which is different from FIG.

ここで図20に、フラット化を行う場合の合成部202によって実行される合成ノード合成処理のフローチャートを示す。S2000〜S2010は、フラット化を行わない場合(図11)と同様である。ただし、S2000で、合成ノードが2つ以上ないと判断した場合、S2011でグループスタックが空か否かを判断する点で図11と異なる。S2011における判断の結果、グループスタックが空である場合、処理を終了し、グループスタックが空ではない場合、S2012に進む。グループスタックが空ではない場合とは、グループの途中までしか中間データ205を生成していない状態で、フラット化を行っていることを意味する。このとき、S2012で、グループスタックから合成ノードをpopして、Destとして格納する。次いで、S2013に進む。S2013で、Destがグループスタートであるか否かを判断する。判断の結果、Destがグループスタートである場合、S2014に進み、Destがグループスタートではない場合、S2015に進む。S2014で、Destをグループリスタートという特殊な合成ノードに変更する。なお、グループリスタートもグループノードの1つである。グループリスタートもグループ演算子とセットになっており、該セットになっているグループ演算子はグループスタートのときと同じグループ演算子にしておく。次いで、S2015に進む。S2015で、Destを合成スタックにpushする。次いで、S2011に戻る。   Here, FIG. 20 shows a flowchart of a synthesis node synthesis process executed by the synthesis unit 202 when flattening is performed. S2000 to S2010 are the same as when flattening is not performed (FIG. 11). However, when it is determined in S2000 that there are not two or more composite nodes, it differs from FIG. 11 in that it is determined in S2011 whether the group stack is empty. As a result of the determination in S2011, if the group stack is empty, the process ends. If the group stack is not empty, the process proceeds to S2012. The case where the group stack is not empty means that flattening is performed in a state where the intermediate data 205 is generated only halfway through the group. At this time, in S2012, the composite node is popped from the group stack and stored as Dest. Next, the process proceeds to S2013. In S2013, it is determined whether Dest is a group start. As a result of the determination, if Dest is a group start, the process proceeds to S2014. If Dest is not a group start, the process proceeds to S2015. In S2014, Dest is changed to a special composition node called group restart. Group restart is one of the group nodes. The group restart is also a set with the group operator, and the group operator in the set is set to the same group operator as the group start. Next, the process proceeds to S2015. In step S2015, Dest is pushed to the synthesis stack. Next, the process returns to S2011.

図19の説明に戻る。S1900で、グループノードがグループスタートではないと判断した場合、S1908に進む。S1908で、グループノードがグループリスタートであるか否かを判断する。判断の結果、グループノードがグループリスタートである場合、S1909に進む。S1909で、グループ要素が2つ以上であり、かつ、合成方法がKnockoutであるか否かを判断する。判断の結果、グループ要素が2つ以上であり、かつ、合成方法がKnockoutである場合、S1902に進む。そうでない場合、S1906に進む。S1908及びS1909の処理分岐により、必要な場合にのみ、IsolatedかNon−Isolatedかに応じて分けられる合成ノード(完全に透明もしくはDestのコピー)を、合成スタックにpushしている。S1908でグループノードがグループリスタートではない(即ち、グループノードがグループエンドである)と判断した場合、S1910に進む。ここで、S1910及びS1912は、フラット化を行わない場合の処理(図15のS1507及びS1508)と同様である。但し、S1911において、グループスタックのトップに積まれている、グループスタートをpopして破棄している点で、図15と異なる。   Returning to the description of FIG. If it is determined in S1900 that the group node is not a group start, the process advances to S1908. In step S1908, it is determined whether the group node is a group restart. As a result of the determination, if the group node is a group restart, the process proceeds to S1909. In S1909, it is determined whether there are two or more group elements and the combining method is Knockout. As a result of the determination, if there are two or more group elements and the combining method is Knockout, the process proceeds to S1902. Otherwise, the process proceeds to S1906. By the processing branching of S1908 and S1909, only when necessary, a synthesis node (completely transparent or a copy of Dest) divided according to whether it is Isolated or Non-Isolated is pushed to the synthesis stack. If it is determined in S1908 that the group node is not a group restart (that is, the group node is a group end), the process proceeds to S1910. Here, S1910 and S1912 are the same as the processes when flattening is not performed (S1507 and S1508 in FIG. 15). However, in S1911, it is different from FIG. 15 in that the group start that is stacked at the top of the group stack is popped and discarded.

図21は、図19及び図20のフローチャートにおいて、フラット化を行っているときの合成スタック等の様子を表した図である。この例では、グループの合成方法がKnockoutかつIsolatedの場合を想定している。グループの合成方法がKnockoutであるため、グループの最前面以外のグループ要素である、合成ノード2101は削除される(S1901→S1902)。また、グループの合成方法がIsolatedであるため、完全に透明な合成ノードである、合成ノード2102が合成スタックにpushされる(S1903→S1904)。さらに、Destとして格納された合成ノード2103と、Srcとして格納されたグループスタート2104とがグループスタックにpushされる(S1906→S1907)。その後、合成ノード2100と、合成ノード2102とが合成されて、該合成結果の合成ノード2105が合成スタックにpushされる(S2000→・・・→S2010)。これにより、合成スタックに合成ノードが1つだけになるため、グループスタック内の全ての要素が合成スタックにpushされる。このとき、グループスタート2104はグループリスタート2106に変更される(S2000→S2011→S2012→S2013→S2014→S2015)。   FIG. 21 is a diagram showing a state of a composite stack and the like when flattening is performed in the flowcharts of FIGS. 19 and 20. In this example, it is assumed that the group combining method is Knockout and Isolated. Since the group combining method is Knockout, the combining node 2101 that is a group element other than the forefront of the group is deleted (S1901 → S1902). Since the group composition method is Isolated, the composition node 2102 which is a completely transparent composition node is pushed to the composition stack (S1903 → S1904). Further, the composition node 2103 stored as Dest and the group start 2104 stored as Src are pushed to the group stack (S1906 → S1907). Thereafter, the synthesis node 2100 and the synthesis node 2102 are synthesized, and the synthesis node 2105 as a result of the synthesis is pushed into the synthesis stack (S2000 →... → S2010). As a result, since there is only one composite node in the composite stack, all elements in the group stack are pushed into the composite stack. At this time, the group start 2104 is changed to the group restart 2106 (S2000 → S2011 → S2012 → S2013 → S2014 → S2015).

図22は、図21の続きで中間データ205の生成が完了し、レンダリング部201で合成処理を行うときの合成スタック等の様子を表した図である。中間データ205の生成が完了しているため、合成スタックにグループエンド2200と、合成ノード2201とが積まれている。グループ要素が2つ以上かつグループの合成方法がKnockoutであるため、グループの最前面以外のグループ要素である、合成ノード2105は削除される(S1908→S1909→S1902)。さらに、グループの合成方法がIsolatedであるため、完全に透明な合成ノードである、合成ノード2102が再び合成スタックにpushされる(S1903→S1904)。そして、Destとして格納された合成ノード2103と、Srcとして格納されたグループリスタート2106とがグループスタックにpushされる(S1906→S1907)。その後、合成ノード2201と、合成ノード2102とが合成されて、該合成結果の合成ノード2203が合成スタックにpushされる(S2000→・・・→S2010)。グループエンド2200に到達すると、Destとして格納された合成ノード2203と、グループスタック内の合成ノード2103とが合成スタックにpushされる(S1910,S1912)。このとき、グループスタック内のグループリスタート2106は、グループスタックからpopされて破棄される(S1911)。   FIG. 22 is a diagram showing the state of the synthesis stack and the like when the generation of the intermediate data 205 is completed following the process of FIG. 21 and the rendering unit 201 performs the synthesis process. Since the generation of the intermediate data 205 has been completed, the group end 2200 and the synthesis node 2201 are stacked on the synthesis stack. Since there are two or more group elements and the group combining method is Knockout, the combining node 2105 which is a group element other than the forefront of the group is deleted (S1908 → S1909 → S1902). Further, since the group composition method is Isolated, the composition node 2102, which is a completely transparent composition node, is pushed again into the composition stack (S 1903 → S 1904). Then, the composite node 2103 stored as Dest and the group restart 2106 stored as Src are pushed to the group stack (S1906 → S1907). Thereafter, the synthesis node 2201 and the synthesis node 2102 are synthesized, and the synthesis node 2203 as a result of the synthesis is pushed into the synthesis stack (S2000 →... → S2010). When the group end 2200 is reached, the synthesis node 2203 stored as Dest and the synthesis node 2103 in the group stack are pushed into the synthesis stack (S1910, S1912). At this time, the group restart 2106 in the group stack is popped from the group stack and discarded (S1911).

以上説明したようにフラット化の実行状況と、グループの合成方法とに応じて合成処理手順を切り替えることで、グループの途中でフラット化を行った場合であっても、最終的に意図していた色が出力されるように合成できる。   As described above, even if flattening is performed in the middle of a group by switching the compositing process procedure according to the execution status of flattening and the group compositing method, it was finally intended It can be combined so that colors are output.

[実施例2]
グループの合成方法がIsolatedのときに、合成処理を行う色空間をグループ演算子で指定するようにしてもよい。
[Example 2]
When the group composition method is Isolated, a color space for performing composition processing may be designated by a group operator.

なお、図19及び図20で説明したフローチャートは、フラット化を行わない場合であっても意図していた色が出力されるように合成できるため、フラット化を行わない場合にも共通して、これらのフローチャートの合成処理を用いてよい。   In addition, since the flowchart demonstrated in FIG.19 and FIG.20 can be synthesize | combined so that the color which was intended even if it is a case where flattening is not performed, also in the case where flattening is not performed, You may use the synthetic | combination process of these flowcharts.

[その他の実施例]
本発明の目的は、前述した実施例の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体を、システム又は装置に供給し、システム又は装置(具体的にはCPUやMPU)がプログラムコードを読み出し実行することによっても、達成される。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施例の機能を実現することとなり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
[Other Examples]
An object of the present invention is to supply a storage medium storing software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and the system or apparatus (specifically, CPU or MPU) stores the program code. This can also be achieved by executing read. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.

プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROM、DVD等を用いることが出来る。   As a storage medium for supplying the program code, for example, a flexible disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, DVD, or the like is used. I can do it.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施例の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOSが実際の処理の一部又は全部を行っても良い。OSの処理によって前述した実施例の機能が実現される場合も、本発明の範囲に含まれる。   In addition, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also the OS running on the computer performs one of the actual processing based on the instruction of the program code. Part or all may be performed. The case where the functions of the above-described embodiments are realized by the processing of the OS is also included in the scope of the present invention.

更に、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、処理が実行されても良い。また、機能拡張ボードや機能拡張ユニットに備わるCPUが実際の処理の一部又は全部を実行しても良く、機能拡張ボードや機能拡張ユニットに備わるCPUの実行処理によって前述した実施例の機能が実現される場合も、本発明の範囲に含まれる。   Furthermore, the program code read from the storage medium is written in the memory provided in the function expansion board inserted into the computer or the function expansion unit connected to the computer, and then the process is executed based on the instruction of the program code. May be. In addition, the CPU provided in the function expansion board or function expansion unit may execute part or all of the actual processing, and the functions of the above-described embodiments are realized by the execution processing of the CPU provided in the function expansion board or function expansion unit. Such cases are also included in the scope of the present invention.

また、前述の実施例の機能を実現するためのプログラムコードを、1つのコンピュータ(CPU、MPU)で実行しても良いし、複数のコンピュータが協働することによって実行しても良い。更に、プログラムコードをコンピュータが実行しても良いし、プログラムコードの機能を実現するための回路等のハードウェアを設けても良い。または、プログラムコードの一部をハードウェアで実現し、残りの部分をコンピュータが実行しても良い。   Further, the program code for realizing the functions of the above-described embodiments may be executed by one computer (CPU, MPU) or may be executed by cooperation of a plurality of computers. Further, the program code may be executed by a computer, or hardware such as a circuit for realizing the function of the program code may be provided. Alternatively, a part of the program code may be realized by hardware and the remaining part may be executed by a computer.

Claims (12)

入力された描画命令からラスタ画像を生成する画像処理装置であって、
前記描画命令から中間データを生成する中間データ生成手段と、
前記中間データをレンダリングして前記ラスタ画像を生成するレンダリング手段と、
前記中間データ生成手段及び前記レンダリング手段と協働して、前記中間データを合成する合成手段と
を備え、
前記合成手段がどのオブジェクトまで処理したかを示す実行状況と、前記描画命令におけるグループの合成方法とに基づき、前記合成手段の処理手順を切り替えることを特徴とする画像処理装置。
An image processing apparatus that generates a raster image from an input drawing command,
Intermediate data generating means for generating intermediate data from the drawing command;
Rendering means for rendering the intermediate data to generate the raster image;
A synthesizing unit for synthesizing the intermediate data in cooperation with the intermediate data generating unit and the rendering unit;
An image processing apparatus, wherein the processing procedure of the combining means is switched based on an execution status indicating to which object the combining means has processed and a group combining method in the drawing command.
前記生成したラスタ画像を出力する出力手段を更に備えることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising output means for outputting the generated raster image. 前記実行状況は、前記中間データ生成手段が前記合成手段を実行しているか否か、または、前記中間データ生成手段が前記合成手段を実行したか否かを示すことを特徴とする請求項1又は2に記載の画像処理装置。   The execution status indicates whether or not the intermediate data generation means is executing the synthesis means, or whether or not the intermediate data generation means is executing the synthesis means. 2. The image processing apparatus according to 2. 前記グループの合成方法は、Knockoutか否かに基づき決定されることを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the group combining method is determined based on whether or not Knockout is performed. 前記グループの合成方法は、Isolatedか否かに基づき決定されることを特徴とする請求項1乃至4の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the group combining method is determined based on whether or not the group is isolated. 前記グループの合成方法は、前記グループの要素が複数か否かに基づき決定されることを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the group combining method is determined based on whether or not there are a plurality of elements in the group. 前記合成手段は、前記グループの合成方法がKnockoutか否かの判断及び前記グループの要素が複数か否かの判断に基づき、前記グループの合成方法がIsolatedか否かという判断を行うか否かを切り替えることを特徴とする請求項6に記載の画像処理装置。   The combining means determines whether or not to determine whether or not the group combining method is Isolated based on determination of whether or not the group combining method is Knockout and whether or not the group includes a plurality of elements. The image processing apparatus according to claim 6, wherein the image processing apparatus is switched. 前記合成手段によって、一時データとして記憶される前記グループに関する情報は、前記処理手順の切り替えによって、前記グループ1つに対して1つしか増えないことを特徴とする請求項1乃至7の何れか一項に記載の画像処理装置。   The information relating to the group stored as temporary data by the synthesizing unit is increased only by one for the group by switching the processing procedure. The image processing apparatus according to item. 前記描画命令はPDLデータから抽出され、前記PDLデータは、PDFで表現されることを特徴とする請求項1乃至8の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the drawing command is extracted from PDL data, and the PDL data is expressed in PDF. 前記グループの合成方法がIsolatedのときに、合成処理を行う色空間が指定されることを特徴とする請求項5に記載の画像処理装置。   6. The image processing apparatus according to claim 5, wherein when the group composition method is Isolated, a color space for performing composition processing is designated. 入力された描画命令からラスタ画像を生成する画像処理方法であって、
前記描画命令から中間データを生成する中間データ生成ステップと、
前記中間データをレンダリングして前記ラスタ画像を生成するレンダリングステップと、
前記中間データ生成ステップ及び前記レンダリングステップにおいて、前記中間データを合成する合成ステップと
を備え、
前記合成ステップにおいてどのオブジェクトまで処理したかを示す実行状況と、前記データにおけるグループの合成方法とに基づき、前記合成ステップにおける処理手順を切り替えることを特徴とする画像処理方法。
An image processing method for generating a raster image from an input drawing command,
An intermediate data generation step of generating intermediate data from the drawing command;
A rendering step of rendering the intermediate data to generate the raster image;
A synthesis step of synthesizing the intermediate data in the intermediate data generation step and the rendering step;
An image processing method, wherein the processing procedure in the synthesis step is switched based on an execution status indicating which object has been processed in the synthesis step and a group synthesis method in the data.
コンピュータを、請求項1乃至10の何れか一項に記載の画像処理装置として機能させるための、プログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 10.
JP2018095500A 2018-05-17 2018-05-17 Image processing apparatus, control method, and program Active JP6636083B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018095500A JP6636083B2 (en) 2018-05-17 2018-05-17 Image processing apparatus, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018095500A JP6636083B2 (en) 2018-05-17 2018-05-17 Image processing apparatus, control method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014079721A Division JP6341732B2 (en) 2014-04-08 2014-04-08 Printing apparatus, printing method, and program

Publications (2)

Publication Number Publication Date
JP2018152113A true JP2018152113A (en) 2018-09-27
JP6636083B2 JP6636083B2 (en) 2020-01-29

Family

ID=63680438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018095500A Active JP6636083B2 (en) 2018-05-17 2018-05-17 Image processing apparatus, control method, and program

Country Status (1)

Country Link
JP (1) JP6636083B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11405520B2 (en) 2020-01-24 2022-08-02 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium for generating intermediate data based on print data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11405520B2 (en) 2020-01-24 2022-08-02 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium for generating intermediate data based on print data
US11637944B2 (en) 2020-01-24 2023-04-25 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium for generating intermediate data based on print data

Also Published As

Publication number Publication date
JP6636083B2 (en) 2020-01-29

Similar Documents

Publication Publication Date Title
JP4365950B2 (en) Graphic object processing method and apparatus for high-speed raster format rendering
US8207972B2 (en) Quick pixel rendering processing
EP2905705A1 (en) Client server interaction for graphical/audio applications
JP4343344B2 (en) A high-speed image rendering method using raster graphic objects
US7593012B2 (en) Graphics image generation method, program and statistical data drawing apparatus
JP2004318832A (en) Reducing method of number of compositing operations performed in pixel sequential rendering system
US8869051B2 (en) Systems and methods for using separate editing applications from within electronic content creation applications while preventing data loss
JP2008033692A (en) Image processing device and its control method, and, computer program and computer readable storage medium
JP7213616B2 (en) Information processing device, information processing program, and information processing method.
JP6636083B2 (en) Image processing apparatus, control method, and program
JPH01304588A (en) Clipping processing system
CN108090943A (en) Render the methods, devices and systems of curve
JP6341732B2 (en) Printing apparatus, printing method, and program
JP4646436B2 (en) Digital image processing device
JP4827659B2 (en) Image processing apparatus, image processing method, and computer program
JP4143613B2 (en) Drawing method and drawing apparatus
US7365743B1 (en) Assignments for parallel rasterization
CN109145263B (en) Document processing method and device and computer readable storage medium
KR20160011326A (en) Electronic sheet music editing system and providing method thereof
US7061494B1 (en) Method and apparatus for hardware optimization of graphics pipeline functions
US11410357B2 (en) Pixel-based techniques for combining vector graphics shapes
JP4479957B2 (en) Curved surface subdivision device
US10387757B2 (en) Multicore printer definition language processing
Halladay et al. Your First Shaders
JP2023166265A (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180618

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190610

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190618

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190814

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191119

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191217

R151 Written notification of patent or utility model registration

Ref document number: 6636083

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151