[go: up one dir, main page]

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

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

Info

Publication number
JP5033747B2
JP5033747B2 JP2008251315A JP2008251315A JP5033747B2 JP 5033747 B2 JP5033747 B2 JP 5033747B2 JP 2008251315 A JP2008251315 A JP 2008251315A JP 2008251315 A JP2008251315 A JP 2008251315A JP 5033747 B2 JP5033747 B2 JP 5033747B2
Authority
JP
Japan
Prior art keywords
canvas
image processing
determined
transparency
page
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.)
Expired - Fee Related
Application number
JP2008251315A
Other languages
Japanese (ja)
Other versions
JP2010086044A (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.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Document Solutions 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 Kyocera Document Solutions Inc filed Critical Kyocera Document Solutions Inc
Priority to JP2008251315A priority Critical patent/JP5033747B2/en
Priority to US12/586,748 priority patent/US8314951B2/en
Publication of JP2010086044A publication Critical patent/JP2010086044A/en
Application granted granted Critical
Publication of JP5033747B2 publication Critical patent/JP5033747B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Generation (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

透明度属性を有する描画オブジェクトと、該描画オブジェクトを描画する土台であり透明度属性を有するキャンバスとを表記可能であるページ記述言語をビットマップ変換する際に、該ビットマップ変換処理を高速に処理可能とし、かつメモリの利用効率を高める技術に関するものである。   When bitmap conversion is performed on a page description language that can represent a drawing object having a transparency attribute and a canvas that has a transparency attribute as a basis for drawing the drawing object, the bitmap conversion processing can be performed at high speed. In addition, the present invention relates to a technology for increasing the memory utilization efficiency.

XPS等のXML拡張形式で記述されたページ記述言語においては、透明度属性を有した描画オブジェクト(パスやフォントやイメージ等)及び前記描画オブジェクトの描画の土台となる透明度属性を有したキャンバスが複数層重なって存在させることが可能であり、これらが複数層重なった描画オブジェクト及びキャンバスの透明度属性の合成処理(アルファブレンド演算処理)を行う際には、該キャンバスの層毎に前記アルファブレンド演算処理のためのメモリの確保と、該アルファブレンド演算処理が必要となる。しかし、前記キャンバスによっては、透明度属性が不透明か又は完全に透明である場合もあり、その場合には、該透明度属性が不透明のキャンバスの色値でその下層のキャンバスや描画オブジェクトが覆われてしまうか、又は該当明度属性が透明の場合には透過してしまうので、アルファブレンド演算処理を行う必要は無く、また、そのためのメモリをキャンバスの層毎に保持する必要も無い。   In a page description language described in an XML extended format such as XPS, a drawing object having a transparency attribute (path, font, image, etc.) and a plurality of canvases having a transparency attribute as a basis for drawing the drawing object It is possible to overlap, and when performing the blending process (alpha blending computation process) of the drawing object and the canvas transparency attribute, which are a plurality of layers, the alpha blending computation process is performed for each layer of the canvas. For this reason, it is necessary to secure a memory and to perform the alpha blend calculation process. However, depending on the canvas, the transparency attribute may be opaque or completely transparent, in which case the underlying canvas or drawing object is covered with the color value of the canvas whose transparency attribute is opaque. Or, if the brightness attribute is transparent, it is transparent, so there is no need to perform an alpha blend operation process, and there is no need to store a memory for each layer of the canvas.

従来技術として、アルファブレンド演算処理の前にデバイスの色域に圧縮するか、デバイスの色域に圧縮してからアルファブレンド処理を行うかによって、レンダリング結果が異なるため、カラーマッチング手段によりどちらが適正化を判断して、より適切な方法を選択する方法があった(特許文献1参照)。   As a conventional technology, the rendering results differ depending on whether the device is compressed to the device color gamut before the alpha blend calculation processing or the device color gamut and then the alpha blend processing is performed. There is a method of determining a more appropriate method (see Patent Document 1).

しかし、この方法でも前記した透明度属性が不透明又は透明なキャンバスが存在する場合に、メモリの効率化と処理の高速化を実現することはできなかった。
特開2006−345197号公報 XML Paper Specification, XPS Specification and Reference Guide Version 1.0
However, even in this method, when there is a canvas with the above-described transparency attribute being opaque or transparent, it has not been possible to improve the memory efficiency and the processing speed.
JP 2006-345197 A XML Paper Specification, XPS Specification and Reference Guide Version 1.0

解決しようとする問題点は、ページ記述言語を中間言語に変換する画像処理を行う画像処理装置、画像処理方法及び画像処理プログラムにおいて、透明度属性を有するキャンバス中に透明度属性が不透明のキャンバスが最初から連続して存在する場合に、描画処理を高速にかつメモリの利用効率を高めて行うことができなかった点である。   The problem to be solved is that, in an image processing apparatus, an image processing method, and an image processing program for performing image processing for converting a page description language into an intermediate language, a canvas having a transparency attribute is opaque from the beginning in a canvas having a transparency attribute. In the case where they exist continuously, the drawing process could not be performed at high speed and with high memory utilization efficiency.

請求項1記載の本発明の画像処理装置は、透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する画像処理装置であって、前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断するキャンバスチェック部と、前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上で透明度属性の合成であるアルファブレンド演算を行って描画する描画部とを有することを最も主要な特徴とする。ここで、キャンバスとは、XML拡張形式のページ記述言語に記載される描画オブジェクト(パスやフォントやイメージ)を描画する土台となるオブジェクトのことで、透明度を示す透明度値、さらに透明度分布を表す透明度マスク等の透明度属性を有する。また、不透明とはキャンバスの透明度が1.0であることを言う。 An image processing apparatus according to claim 1, wherein a page description language including a drawing object having a transparency attribute and a canvas having a transparency attribute serving as a basis for drawing the drawing object is converted into an image. a is, transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is to continue communication is the continuous canvas is determined that the temporary canvas, otherwise canvas The canvas check unit that determines the actual canvas and the drawing on the canvas determined to be the temporary canvas are directly drawn in the page drawing memory, and the drawing on the canvas determined to be the actual canvas is the transparency on the canvas. The main part is that it has a drawing part that draws by performing alpha blending operation, which is a composition of attributes. And features. Here, the canvas is an object that serves as a basis for drawing objects (paths, fonts, and images) described in the page description language in the XML extension format. The transparency value indicating transparency and the transparency indicating the transparency distribution are also included. It has a transparency attribute such as a mask. Opaque means that the transparency of the canvas is 1.0.

請求項2記載の本発明の画像処理装置は、請求項1の画像処理装置であって、前記ページ記述言語中に前記キャンバスが入れ子構造に記述された場合に、前記ページ記述言語を前記キャンバスの入れ子構造を保ったまま中間言語に変換する中間言語変換部を有し、前記描画部は、前記入れ子構造を保った中間言語に基づいて前記アルファブレンド演算を行うことを主要な特徴とする。   An image processing apparatus according to a second aspect of the present invention is the image processing apparatus according to the first aspect, wherein when the canvas is described in a nested structure in the page description language, the page description language is stored in the canvas. An intermediate language conversion unit that converts to an intermediate language while maintaining a nested structure is provided, and the drawing unit performs the alpha blending operation based on the intermediate language that maintains the nested structure.

請求項3記載の本発明の画像処理装置は、請求項1又は2の画像処理装置であって、前記ページ記述言語がXML(Extended Markup Language)拡張形式により記述されたものであることを主要な特徴とする。   An image processing apparatus according to a third aspect of the present invention is the image processing apparatus according to the first or second aspect, wherein the page description language is described in an XML (Extended Markup Language) extended format. Features.

請求項4記載の本発明の画像処理方法は、透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する画像処理方法であって、前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断し、前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上でアルファブレンド演算を行って描画することを最も主要な特徴とする。
5. The image processing method according to claim 4, wherein a page description language including a drawing object having a transparency attribute and a canvas having a transparency attribute as a basis for drawing the drawing object is converted into an image. a is, transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is to continue communication is the continuous canvas is determined that the temporary canvas, otherwise canvas Is drawn as a temporary canvas, the drawing on the canvas determined as the temporary canvas is directly drawn in the page drawing memory, and the drawing on the canvas determined as the real canvas is performed with an alpha blend operation on the canvas. Drawing is the most important feature.

請求項5記載の本発明の画像処理プログラムは、コンピュータに透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する機能を実現させる画像処理プログラムであって、前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断するキャンバスチェック機能と、前記キャンバスチェック機能により、前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上でアルファブレンド演算を行って描画する描画機能とをコンピュータに実現させることを最も主要な特徴とする。 The image processing program of the present invention according to claim 5 is a function for converting a page description language including a drawing object having a transparency attribute into a computer and a canvas having a transparency attribute as a basis for drawing the drawing object into an image. an image processing program for realizing, transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is to continue communication is the continuous canvas and temporary canvas The canvas check function for determining whether the canvas is not the real canvas, and the drawing on the canvas determined to be the temporary canvas by the canvas check function are directly drawn in the page drawing memory and determined as the actual canvas. Drawing on the canvas is alpha on the canvas. The most important feature that to achieve a drawing function for drawing performing trend calculation in the computer.

請求項1記載の本発明の画像処理装置は、透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する画像処理装置であって、前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断するキャンバスチェック部と、前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上で透明度属性の合成であるアルファブレンド演算を行って描画する描画部とを有することを最も主要な特徴とするため、不透明キャンバスが連続して存在する際には、そのキャンバスごとの処理を行うことを省略し、直接ページ描画メモリへの描画を行うため、画像変換処理が高速化され、メモリの利用効率が高まった。 An image processing apparatus according to claim 1, wherein a page description language including a drawing object having a transparency attribute and a canvas having a transparency attribute serving as a basis for drawing the drawing object is converted into an image. a is, transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is to continue communication is the continuous canvas is determined that the temporary canvas, otherwise canvas The canvas check unit that determines the actual canvas and the drawing on the canvas determined to be the temporary canvas are directly drawn in the page drawing memory, and the drawing on the canvas determined to be the actual canvas is the transparency on the canvas. The main part is that it has a drawing part that draws by performing alpha blending operation, which is a composition of attributes. Therefore, when there are consecutive opaque canvases, the processing for each canvas is omitted, and drawing to the page drawing memory is performed directly. Increased use efficiency.

請求項2記載の本発明の画像処理装置は、請求項1の画像処理装置であって、前記ページ記述言語中に前記キャンバスが入れ子構造に記述された場合に、前記ページ記述言語を前記キャンバスの入れ子構造を保ったまま中間言語に変換する中間言語変換部を有し、前記描画部は、前記入れ子構造を保った中間言語に基づいて前記アルファブレンド演算を行うことを主要な特徴とするため、前記入れ子構造で描かれた中間言語において、連続する不透明のキャンバスの処理を再帰的アルゴリズムにより行うことが可能となった。   An image processing apparatus according to a second aspect of the present invention is the image processing apparatus according to the first aspect, wherein when the canvas is described in a nested structure in the page description language, the page description language is stored in the canvas. Since it has an intermediate language conversion unit that converts to an intermediate language while maintaining a nested structure, the drawing unit is characterized by performing the alpha blending operation based on the intermediate language that maintains the nested structure, In the intermediate language drawn in the nested structure, it is possible to process a continuous opaque canvas by a recursive algorithm.

請求項3記載の本発明の画像処理装置は、請求項1又は2の画像処理装置であって、前記ページ記述言語がXML(Extended Markup Language)拡張形式により記述されたものであることを主要な特徴とするため、XPS(XML Paper Specification)等のページ記述言語において、最初から連続した不透明のキャンバスの処理を高速に行うことが可能となった。   An image processing apparatus according to a third aspect of the present invention is the image processing apparatus according to the first or second aspect, wherein the page description language is described in an XML (Extended Markup Language) extended format. Because of the feature, in a page description language such as XPS (XML Paper Specification), it has become possible to process an opaque canvas that is continuous from the beginning at high speed.

請求項4記載の本発明の画像処理方法は、透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する画像処理方法であって、前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断し、前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上でアルファブレンド演算を行って描画することを最も主要な特徴とするため、不透明キャンバスが連続して存在する際には、そのキャンバスごとの処理を行うことを省略し、直接ページ描画メモリへの描画を行うため、画像変換処理が高速化され、メモリの利用効率が高まった。 5. The image processing method according to claim 4, wherein a page description language including a drawing object having a transparency attribute and a canvas having a transparency attribute as a basis for drawing the drawing object is converted into an image. a is, transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is to continue communication is the continuous canvas is determined that the temporary canvas, otherwise canvas Is drawn as a temporary canvas, the drawing on the canvas determined as the temporary canvas is directly drawn in the page drawing memory, and the drawing on the canvas determined as the real canvas is performed with an alpha blend operation on the canvas. The most important feature is that when there is a continuous opaque canvas, Of omitting to perform the processing for each canvas for drawing directly to the page drawing memory, the image conversion process is faster and increased utilization efficiency of the memory.

請求項4記載の本発明の画像処理方法は、透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する画像処理方法であって、前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断し、前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上でアルファブレンド演算を行って描画することを最も主要な特徴とするため、不透明キャンバスが連続して存在する際には、そのキャンバスごとの処理を行うことを省略し、直接ページ描画メモリへの描画を行うため、画像変換処理が高速化され、メモリの利用効率が高まった。 5. The image processing method according to claim 4, wherein a page description language including a drawing object having a transparency attribute and a canvas having a transparency attribute as a basis for drawing the drawing object is converted into an image. a is, transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is to continue communication is the continuous canvas is determined that the temporary canvas, otherwise canvas Is drawn as a temporary canvas, the drawing on the canvas determined as the temporary canvas is directly drawn in the page drawing memory, and the drawing on the canvas determined as the real canvas is performed with an alpha blend operation on the canvas. The most important feature is that when there is a continuous opaque canvas, Of omitting to perform the processing for each canvas for drawing directly to the page drawing memory, the image conversion process is faster and increased utilization efficiency of the memory.

ページ記述言語を中間言語に変換する画像処理を行う画像処理装置、画像処理方法及び画像処理プログラムにおいて、不透明なキャンバスが最初から連続して存在する際には、そのキャンバスごとに処理を行うのではなく、ページ描画メモリに直接描画することにより、ページ記述言語のビットマップへの変換処理を高速にかつメモリの利用効率を高めて行うことを可能とした。   In an image processing apparatus, an image processing method, and an image processing program for performing image processing for converting a page description language into an intermediate language, when an opaque canvas is continuously present from the beginning, the processing is not performed for each canvas. Instead, by drawing directly in the page drawing memory, it is possible to perform conversion processing to a page description language bitmap at high speed and with high memory utilization efficiency.

本発明の実施例に係る画像処理装置について以下に説明する。   An image processing apparatus according to an embodiment of the present invention will be described below.

[透明度属性の合成;アルファブレンドについて]
アルファブレンドとは、2つのそれぞれに色値を有する画像をある係数により半透明合成することである。この係数をアルファ値といい0.0〜1.0の値をとる。0.0が完全に透明、1.0が完全に不透明な重ね合わせであることを表している。PDF(Portable Document Format)、およびXPS(XML Paper Specification)ドキュメント形式ではパスによる図形や、フォント、イメージ等のオブジェクトに対してアルファ値が設定でき、描画の際に、下地の色とのアルファブレンド(透明度と色値との合成)が可能になっている。
[Synthesis of transparency attributes; alpha blending]
Alpha blending is a semi-transparent composition of two images each having a color value using a certain coefficient. This coefficient is called an alpha value and takes a value of 0.0 to 1.0. 0.0 indicates completely transparent, 1.0 indicates completely opaque overlay. In the PDF (Portable Document Format) and XPS (XML Paper Specification) document formats, alpha values can be set for objects such as path figures, fonts, and images. Synthesis of transparency and color values).

以下にアルファブレンドの透明度の合成処理がどのように行われるかについて、XPSドキュメント形式のデータを例に用いて説明する。   The following explains how alpha blend transparency synthesis processing is performed using XPS document format data as an example.

図1にXPSで表記された透明度属性を持つPathのデータを示し、XPS仕様書1.0(非特許文献1参照)の11.4 Opacity Computationsに記載されているアルファブレンドを厳密に行う場合のステップを以下に示す。
(1):ソース側のアルファ値を求める。ソースのアルファ値にOpacityアトリビュートの値とOpacityMaskの値をかける。
Figure 1 shows the path data with transparency attribute expressed in XPS, and the steps for strictly performing alpha blending described in 11.4 Opacity Computations of XPS specification 1.0 (see Non-Patent Document 1) are as follows: Show.
(1): The alpha value on the source side is obtained. Multiply the alpha value of the source by the value of the Opacity attribute and the value of OpacityMask.

As1 = As * Oe * Om
As :ソースエレメントのアルファ値(図1参照)
Oe :ソースエレメントのOpacity値(図1参照)
Om :描画するピクセル位置のソースエレメントのOpacityMask値(図1参照)
(2):(1)で求まったアルファ値(As1)をソースの色値にかける。この処理をPre-multiply source alphaという。下記に示す式のCsはRGBや、Gray、CMYK等のカレントカラースペースにおけるプレーン毎の値である。
As1 = As * Oe * Om
As: Source element alpha value (see Figure 1)
Oe: Opacity value of the source element (see Fig. 1)
Om: OpacityMask value of the source element at the pixel position to draw (see Figure 1)
(2): The alpha value (As1) obtained in (1) is applied to the source color value. This process is called Pre-multiply source alpha. Cs in the following expression is a value for each plane in the current color space such as RGB, Gray, or CMYK.

Cs_tmp = Cs * As1
Cs :ソースの色値(図1参照)
Cs_tmp :ソース側カラー値のテンポラリ値
(3):デスティネーション側のアルファをデスティネーションの色値にかける。この処理をPre-multiply destination alphaという。下記に示す式のデスティネーションのピクセル色値Cdはソース側と同様に、RGBや、Gray、CMYK等のカレントカラースペースにおけるプレーン毎の値である。
Cs_tmp = Cs * As1
Cs: Source color value (see Figure 1)
Cs_tmp: Temporary value of source side color value (3): Multiply destination side alpha by destination color value. This process is called Pre-multiply destination alpha. The destination pixel color value Cd in the following expression is a value for each plane in the current color space such as RGB, Gray, and CMYK, as in the source side.

Cd_tmp = Cd * Ad
Ad :デスティネーションのアルファ値
Cd :デスティネーションの描画ピクセル位置の色値
Cd_tmp :デスティネーション側カラー値のテンポラリ
(4):ブレンド処理を行う。
Cd_tmp = Cd * Ad
Ad: Alpha value of the destination
Cd: Destination drawing pixel position color value
Cd_tmp: Temporary destination color value (4): Blend processing is performed.

A_tmp = ( 1 - As1 ) * Ad + As1
C_tmp = ( 1 - As1 ) * Cd_tmp + Cs_tmp
A_tmp :(5)のチェック用テンポラリ
C_tmp :(5)のチェック用テンポラリ
(5):デスティネーション結果に書き込む値を求める。この処理をReverse pre-multiplicationという。
A_tmp = (1-As1) * Ad + As1
C_tmp = (1-As1) * Cd_tmp + Cs_tmp
A_tmp: Temporary for checking (5)
C_tmp: Temporary for checking in (5) (5): A value to be written to the destination result is obtained. This process is called Reverse pre-multiplication.

If A_tmp = 0
{
Anew = Cnew = 0
}
Else
{
Anew = A_tmp
Cnew = min(C_tmp / A_tmp, 1)
}
(1)、(2)で現れるパラメータが図1のXPSドキュメント中に現れる(より詳細については非特許文献1を参照)。
If A_tmp = 0
{
Anew = Cnew = 0
}
Else
{
Anew = A_tmp
Cnew = min (C_tmp / A_tmp, 1)
}
The parameters appearing in (1) and (2) appear in the XPS document of FIG. 1 (see Non-Patent Document 1 for more details).

[ページへの描画処理のケース]
ブレンド処理ステップ(3)において、ページへの描画処理では下地は不透明、すなわちAd=1.0ととることができる。この場合は、下記のようにソースの色値とアルファ値、および既にページに書かれているデスティネーションの色値のみでアルファブレンド処理ができる(図2(A)参照)。
[Case of drawing on page]
In the blend processing step (3), the background is opaque in the drawing process on the page, that is, Ad = 1.0. In this case, as described below, the alpha blend process can be performed using only the source color value and alpha value and the destination color value already written on the page (see FIG. 2A).

As1 = As * Oe * Om
Anew = 1.0 (不透明で変化なし)
Cnew = ( 1 - As1 ) Cd + As1 * Cs (単純なアルファブレンドの式として知られている)
[キャンバスに透明度属性がない場合]
ブレンド処理のステップ(3)において、キャンバスへの描画処理では、初期状態において下地は完全な透明、Ad=0.0で色なし、Cd=0.0(RGBなら黒)ととらえることができる。これはガラス板のイメージになる。
As1 = As * Oe * Om
Anew = 1.0 (Opaque and unchanged)
Cnew = (1-As1) Cd + As1 * Cs (known as a simple alpha blend formula)
[If the canvas has no transparency attribute]
In the blend processing step (3), in the drawing process on the canvas, in the initial state, the background is completely transparent, Ad = 0.0, no color, and Cd = 0.0 (RGB if black). This is the image of a glass plate.

As1 = As * Oe * Om
Anew = As1 (アルファの値が累積)
Cnew = Cs (ソースの色値はそのまま)
キャンバス上にまだ何も描画されていない状態で、ブレンド処理ステップに従うと、上記のように、キャンバス上のオブジェクトに透明度が含まれている場合、キャンバス上には、色値、アルファ値がそのまま累積することとなる。これは、キャンバスをページ等の一段下のレイヤーに描画するときに、累積している値がソースアルファ値として影響することを示す。
As1 = As * Oe * Om
Anew = As1 (accumulated alpha value)
Cnew = Cs (the source color value remains the same)
If nothing is drawn on the canvas and the blending step is followed, as shown above, if the object on the canvas contains transparency, the color value and alpha value are accumulated on the canvas as they are. Will be. This indicates that the accumulated value affects the source alpha value when the canvas is drawn on a layer below the page or the like.

しかしながら、キャンバス自体に透明度が設定されていない場合は、出来上がったキャンバスをページ上に描いた結果は、オブジェクトを直接ページに書いた場合と同じとなる(図2(B)参照)。   However, when transparency is not set on the canvas itself, the result of drawing the completed canvas on the page is the same as when the object is directly written on the page (see FIG. 2B).

この場合、図2(B)のようにページとは別のバッファに描画を実行する必要はなく、キャンバスが定義されていないときと同様の処理を行えばよい。   In this case, it is not necessary to perform drawing in a buffer different from the page as shown in FIG. 2B, and the same processing as when the canvas is not defined may be performed.

[キャンバスに透明度属性がある場合]
上述のように、オブジェクトが描画された領域には色値とアルファ値が累積していくが、その他の領域は0.0の完全に透明のまま残る。
[If the canvas has a transparency attribute]
As described above, the color value and the alpha value accumulate in the area where the object is drawn, but the other areas remain completely transparent at 0.0.

キャンバス自体に透明度が設定されている場合の描画方法について、XPS仕様書中に提示される実装方法では、キャンバス上のオブジェクトの描画が終了し、下のレイヤーに書き込む時に、キャンバスエレメントの属性のOpacityとOpacityMaskの値を累積しているアルファ値に適用(結合)する。これはブレンドステップ(1)にあたり、キャンバス自体のOeとOmを累積したアルファ値にかけることを意味する。   Regarding the rendering method when transparency is set on the canvas itself, in the implementation method presented in the XPS specification, when the object drawing on the canvas is finished and written to the lower layer, the Opacity attribute of the canvas element And apply (combine) the values of OpacityMask to the accumulated alpha value. This means that in the blending step (1), Oe and Om of the canvas itself are multiplied by the accumulated alpha value.

また、キャンバス中でオブジェクトが描かれていない領域はOpacity、OpacityMaskが適用されてもアルファ値は0.0で完全に透明な何もかかれない状態で残る。そのため、描画されたオブジェクトの部分にのみ、透明度処理の効果がでる(図3(C)参照)。   In addition, even if Opacity and OpacityMask are applied, the area where no object is drawn in the canvas remains in the state where alpha value is 0.0 and nothing is completely transparent. For this reason, the effect of the transparency processing is exerted only on the portion of the drawn object (see FIG. 3C).

概念的には上記したステップを経るが、同一キャンバス上にこのとおりの処理をしようとすると、オブジェクトが重なった場合などは、デスティネーションのアルファ値を考慮した図2(A)の厳密なブレンド処理を行うことになる(図3(D))。   Conceptually, the steps described above are performed, but if the same processing is performed on the same canvas, if the objects overlap, the strict blending process of FIG. 2A taking into account the alpha value of the destination (FIG. 3D).

[構成]
図4は、本発明の実施例に係る画像処理装置の機能ブロック図である。
[Constitution]
FIG. 4 is a functional block diagram of the image processing apparatus according to the embodiment of the present invention.

画像処理装置は、通信インタフェース1.1、データ受信部1.2、データ解析部1.3、描画データ処理部1.4(中間言語変換部)、キャンバスチェック部1.4.1、キャンバス用メモリ算出部1.4.3、描画部1.5(アルファブレンド演算部)、出力部1.6、システム制御部1.7、エラー制御部1.8、メモリ管理部1.9の各機能部を有する。以下に各機能部について説明する。   The image processing apparatus includes a communication interface 1.1, a data reception unit 1.2, a data analysis unit 1.3, a drawing data processing unit 1.4 (intermediate language conversion unit), a canvas check unit 1.4.1, and a canvas Functions of memory calculation unit 1.4.3, drawing unit 1.5 (alpha blend operation unit), output unit 1.6, system control unit 1.7, error control unit 1.8, and memory management unit 1.9 Part. Each functional unit will be described below.

通信インタフェース1.1は、ホストコンピュータ等との通信を行う機能部である。   The communication interface 1.1 is a functional unit that performs communication with a host computer or the like.

データ受信部1.2は、通信インタフェース1.1を介してデータ(ページ記述言語で記載してある印刷データ)を受信する機能部である。   The data receiving unit 1.2 is a functional unit that receives data (print data written in a page description language) via the communication interface 1.1.

データ解析部1.3は、送られてきたページ記述言語で記述された印刷データの解析を行なう機能部である。   The data analysis unit 1.3 is a functional unit that analyzes print data described in the page description language that has been sent.

描画データ処理部1.4(中間言語変換部)は、前記データ解析部1.4からの指示に従い、ページ記述言語を中間言語(ここでは、具体的にはディスプレイリスト)に変換する。   The drawing data processing unit 1.4 (intermediate language conversion unit) converts the page description language into an intermediate language (here, specifically, a display list) in accordance with an instruction from the data analysis unit 1.4.

XPS等のXML拡張形式で記述されたページ記述言語中には、描画オブジェクトである、パス、グリフス(フォント)、イメージ等のエレメントがあり、これら描画オブジェクトを表示するための土台となるキャンバスがある。これらエレメントやキャンバスは、それぞれに透明度属性を有することが可能である。又、キャンバスは、入れ子構造(ネスト構造)をとって、その中に含むキャンバスやエレメントをひとつのグループとして扱うことが可能となる。   In a page description language written in an XML extension format such as XPS, there are drawing objects such as paths, glyphs (fonts), images, etc., and there is a canvas that serves as the basis for displaying these drawing objects. . Each of these elements and canvases can have a transparency attribute. Also, the canvas has a nested structure (nested structure), and the canvas and elements contained therein can be handled as one group.

描画データ処理部1.4は、前記した入れ子構造をとるキャンバスデータを中間言語に変換する際に、その入れ子構造を保ったままの構成とする。ひとつのキャンバスオブジェクトがディスプレイリストに変換された際の構造を図5に示す。   The drawing data processing unit 1.4 is configured to keep the nested structure when converting the canvas data having the nested structure into an intermediate language. FIG. 5 shows the structure when one canvas object is converted into a display list.

キャンバスのオブジェクトは、その開始を示す「Start」マークに続き、キャンバス上に存在する描画オブジェクト又はキャンバスオブジェクトのディスプレイリスト、キャンバスの終了を示す「End」マーク、その後にキャンバスの透明度情報が続き、キャンバスの下層への描画を示す「Write」コマンドで終了する。   The canvas object is followed by a “Start” mark that indicates its start, a display list of drawing objects or canvas objects that exist on the canvas, an “End” mark that indicates the end of the canvas, and then the canvas transparency information. End with the “Write” command, which indicates the drawing to the lower layer.

キャンバスが入れ子構造となっている場合には、前記した「Start」マークと「End」マークとの間に入れ子となるキャンバスオブジェクトへのポインターが入る。   When the canvas has a nested structure, a pointer to the canvas object to be nested is inserted between the “Start” mark and the “End” mark.

キャンバスチェック部1.4.1は、描画データ処理部1.4に入ってくる描画データの中に透明度設定があった場合にこれをページ単位で覚えておく。透明度設定にはキャンバスの透明度や描画オブジェクトの色の透明度、OpacityMask等が含まれる。また、キャンバスチェック部1.4.1は、描画データ処理部1.4から問い合わせがあった時に、その時点で透明度設定があるかどうかの情報を返す。   The canvas check unit 1.4.1 remembers this in units of pages when transparency is set in the drawing data entering the drawing data processing unit 1.4. The transparency setting includes the transparency of the canvas, the transparency of the color of the drawing object, OpacityMask, and the like. When the canvas check unit 1.4.1 makes an inquiry from the drawing data processing unit 1.4, the canvas check unit 1.4.1 returns information on whether or not there is a transparency setting at that time.

キャンバス用メモリ算出部1.4.3は、キャンバスデータを保持するのに必要なメモリを算出する。   The canvas memory calculation unit 1.4.3 calculates a memory necessary for holding canvas data.

描画部1.5は、描画データ処理部1.4で作成されたディスプレイリスト(中間言語)からVRAM(ページ描画メモリ)にビットマップデータを作成する機能部である。アルファブレンドの演算処理はここ描画部1.5において行われる。   The drawing unit 1.5 is a functional unit that creates bitmap data in the VRAM (page drawing memory) from the display list (intermediate language) created by the drawing data processing unit 1.4. Alpha blending calculation processing is performed in the drawing unit 1.5.

出力部1.6は、上記の各機能部で画像処理が行われて得られたビットマップデータを出力する機能部である。前記出力とは、用紙などの記録媒体に印刷することであってもよいし、ディスプレイデバイスに表示出力を行う方法でもよい。   The output unit 1.6 is a functional unit that outputs bitmap data obtained by performing image processing in each functional unit described above. The output may be printing on a recording medium such as paper or a method of performing display output on a display device.

システム制御部1.7は、画像処理装置システムの共通情報を管理し、システムの制御を行なう機能部である。   The system control unit 1.7 is a functional unit that manages common information of the image processing apparatus system and controls the system.

エラー制御部1.8は、画像処理装置のエラーが発生した場合の処理を制御する機能部である。   The error control unit 1.8 is a functional unit that controls processing when an error occurs in the image processing apparatus.

メモリ管理部1.9は、画像処理装置のシステムのメモリを管理する機能部である。   The memory management unit 1.9 is a functional unit that manages the memory of the system of the image processing apparatus.

[アルファブレンド演算アルゴリズム]
図5で示した入れ子構造を有するディスプレイリスト(中間言語)のアルファブレンドの演算は以下に示す再帰アルゴリズムにより効率よく計算される。
[Alpha blending algorithm]
The alpha blend operation of the display list (intermediate language) having the nested structure shown in FIG. 5 is efficiently calculated by the recursive algorithm shown below.

一つのキャンバスの透過の計算Compositeを考えると、計算は次のようになる。   Considering the calculation composite for a single canvas, the calculation is as follows:

***_nのnをキャンバスに含まれるオブジェクト数とし、計算過程の値を表す。
[擬似コードによるアルゴリズム表記]
C = Composite(C_0,O_0)
入力 C_0 :キャンバスの描画先の現在の色
O_0 :キャンバスに含まれるオブジェクト全体
出力 C :キャンバスの色値

S_0 = C_0 (式1)
全てのオブジェクト(i を1からnまで)で以下の処理を繰り返す。
*** _ n represents the number of objects included in the canvas and represents the value of the calculation process.
[Algorithm description by pseudo code]
C = Composite (C_0, O_0)
Input C_0: Current color of the canvas drawing destination
O_0: Entire object included in canvas Output C: Color value of canvas {
S_0 = C_0 (Formula 1)
Repeat the following process for all objects (i from 1 to n).

{
Obj_i がキャンバスの場合は再帰呼び出し {
C_i = Composite(SC_(i-1),Obj_i) (式2)
} そうでない場合 {
C_i = Obj_i_Color (式3)
}
S_i = (1-Obj_i_Alpha) *SC_(i-1) + Obj_i_Alpha * C_i (式4)
}
C = S_i
} [アルゴリズム終了]
すなわち、キャンバス開始時にそれまでに描かれている色をコピーした領域を作成し(式1)、キャンバス終了時に、キャンバス自体のα値をもって、下地とブレンド処理(式4)すればよいこととなる。ページの開始時点は初期値S_0が白となっていれば良い。
{
If Obj_i is a canvas, recursive call {
C_i = Composite (SC_ (i-1), Obj_i) (Formula 2)
} Otherwise {
C_i = Obj_i_Color (Formula 3)
}
S_i = (1-Obj_i_Alpha) * SC_ (i-1) + Obj_i_Alpha * C_i (Formula 4)
}
C = S_i
} [End algorithm]
In other words, when the canvas is started, an area where the colors drawn so far are copied (Formula 1), and when the canvas is finished, the alpha value of the canvas itself is used for blending with the ground (Formula 4). . It is only necessary that the initial value S_0 is white at the start of the page.

[処理内容の具体例]
前記した再帰アルゴリズムの処理内容の具体例について図6、図7を用いて以下に説明する。
[Specific example of processing contents]
Specific examples of processing contents of the recursive algorithm described above will be described below with reference to FIGS.

前記アルゴリズムは、キャンバスの開始とともに、一時的に色を保持するバッファを確保し、そのバッファ内で描画処理を行う。キャンバスの終了時点でバッファをイメージとして、一つ下のレイヤーにブレンド処理を行いながら描画していく方法である。キャンバス描画中にさらにネストしている場合は、再帰呼出を行って、それに応じて色を保持するバッファを確保し、一段上のキャンバスとして処理する。   The algorithm secures a buffer that temporarily holds colors at the start of the canvas, and performs drawing processing in the buffer. This is a method of drawing the buffer as an image at the end of the canvas while blending the next lower layer. If there is further nesting during drawing on the canvas, a recursive call is made, a buffer for holding the color is secured accordingly, and the canvas is processed as an upper level canvas.

この処理を行う場合の一例として、半透明キャンバスがネスト化(入れ子構造)し、さらにそのキャンバス上で、半透明のオブジェクトが重なっているケースを考える。   As an example of performing this process, consider a case where semi-transparent canvases are nested (nested), and semi-transparent objects overlap on the canvas.

図6(E)は、XPSで表記した一段目のOpacity=0.5を有するCanvas1上に、描画オブジェクトである矩形のObject1が存在し、さらにOpacity=0.5を有する二段目のCanvas2がネストされており、二段目のCanvas2上に三角形のObject2とObject3が存在している。   In FIG. 6E, a rectangular Object1 that is a drawing object exists on a Canvas1 having Opacity = 0.5 in the first stage expressed in XPS, and a second-stage Canvas2 having Opacity = 0.5 is nested. The triangle Object2 and Object3 exist on the second level of Canvas2.

図6(F)に、上記XPSの全オブジェクトを透明度(Opacity)が無いと仮定した場合の描画を示し、図6(G)に上記XPSに表記どおりの透明度(Opacity)のアルファブレンド演算を行った場合の描画を示す。ただし、カラー表記ができないため、グレースケールに変換して描画してある。   Fig. 6 (F) shows the drawing when all the XPS objects are assumed to have no transparency (Opacity), and Fig. 6 (G) shows the alpha blending calculation of transparency (Opacity) as described in XPS. The drawing is shown. However, since color notation is not possible, the drawing is converted to gray scale.

このデータに対する描画部1.5による処理手順を図7に示し、前記した再帰アルゴリズムの式と対比させて説明を行う。   The processing procedure for the data by the drawing unit 1.5 is shown in FIG. 7 and will be described in comparison with the expression of the recursive algorithm.

[ページバッファの確保];図7(H)
最初に描画するための最終のページであるページバッファを確保する。
[Securing the page buffer]; FIG.
Allocate a page buffer that is the last page to be drawn first.

[Canvas1の開始];図7(I)
これまでページバッファに描かれている結果をCanvas1にコピーする(式1)。さらに、Canvas1上のObject1を描画する。(式3〜4)。また、Canvas1の透明度情報を何らかの形(例えば、再帰呼出しルーチンのローカル変数等)で保持しておく。
[Start Canvas1]; FIG. 7 (I)
Copy the result drawn in the page buffer so far to Canvas1 (Formula 1). Furthermore, Object1 on Canvas1 is drawn. (Formulas 3-4). The transparency information of Canvas1 is held in some form (for example, a local variable of a recursive call routine).

[Canvas2の開始];図7(J)
Canvas1に描かれている結果をCanvas2にコピーする。(式2による再帰呼出しと式1)。
[Start Canvas2]; Fig. 7 (J)
Copy the result drawn on Canvas1 to Canvas2. (Recursive call with expression 2 and expression 1).

次に、Canvas2上のオブジェクト(Object2, Object3)を描画する。このとき、Canvas2上でアルファブレンド演算処理を行う(式3〜4)。   Next, the objects (Object2, Object3) on Canvas2 are drawn. At this time, alpha blend calculation processing is performed on Canvas2 (Equations 3-4).

また、前記と同様にCanvas2の透明度情報を何らかの形(例えば、再帰呼出しルーチンのローカル変数等)で保持しておく。   Similarly, the transparency information of Canvas2 is held in some form (for example, a local variable of a recursive call routine).

[Canvas2の終了];図7(K)
Canvas2自体の透明度情報(エレメントのOpacity値、OpacityMask値)をもって、Canvas2をイメージとして一段下のCanvas1に描画する(式4)。
[End of Canvas2]; Fig. 7 (K)
With Canvas2 itself transparency information (element Opacity value, OpacityMask value), Canvas2 is rendered as an image in Canvas1 (Step 4).

Canvas2のバッファを開放。   Free the Canvas2 buffer.

[Canvas1の終了];図7(L)
Canvas1自体の透明度属性情報(エレメントのOpacity値、OpacityMask値)をもって、Canvas1をイメージとしてページに描画(式4)。
[End of Canvas1]; Fig. 7 (L)
Draw Canvas1 as an image on the page using the transparency attribute information of the Canvas1 itself (Opacity value and OpacityMask value of the element) (Formula 4).

Canvas1のバッファを開放。   Free the Canvas1 buffer.

以上の一連の動作により、再帰アルゴリズムによってアルファブレンド演算処理が可能となった。   With the series of operations described above, alpha blending processing can be performed by a recursive algorithm.

[フローチャート]
図8は本発明実施例の画像処理装置の動作のフローチャートである。
[flowchart]
FIG. 8 is a flowchart of the operation of the image processing apparatus according to the embodiment of the present invention.

S301:PC等から印刷命令を送信すると通信インタフェース1.1を介してデータ受信部1.2で受信される。   S301: When a print command is transmitted from a PC or the like, it is received by the data receiving unit 1.2 via the communication interface 1.1.

S302:データ受信部1.2で受信されたデータはデータ解析部1.3で解析される。データ解析部1.3は描画データ処理部1.4を利用して描画処理を行なう。   S302: The data received by the data receiving unit 1.2 is analyzed by the data analyzing unit 1.3. The data analysis unit 1.3 performs drawing processing using the drawing data processing unit 1.4.

S303:データ解析部1.3で解析した命令がページ出力命令かどうか判定する。   S303: It is determined whether the instruction analyzed by the data analysis unit 1.3 is a page output instruction.

S304:データ解析部1.3で解析した命令がページ出力命令でない場合は、描画データ処理部1.4は命令通りの処理を行う。描画データ処理部1.4はデータ解析部1.3から与えられた情報を基にディスプレイリスト(中間言語の描画命令)を生成する。この時、透明度設定の命令があった場合は、描画データ処理部1.4はその命令の内容をキャンバスチェック部1.4.1に伝える。キャンバスチェック部1.4.1は透明度設定が全く透明の場合や全く不透明以外の透明度(以下ではこれを半透明と記す)が指定されているかどうかを確認し、記憶しておく。そして実際に半透明の描画オブジェクトが生成されたかどうかを記憶しておく。   S304: If the command analyzed by the data analysis unit 1.3 is not a page output command, the drawing data processing unit 1.4 performs processing according to the command. The drawing data processing unit 1.4 generates a display list (an intermediate language drawing command) based on the information given from the data analysis unit 1.3. At this time, if there is a command for setting transparency, the drawing data processing unit 1.4 transmits the content of the command to the canvas check unit 1.4.1. The canvas check unit 1.4.1 confirms and stores whether the transparency setting is completely transparent or whether a transparency other than opaque is designated (hereinafter referred to as translucent). Then, it is stored whether or not a translucent drawing object is actually generated.

S305:データ解析部1.3はデータ受信部1.2で受信されたデータを全て処理し終えたかどうかを判定する。まだ処理するデータがある場合はS302の処理に戻って解析を行う。   S305: The data analysis unit 1.3 determines whether all the data received by the data reception unit 1.2 has been processed. If there is still data to be processed, the process returns to S302 for analysis.

S306:データ受信部1.2で受信されたデータを全て処理し終えた場合は、終了の処理を行う。描画処理に使用していたメモリで不要になったメモリを解放したり、エンジンに描画処理が終わったことを伝えたりする。   S306: When all the data received by the data receiving unit 1.2 has been processed, an end process is performed. The memory that is no longer needed for the drawing process is released, or the drawing process is completed to the engine.

S307:描画データ処理部1.4はキャンバスチェック部1.4.1に現在処理中のページの中に半透明の透明度が設定された描画オブジェクトがあるかどうかを問い合わせる。そしてその情報を描画部1.5に伝える。   S307: The drawing data processing unit 1.4 inquires of the canvas check unit 1.4.1 whether or not there is a drawing object in which a translucent transparency is set in the currently processed page. Then, the information is transmitted to the drawing unit 1.5.

S308:描画データ処理部1.4は描画部1.5にページ出力命令を送信する。   S308: The drawing data processing unit 1.4 transmits a page output command to the drawing unit 1.5.

S309:描画部1.5はS307,S308の情報を基にディスプレイリストをビットマップ化する処理を最適に行う。キャンバスの処理を行う際に、仮キャンバスの場合は全ての描画オブジェクトを直接VRAM(ページ描画メモリ)上にビットマップ化する。実キャンバスの場合は図3(C)や図3(D)にあるようにブレンド処理に必要なキャンバス用のメモリを使ってビットマップ化処理を行う。   S309: The drawing unit 1.5 optimally performs a process of converting the display list into a bitmap based on the information in S307 and S308. When processing the canvas, in the case of a temporary canvas, all the drawing objects are directly bitmapped on the VRAM (page drawing memory). In the case of an actual canvas, as shown in FIGS. 3C and 3D, bitmap processing is performed using canvas memory necessary for blend processing.

S310:描画部1.5は出来あがった1ページ分のビットマップを出力部1.6へ送ることで印刷が行なわれる。   S310: The drawing unit 1.5 sends the completed one-page bitmap to the output unit 1.6 to perform printing.

図9は図8のフローチャートのS304の部分で、キャンバスが指定された場合のフローチャートである。   FIG. 9 is a flowchart when the canvas is designated in S304 of the flowchart of FIG.

S401:キャンバスチェック部1.4.1は指定されたキャンバスの透明度設定が不透明かどうか確認する。   S401: The canvas check unit 1.4.1 checks whether the transparency setting of the designated canvas is opaque.

S402:指定されたキャンバスが不透明な場合は、キャンバスチェック部1.4.1は最初のキャンバスから連続して不透明なキャンバスが指定されているかどうか確認する。   S402: When the designated canvas is opaque, the canvas check unit 1.4.1 confirms whether an opaque canvas is designated continuously from the first canvas.

S403:指定されたキャンバスも含めて、最初のキャンバスから連続して不透明なキャンバスが指定されている場合は、キャンバスチェック部1.4.1は指定されたキャンバスは仮キャンバスだという情報をキャンバスの情報に記録する。   S403: If an opaque canvas is specified continuously from the first canvas including the specified canvas, the canvas check unit 1.4.1 indicates that the specified canvas is a temporary canvas. Record in information.

S404:キャンバスチェック部1.4.1は指定されたキャンバスは実キャンバスだという情報をキャンバスの情報に記録する。   S404: The canvas check unit 1.4.1 records information that the designated canvas is a real canvas in the canvas information.

S405:キャンバス用メモリ算出部1.4.3はキャンバス処理用に必要なメモリ量を算出して記憶する。   S405: The canvas memory calculation unit 1.4.3 calculates and stores the memory amount necessary for canvas processing.

[実施例の効果]
本発明実施例の画像処理装置により、以下のことが可能となった。
[Effect of Example]
The image processing apparatus according to the embodiment of the present invention enables the following.

XPS等のXML拡張形式等のページ記述言語によって記述された入れ子構造を有する描画オブジェクト、キャンバスの透明度属性の合成(アルファブレンド演算)を効率よく行うため、ページ記述言語を中間言語に変換する際に前記入れ子構造を保持した形で変換を行った。さらに、前記入れ子構造を有する中間言語データのアルファブレンド演算を再帰アルゴリズムにより実現した。   When converting a page description language to an intermediate language for efficient synthesis (alpha blend operation) of drawing objects with a nested structure described in a page description language such as XPS and other XML extension formats, canvas transparency attributes Conversion was performed while maintaining the nested structure. Furthermore, the alpha blend operation of the intermediate language data having the nested structure is realized by a recursive algorithm.

上記の方法により、入れ子構造をまたいだアルファブレンド演算を効率よく行うことが可能となった。   The above method makes it possible to efficiently perform alpha blending operations across nested structures.

上記の構造を有する中間言語により、アルファブレンド演算処理を行い、その後のビットマップデータへの変換を行ってプリンタでの印刷処理が可能となった。   Using an intermediate language having the above structure, alpha blending calculation processing is performed, and then conversion to bitmap data is performed to enable printing processing on a printer.

本画像処理装置では、指定されたキャンバスが不透明で、かつ最初のキャンバスから連続して不透明なキャンバスが指定されているかどうかを判定することで、キャンバス処理用に実際にメモリを獲得しないといけないキャンバスと直接(ページ描画メモリ)に描画出来るキャンバスを区別し、メモリ効率を良くすると共に、処理速度の向上を図ることが可能となった。   In this image processing device, the canvas that must be actually acquired for canvas processing is determined by determining whether the specified canvas is opaque and the opaque canvas is specified continuously from the first canvas. And the canvas that can be drawn directly (page drawing memory) can be distinguished to improve the memory efficiency and improve the processing speed.

[その他]
色値は、実施例中ではRGBの三原色に基づくものを示したが、CMYKの色値であってもよく、同様にアルファブレンド演算が可能である。
[Others]
In the embodiment, the color values are based on the three primary colors of RGB. However, the color values may be CMYK color values, and an alpha blend operation is possible in the same manner.

XPSによるアルファ値、カラー値、透明度、透明マスクの表記例である。This is a notation example of alpha value, color value, transparency and transparency mask by XPS. キャンバスへの描画時のアルファブレンド(透明度設定なし)の概念図である。It is a conceptual diagram of the alpha blend (no transparency setting) at the time of the drawing on a canvas. キャンバスへの描画時のアルファブレンド(透明度設定あり)の概念図である。It is a conceptual diagram of the alpha blend (with transparency setting) at the time of the drawing on a canvas. 本発明実施例の画像処理装置の機能ブロック図である。1 is a functional block diagram of an image processing apparatus according to an embodiment of the present invention. 本発明実施例のディスプレイリストのデータ構造例である。It is an example of the data structure of the display list of the Example of this invention. ネスト化されたキャンバスのXPSでの表記例(E)とその対応図面(透明度設定あり(F)及びなし(G))である。A notation example (E) of a nested canvas in XPS and its corresponding drawing (with transparency setting (F) and without (G)). 図6(E)に記載のXPSデータの描画の処理手順を示す図である。It is a figure which shows the process sequence of the drawing of XPS data described in FIG.6 (E). 本発明実施例の画像処理装置の動作のフローチャートである。3 is a flowchart of the operation of the image processing apparatus according to the embodiment of the present invention. 図8中のS304の「指定された処理」についての詳細なフローチャートである。FIG. 9 is a detailed flowchart of “specified processing” in S304 in FIG. 8.

符号の説明Explanation of symbols

1.1 通信インタフェース
1.2 データ受信部
1.3 データ解析部
1.4 描画データ処理部(中間言語変換部)
1.4.1 キャンバスチェック部
1.4.3 キャンバス用メモリ算出部
1.5 描画部(アルファブレンド演算部)
1.6 出力部
1.7 システム制御部
1.8 エラー制御部
1.9 メモリ管理部
1.1 Communication interface 1.2 Data receiver 1.3 Data analyzer 1.4 Drawing data processor (intermediate language converter)
1.4.1 Canvas Check Unit 1.4.3 Canvas Memory Calculation Unit 1.5 Drawing Unit (Alpha Blend Calculation Unit)
1.6 Output unit 1.7 System control unit 1.8 Error control unit 1.9 Memory management unit

Claims (5)

透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する画像処理装置であって、
前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断するキャンバスチェック部と、
前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上で透明度属性の合成であるアルファブレンド演算を行って描画する描画部とを有する
ことを特徴とする画像処理装置。
An image processing apparatus that converts a page description language including a drawing object having a transparency attribute and a canvas having a transparency attribute serving as a basis for drawing the drawing object into an image,
Transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is continuous, the continuous canvas is determined that the temporary canvas, determines the actual canvas canvas otherwise A canvas check section to
The drawing on the canvas determined to be the temporary canvas is directly drawn in the page drawing memory, and the drawing on the canvas determined to be the actual canvas is performed by performing an alpha blend operation that is a composition of the transparency attribute on the canvas. An image processing apparatus comprising: a drawing unit for drawing.
請求項1の画像処理装置であって、
前記ページ記述言語中に前記キャンバスが入れ子構造に記述された場合に、前記ページ記述言語を前記キャンバスの入れ子構造を保ったまま中間言語に変換する中間言語変換部を有し、
前記描画部は、前記入れ子構造を保った中間言語に基づいて前記アルファブレンド演算を行う
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
An intermediate language conversion unit for converting the page description language into an intermediate language while maintaining the nested structure of the canvas when the canvas is described in a nested structure in the page description language;
The image processing apparatus, wherein the rendering unit performs the alpha blending operation based on an intermediate language that maintains the nested structure.
請求項1又は2の画像処理装置であって、
前記ページ記述言語がXML(Extended Markup Language)拡張形式により記述されたものである
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
The image processing apparatus, wherein the page description language is described in an XML (Extended Markup Language) extended format.
透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する画像処理方法であって、
前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断し、
前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上でアルファブレンド演算を行って描画する
ことを特徴とする画像処理方法。
An image processing method for converting a page description language including a drawing object having a transparency attribute and a canvas having a transparency attribute as a basis for drawing the drawing object into an image,
Transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is to continue communication is the continuous canvas is determined that the temporary canvas, and the actual canvas canvas otherwise Judgment
Drawing on the canvas determined to be the temporary canvas is directly drawn in a page drawing memory, and drawing on the canvas determined to be the actual canvas is drawn by performing an alpha blend operation on the canvas. Image processing method.
コンピュータに透明度属性を有する描画オブジェクトと、前記描画オブジェクトを描画する土台となる透明度属性を有するキャンバスとを含むページ記述言語を画像に変換処理する機能を実現させる画像処理プログラムであって、
前記キャンバスの透明度属性が不透明であるかどうかを判定し、不透明と判定されたキャンバスが連続している場合には、前記連続したキャンバスを仮キャンバスと判断し、そうでないキャンバスを実キャンバスと判断するキャンバスチェック機能と、
前記キャンバスチェック機能により、前記仮キャンバスと判断されたキャンバスへの描画は、直接ページ描画メモリに描画し、前記実キャンバスと判断されたキャンバスへの描画は、当該キャンバス上でアルファブレンド演算を行って描画する描画機能とを
コンピュータに実現させることを特徴とする画像処理プログラム。
An image processing program for realizing a function of converting a page description language into an image including a drawing object having a transparency attribute and a canvas having a transparency attribute serving as a basis for drawing the drawing object on a computer,
Transparency attributes of the canvas to determine whether opaque, when the canvas where it is determined that not transparent is to continue communication is the continuous canvas is determined that the temporary canvas, and the actual canvas canvas otherwise The canvas check function to judge,
Drawing on the canvas determined as the temporary canvas by the canvas check function is directly drawn in the page drawing memory, and drawing on the canvas determined as the real canvas is performed by performing an alpha blend operation on the canvas. An image processing program for causing a computer to realize a drawing function for drawing.
JP2008251315A 2008-09-26 2008-09-29 Image processing apparatus, image processing method, and image processing program Expired - Fee Related JP5033747B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008251315A JP5033747B2 (en) 2008-09-29 2008-09-29 Image processing apparatus, image processing method, and image processing program
US12/586,748 US8314951B2 (en) 2008-09-26 2009-09-25 Image processing apparatus, and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008251315A JP5033747B2 (en) 2008-09-29 2008-09-29 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2010086044A JP2010086044A (en) 2010-04-15
JP5033747B2 true JP5033747B2 (en) 2012-09-26

Family

ID=42249991

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008251315A Expired - Fee Related JP5033747B2 (en) 2008-09-26 2008-09-29 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP5033747B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10891760B2 (en) * 2018-09-20 2021-01-12 Adobe Inc. Digital overpainting controlled by opacity and flow parameters

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0887406A (en) * 1994-09-19 1996-04-02 Fuji Electric Co Ltd Program display device
JP4480160B2 (en) * 2005-06-08 2010-06-16 キヤノン株式会社 Printing apparatus, printing apparatus control method, printing apparatus control program, storage medium, and Web server
JP2007067865A (en) * 2005-08-31 2007-03-15 Nec Corp Image processor, image processing method, and image processing program
CN100545831C (en) * 2006-09-27 2009-09-30 北京大学 Method and device for rasterization processing of transparent pages

Also Published As

Publication number Publication date
JP2010086044A (en) 2010-04-15

Similar Documents

Publication Publication Date Title
JP5028372B2 (en) Image processing apparatus, image processing method, and image processing program
US7894098B1 (en) Color separation of pattern color spaces and form XObjects
JP4960900B2 (en) Information processing apparatus and image forming apparatus
US20100079783A1 (en) Image processing apparatus, and computer-readable recording medium
JP2017228838A (en) Image processing apparatus, image processing method and program
JP5732935B2 (en) Information processing apparatus, print control program, and computer-readable recording medium
JP5033747B2 (en) Image processing apparatus, image processing method, and image processing program
JP5028373B2 (en) Image processing apparatus, image processing method, and image processing program
JP5007291B2 (en) Image processing apparatus, image processing method, and image processing program
JP5033746B2 (en) Image processing apparatus, image processing method, and image processing program
CN106341572B (en) The colour switching of method for supporting to(for) pre-multiplied data
JP6234417B2 (en) Information processing apparatus, control method therefor, and program
JP2001293936A (en) Image information processor and method of processing image information
JP2011065413A (en) Image-processing device, image-processing method, and image-processing program
JP5094667B2 (en) Image processing apparatus, image processing method, and image processing program
JP5171973B2 (en) Information processing apparatus and control method thereof
JP2010087792A (en) Image forming apparatus and program
JP6437076B2 (en) Information processing apparatus, control method therefor, and program
JP2017097463A (en) Print control system, print control device, and program
JP2008299845A (en) Rendering system and method for transparent objects
US8913294B2 (en) Image processing apparatus and image processing system
JP5228543B2 (en) Print job processing system and print job processing method
JP2010274534A (en) Image forming device and image forming program
JP2009066926A (en) Image processing device and image forming system
JP2009101662A (en) Print processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120321

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120518

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: 20120605

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120702

R150 Certificate of patent or registration of utility model

Ref document number: 5033747

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150706

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees