JP2006092392A - Data processor and processing method - Google Patents

Data processor and processing method Download PDF

Info

Publication number
JP2006092392A
JP2006092392A JP2004278767A JP2004278767A JP2006092392A JP 2006092392 A JP2006092392 A JP 2006092392A JP 2004278767 A JP2004278767 A JP 2004278767A JP 2004278767 A JP2004278767 A JP 2004278767A JP 2006092392 A JP2006092392 A JP 2006092392A
Authority
JP
Japan
Prior art keywords
data
information
image
layout
data package
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.)
Withdrawn
Application number
JP2004278767A
Other languages
Japanese (ja)
Inventor
Masaya Kobayashi
将也 小林
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2004278767A priority Critical patent/JP2006092392A/en
Publication of JP2006092392A publication Critical patent/JP2006092392A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To perform a display using an interpretation unit even in a case of inputting template data in a data processor provided with the interpretation unit for interpreting a data package with a defined layout of a content and an image designated as the content. <P>SOLUTION: The data processor 20 provided with the interpretation unit 72 for interpreting the data package 44 with a defined layout of a content and an image designated as the content comprises a preprocessing unit 71 generating the data package by inputting the template data, selecting image data, and assigning information for the selected image data to the input template data, and outputting the generated data package to the interpretation unit. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、構造化タグ言語等で記述されたデータを処理するための技術に関する。   The present invention relates to a technique for processing data described in a structured tag language or the like.

この種の技術として、例えば、スクリプト生成装置が、所定のレイアウトで画像を印刷することを制御するためのレイアウト制御プログラムを出力し、プリンタが、そのレイアウト制御プログラムと、画像ファイルとを入力し、そのレイアウト制御プログラムを解釈して印刷を行うことで、所定のレイアウトで画像を印刷することができる技術が知られている(例えば特許文献1)。   As this type of technology, for example, the script generation device outputs a layout control program for controlling printing of an image with a predetermined layout, the printer inputs the layout control program and an image file, A technique is known in which an image can be printed with a predetermined layout by interpreting the layout control program and performing printing (for example, Patent Document 1).

特開2003−114780号公報JP 2003-114780 A

ところで、コンテンツのレイアウトを定義するとともにそのコンテンツとして画像を指定したデータパッケージがある。このデータパッケージは、例えば、構造化タグ言語(一例として、XHTML(eXtensible Hyper Text Markup Language))で記述された一つのファイルであり、どんなレイアウトのどの位置にどんな画像或いは文字を入れこんでどんな表示サイズで表示するか等が予め決められた、いわゆる不確定要素の無い完成型のデータである。このような完成型のデータパッケージが表す内容の表示を実行するべく、そのデータパッケージを解釈するための解釈ユニット(例えばプログラム)を構築することができる。   By the way, there is a data package that defines a content layout and designates an image as the content. This data package is, for example, a single file written in a structured tag language (for example, XHTML (eXtensible Hyper Text Markup Language)), and what kind of image or character is inserted in any position in any layout. This is completed data having no so-called uncertain elements, for example, whether to display in size. In order to display the contents represented by such a complete data package, an interpretation unit (for example, a program) for interpreting the data package can be constructed.

しかし、必ずしも、このような完成型のデータパッケージを入力することが望まれているとは限らない。例えば、どんなレイアウトで表示をするかが決められていても、そのレイアウト中のどの位置にどんな画像或いはどのような文字列が表示されるかが決められていなかったり、或いは、テンプレートデータ中に表示サイズが定義されていてもその表示サイズとは異なる表示サイズで表示を行うことがユーザから希望されたりすることがある。すなわち、不確定な要素を含んだデータが入力されることがある。このような場合であっても、上記の解釈ユニットを有効に活用することが望ましいと考えられる。   However, it is not always desired to input such a complete data package. For example, even if the layout is determined to be displayed, what image or what character string is displayed at which position in the layout is not determined or displayed in the template data Even if the size is defined, the user may desire to display with a display size different from the display size. That is, data including uncertain elements may be input. Even in such a case, it is considered desirable to make effective use of the above interpretation unit.

従って、本発明の目的は、コンテンツのレイアウトを定義するとともにそのコンテンツとして画像を指定したデータパッケージを解釈する解釈ユニットが備えられる場合に、データパッケージではなくテンプレートデータを入力しても、その解釈ユニットを利用した表示が行われるようにすることにある。   Accordingly, an object of the present invention is to provide an interpretation unit that defines a layout of content and interprets a data package that designates an image as the content, even if template data is input instead of the data package. It is to make the display using.

本発明の更なる目的は、後述する実施の形態の記載から明らかになるであろう。   Further objects of the present invention will become clear from the description of the embodiments described later.

本発明の第一の側面に従うデータ処理装置は、コンテンツのレイアウトを定義するとともに前記コンテンツとして画像を指定したデータパッケージを解釈する解釈ユニットを備えており、更に、前処理ユニットを備えたことを特徴とする。その前処理ユニットは、レイアウトを定義したテンプレートデータを入力し、該レイアウトに組み合わせる画像の画像データを選択して、前記入力したテンプレートデータに前記選択された画像データに関する情報を割り付けることで、前記データパッケージを生成し、前記生成されたデータパッケージを前記解釈ユニットに出力する。これにより、解釈ユニットが、そのデータパッケージを解釈して、以降、そのデータパッケージが表す内容を表示するための処理が行われる。前処理ユニット及び解釈ユニットの少なくとも一方は、ハードウェア、コンピュータプログラム及びそれらの組み合わせとすることができる。   The data processing apparatus according to the first aspect of the present invention includes an interpretation unit that defines a layout of content and interprets a data package that designates an image as the content, and further includes a preprocessing unit. And The pre-processing unit inputs template data defining a layout, selects image data of an image to be combined with the layout, and assigns information related to the selected image data to the input template data. A package is generated, and the generated data package is output to the interpretation unit. Thereby, the interpretation unit interprets the data package, and thereafter, processing for displaying the contents represented by the data package is performed. At least one of the preprocessing unit and the interpretation unit may be hardware, a computer program, and a combination thereof.

ここで、「表示」とは、可視的に出力することであり、例えば、ディスプレイ画面に表示することであっても良いし、印刷メディア(例えば紙或いはCD−ROM)に印刷することであっても良い。   Here, “display” means to output visually, for example, to display on a display screen, or to print on a print medium (for example, paper or CD-ROM). Also good.

また、テンプレートデータは、レイアウトに関するレイアウト情報と、表示に関するスクリプトとを含んでいても良い。レイアウト情報とスクリプトのうち少なくともスクリプトが、構造化タグ言語で記述されていてもよい。レイアウト情報としては、例えば、コンテンツ(例えば画像又は文字)の配置領域がどの位置に設定されているか等のレイアウトが記述されたものとすることができる。スクリプトとしては、例えば、表示対象文書全体をどのような表示属性に従って表示するかや、その文書の各ページをどのような表示属性に従って表示するかなどが記述されたものとすることができる。前処理ユニットは、そのようなレイアウト情報とスクリプトとに基づいて前述したデータパッケージを生成することができる。なお、前処理ユニットは、例えば、表示対象文書全体についての或る種類の表示属性項目の内容と、或るページについての同一種類の表示属性項目の内容とが異なっている場合、ページの表示属性項目の内容を優先し、そのページの表示についてはその表示属性項目の内容に従う表示が行われるようなデータパッケージを生成することができる。   Further, the template data may include layout information related to layout and a script related to display. At least one of the layout information and the script may be described in a structured tag language. As the layout information, for example, a layout such as a position where an arrangement area of content (for example, an image or a character) is set can be described. As the script, for example, what display attribute is used to display the entire display target document, what display attribute is used to display each page of the document, and the like can be described. The preprocessing unit can generate the data package described above based on such layout information and script. Note that the preprocessing unit, for example, if the content of a certain type of display attribute item for the entire display target document is different from the content of the same type of display attribute item for a certain page, It is possible to generate a data package that gives priority to the content of the item and displays the page according to the content of the display attribute item.

また、ここで言う「データパッケージ」とは、例えば、後述する実施形態で述べる「テンプレート型データパッケージ」と「完成型データパッケージ」とのうち、「完成型データパッケージ」を採用することができる。   In addition, as the “data package” referred to here, for example, a “completed data package” of “template type data package” and “completed data package” described in an embodiment described later can be adopted.

また、「画像データに関する情報」とは、例えば、画像データそれ自体であっても良いし、画像データの識別情報(例えば、画像データの名称又は画像データへのアクセスパス情報)であってもよい。   The “information about image data” may be, for example, the image data itself, or may be identification information of the image data (for example, the name of the image data or access path information to the image data). .

このデータ処理装置の第一の実施態様では、前記テンプレートデータは、所定の表示サイズに従うレイアウトを定義したものであり、且つ、表示サイズの変更が可能か否かを表す変更可否情報を含む。前記前処理ユニットが、表示サイズの指定を受け、且つ、前記入力されたテンプレートデータに含まれている変更可否情報が変更可を表す場合、前記指定された表示サイズが前記所定の表示サイズと異なっているならば、前記画像が組み合わされた前記レイアウトを前記指定された表示サイズで表示するための情報を前記データパッケージに含める。これにより、そのデータパッケージが解釈ユニットに解釈され、以降、そのデータパッケージが表す内容を表示するための処理が行われることにより、ユーザ指定の表示サイズで、そのデータパッケージが表す内容が表示される。データパッケージの生成は、例えば、テンプレートデータが入力され、画像データが選択されたときに、行うことができる。   In the first embodiment of the data processing apparatus, the template data defines a layout according to a predetermined display size and includes changeability information indicating whether the display size can be changed. When the preprocessing unit receives a display size specification and the changeability information included in the input template data indicates changeability, the specified display size is different from the predetermined display size. If so, information for displaying the layout combined with the images in the designated display size is included in the data package. As a result, the data package is interpreted by the interpretation unit, and processing for displaying the content represented by the data package is performed thereafter, so that the content represented by the data package is displayed in the display size specified by the user. . The data package can be generated, for example, when template data is input and image data is selected.

ここで、「変更可否情報」は、単に、表示サイズの変更が可能か否かを表す情報であっても良いし、変更可能な表示サイズの上限値(例えばA3)及び/又は下限値(例えばL版)を表す情報であってもよい。例えば、後者の場合であれば、前処理ユニットは、表示サイズの変更が可能か否かであることと共に、ユーザ指定の表示サイズが前記上限値及び/又は下限値を超えていないか否かをも判断することができ、それらの判断結果が肯定的な場合に、前記指定された表示サイズで表示するための情報を前記データパッケージに含めることができる。   Here, the “changeable / unchangeable information” may simply be information indicating whether or not the display size can be changed, or may be an upper limit value (for example, A3) and / or a lower limit value (for example, a changeable display size). L version) may be used. For example, in the latter case, the preprocessing unit determines whether or not the display size can be changed, and whether or not the display size specified by the user exceeds the upper limit value and / or the lower limit value. When the determination result is affirmative, information for displaying at the designated display size can be included in the data package.

このデータ処理装置の第二の実施態様では、前記テンプレートデータは、所定の項目(例えば、撮影日時、ファイル名等)を表す情報である項目情報を含む。前記前処理ユニットが、前記項目情報を解釈して、前記項目情報が表す項目を特定し、前記特定された項目に対応した文字を表す文字情報を前記データパッケージに含める。   In the second embodiment of the data processing apparatus, the template data includes item information that is information representing predetermined items (for example, shooting date and time, file name, etc.). The preprocessing unit interprets the item information, identifies an item represented by the item information, and includes character information representing characters corresponding to the identified item in the data package.

このデータ処理装置の第三の実施態様では、前記前処理ユニットが、前記画像の表示の補正方法に関する情報を前記データパッケージに含める。   In a third embodiment of the data processing apparatus, the preprocessing unit includes information relating to the image display correction method in the data package.

本発明の第二の側面に従うデータ処理方法は、コンテンツのレイアウトを定義するとともに前記コンテンツとして画像を指定したデータパッケージを解釈する解釈ユニットが存在する場合のデータ処理方法であって、レイアウトを定義したテンプレートデータを入力する(例えば入力して記憶装置(一例としてメモリ)に記憶させる)ステップと、該レイアウトに組み合わせる画像の画像データを選択するステップと、前記入力したテンプレートデータに前記選択された画像データに関する情報を割り付けることで前記データパッケージを生成するステップと、前記生成されたデータパッケージを前記解釈ユニットに出力するステップとを有する。   A data processing method according to the second aspect of the present invention is a data processing method in a case where there is an interpretation unit that defines a layout of content and interprets a data package in which an image is specified as the content. A step of inputting template data (for example, inputting and storing it in a storage device (memory as an example)), a step of selecting image data of an image to be combined with the layout, and the selected image data in the input template data Generating the data package by allocating information on and outputting the generated data package to the interpretation unit.

本発明の第三の側面に従うコンピュータプログラムは、レイアウトを定義したテンプレートデータを入力する(例えば入力して記憶装置(一例としてメモリ)に記憶させる)ステップと、該レイアウトに組み合わせる画像の画像データを選択するステップと、前記入力したテンプレートデータに前記選択された画像データに関する情報を割り付けることで、前記テンプレートデータに前記画像データに関する情報が割り付けられたデータパッケージを生成するステップと、前記生成されたデータパッケージを、コンテンツのレイアウトを定義するとともに前記コンテンツとして画像を指定したデータパッケージを解釈する解釈ユニットに出力するステップとをコンピュータに実行させるためのコンピュータ読み取り可能なコンピュータプログラムである。このコンピュータプログラムは、通信ネットワークを介してダウンロードしたり、可搬型記憶媒体(例えばCD−ROM)に格納して受け渡したりすることができる。   A computer program according to the third aspect of the present invention inputs a template data defining a layout (for example, inputs and stores it in a storage device (memory as an example)), and selects image data of an image to be combined with the layout Assigning information related to the selected image data to the inputted template data, generating a data package in which the information related to the image data is assigned to the template data, and the generated data package A computer-readable computer program for causing a computer to execute a process of defining a content layout and outputting the data package to an interpretation unit that interprets a data package in which an image is designated as the content It is a non. This computer program can be downloaded via a communication network, or stored in a portable storage medium (for example, a CD-ROM) for delivery.

以下、図面を参照して本発明の実施の形態を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の一実施形態に係るデータ処理装置が適用されたプリンタの構成を表す図である。   FIG. 1 is a diagram illustrating a configuration of a printer to which a data processing apparatus according to an embodiment of the present invention is applied.

プリンタ20は、操作部21と、印刷部37と、第一のインターフェース装置(以下、第一のIF)22Aと、第二のインターフェース装置(以下、第二のIF)22Bと、ROM33と、RAM31と、CPU32とを備えている。   The printer 20 includes an operation unit 21, a printing unit 37, a first interface device (hereinafter referred to as a first IF) 22A, a second interface device (hereinafter referred to as a second IF) 22B, a ROM 33, and a RAM 31. And a CPU 32.

操作部21は、ユーザインターフェースであり、例えば、種々の情報を表示するためのディスプレイ画面や、種々の情報を入力するための複数のボタンを備えている。操作部21は、例えば、ユーザの操作により、第一のIF22Aに装着されたメモリカード内の複数の画像データのうちどれを印刷対象の画像データとするかや、印刷対象とする画像データをどのように補正するか等を入力することができる。   The operation unit 21 is a user interface and includes, for example, a display screen for displaying various information and a plurality of buttons for inputting various information. For example, the operation unit 21 determines which one of a plurality of image data in the memory card attached to the first IF 22A is set as the image data to be printed or which image data to be printed by the user's operation. It is possible to input whether or not to correct.

印刷部37は、入力された文字や画像等の情報を用紙に印刷する。印刷部37は、例えば、プリンタ20がインクジェットプリンタである場合には、インク滴を吐出する印刷ヘッド、印刷ヘッドを主操作方向に搬送するキャリッジ、用紙を副走査方向に送る紙送りモータ等から構成することができる。印刷部37は、例えば、後述するレンダリングプラグイン76から出力されたイメージデータに対して色変換処理及びハーフトーニング処理を施して印刷画像データを生成する生成部(ハードウェア回路、ソフトウェア又はそれらの組み合わせ)を備え、その印刷画像データに基づいて印刷を実行することができる。   The printing unit 37 prints information such as input characters and images on paper. For example, when the printer 20 is an inkjet printer, the printing unit 37 includes a print head that ejects ink droplets, a carriage that conveys the print head in the main operation direction, a paper feed motor that feeds paper in the sub-scanning direction, and the like. can do. For example, the printing unit 37 generates a print image data by performing color conversion processing and halftoning processing on image data output from a rendering plug-in 76 to be described later (hardware circuit, software, or a combination thereof) ) And printing can be executed based on the print image data.

第一のIF22Aは、プリンタ20の外部の装置からデータの入力を受けることができる装置、例えば、メモリカード等の可搬型記憶媒体に対してデータのリード及びライトを行うことができるリーダライタである。第一のIF22Aは、不確定要素を含んだデータパッケージであるテンプレート型データパッケージ35と、不確定要素の無いデータパッケージである完成型データパッケージ44との両方の入力を受けることができる。テンプレート型データパッケージ35と、完成型データパッケージ44とについては後に詳述する。   The first IF 22A is a reader / writer that can read and write data to and from a portable storage medium such as a memory card that can receive data input from a device external to the printer 20. . The first IF 22A can receive both a template type data package 35 that is a data package including an uncertain element and a completed data package 44 that is a data package having no uncertain element. The template type data package 35 and the completed type data package 44 will be described in detail later.

第二のIF22Bは、プリンタ20の外部の装置からデータの入力を受けることができる装置、例えば、ブルートゥース(登録商標)の規格に従って携帯電話機等からデータを受信することができる通信インターフェース装置である。第二のIF22Bは、テンプレート型データパッケージ35の入力を受けることはなく、完成型データパッケージ44(及び、それに割り付けられた画像データ)の入力を受ける。第二のIF22Bを介してプリンタ20に入力された完成型データパッケージ44(及び画像データ)は、二点鎖線の矢印で示すように、後述するプリプロセッサ71を介することなく、後述する解釈ユニット72に入力される。   The second IF 22B is a communication interface device capable of receiving data from a device external to the printer 20, such as a communication interface device capable of receiving data from a mobile phone or the like according to the Bluetooth (registered trademark) standard. The second IF 22B does not receive the input of the template type data package 35, but receives the input of the complete type data package 44 (and image data assigned thereto). The complete data package 44 (and image data) input to the printer 20 via the second IF 22B is transferred to the interpretation unit 72 (to be described later) without passing through the preprocessor 71 (to be described later), as indicated by a two-dot chain line arrow. Entered.

ROM33には、例えば、CPU32に読み込まれて実行されるコンピュータプログラムが格納されている。そのコンピュータプログラムとしては、例えば、プリプロセッサ71、解釈ユニット72、XMLパーサ74、レイアウタ75及びレンダリングプラグイン(以下、RPI)76がある。これらのコンピュータプログラムの各々についての説明は、後で行う。なお、これらのコンピュータプログラムは、ROM33以外の記憶装置、例えば、通信ネットワークを介してサーバ等からダウンロードされてもよいし、可搬型記憶媒体から取り込まれてもよい。   The ROM 33 stores a computer program that is read and executed by the CPU 32, for example. Examples of the computer program include a preprocessor 71, an interpretation unit 72, an XML parser 74, a layouter 75, and a rendering plug-in (hereinafter referred to as RPI) 76. Each of these computer programs will be described later. Note that these computer programs may be downloaded from a storage device other than the ROM 33, for example, a server or the like via a communication network, or may be taken from a portable storage medium.

RAM31は、外部の装置からプリンタ20に入力されたデータや、CPU32に入力される又は出力されたデータ等を一時的に記憶することができる。   The RAM 31 can temporarily store data input to the printer 20 from an external device, data input to or output from the CPU 32, and the like.

CPU32は、プリプロセッサ71、解釈ユニット72、XMLパーサ74、レイアウタ75及びRPI76等の種々のコンピュータプログラムを読み込んで実行することができる。   The CPU 32 can read and execute various computer programs such as the preprocessor 71, the interpretation unit 72, the XML parser 74, the layouter 75, and the RPI 76.

解釈ユニット72は、完成型データパッケージ(例えばXHTMLで記述されたスクリプトファイル)44を解釈し、その解釈の結果に基づいて作成したデータを出力するユニットである。具体的には、例えば、解釈ユニット72は、完成型データパッケージ44の解析をXMLパーサ74に指示し、それの解析を行ったXMLパーサ74から解析結果を受け、その受けた解析結果に基づいて、図示しないDOM(Document Object Model)ツリーを作成し、作成したDOMツリーをRAM31に書き込む。解釈ユニット72は、作成されたDOMツリーのlinkタグ(図示せず)内の初期化処理により依頼されたCSS(Cascading Style Sheets)文書を解析するCSSパーサ73を備える。解釈ユニット72は、CSSパーサ73の解析結果に基づいてスタイルオブジェクト(図示せず)を生成し、生成したスタイルオブジェクトをRAM31に格納する。なお、解釈ユニット72は、生成したスタイルオブジェクトを、図示しない不揮発性メモリ(例えばフラッシュメモリ)に記憶させてもよい。また、解釈ユニット72は、第一のIF22Aから入力された完成型データパッケージ44又はテンプレート型35に基づいて生成された完成型データパッケージ44を、後述のプリプロセッサ71を介して受け、第二のIF22Bから入力された完成型データパッケージ44を、プリプロセッサ71を介さずに受けることができる。   The interpretation unit 72 is a unit that interprets a completed data package (for example, a script file described in XHTML) 44 and outputs data created based on the interpretation result. Specifically, for example, the interpretation unit 72 instructs the XML parser 74 to analyze the completed data package 44, receives the analysis result from the XML parser 74 that has performed the analysis, and based on the received analysis result A DOM (Document Object Model) tree (not shown) is created, and the created DOM tree is written in the RAM 31. The interpretation unit 72 includes a CSS parser 73 that analyzes a CSS (Cascading Style Sheets) document requested by an initialization process in a link tag (not shown) of the created DOM tree. The interpretation unit 72 generates a style object (not shown) based on the analysis result of the CSS parser 73 and stores the generated style object in the RAM 31. The interpretation unit 72 may store the generated style object in a nonvolatile memory (not shown) (for example, a flash memory). The interpretation unit 72 receives the completed data package 44 generated based on the completed data package 44 or the template mold 35 input from the first IF 22A via the preprocessor 71 described later, and receives the second IF 22B. The completed data package 44 input from can be received without going through the preprocessor 71.

XMLパーサ74は、解釈ユニット72からの指示に応答して、完成型データパッケージ(特に、例えばスクリプト)を解析し、その解析結果を解釈ユニット72に伝える。   In response to the instruction from the interpretation unit 72, the XML parser 74 analyzes the completed data package (in particular, a script, for example) and transmits the analysis result to the interpretation unit 72.

レイアウタ75は、解釈ユニット72により作成されたDOMツリーと、図示しないスタイルオブジェクトとに基づいて、完成型データパッケージに記述されている要素(オブジェクト)としての画像データを取り込む(例えば、プリンタ20に挿されたメモリカードから取り込む)。レイアウタ75は、取り込んだ画像データが表す画像をページ毎にレイアウトして一つのページボックスにまとめ、そのページボックスをレイアウトオブジェクト(図示しない)としてRAM31に書き込む。別の言い方をすれば、レイアウタ75は、汎用的なレイアウト処理を行うことにより、汎用可能なレイアウトオブジェクトを生成する。このレイアウトオブジェクトは、プリンタ20が印刷に使用することに限らず、例えば、WEBブラウザ等の他種のアプリケーションが解釈して表示を実行することができるようなオブジェクトである。レイアウタ75は、生成したレイアウトオブジェクトを、図示しない不揮発性メモリ(例えばフラッシュメモリ)に記憶させてもよい。   The layouter 75 captures image data as an element (object) described in the completed data package based on the DOM tree created by the interpretation unit 72 and a style object (not shown) (for example, inserted into the printer 20). From the memory card that was created). The layouter 75 lays out the images represented by the captured image data for each page, collects them into one page box, and writes the page box as a layout object (not shown) in the RAM 31. In other words, the layouter 75 generates a general-purpose layout object by performing a general-purpose layout process. This layout object is not limited to use by the printer 20 for printing, but is an object that can be interpreted and executed by another type of application such as a WEB browser. The layouter 75 may store the generated layout object in a nonvolatile memory (not shown) (for example, a flash memory).

RPI76は、レイアウタ38によりRAM31に格納されたレイアウトオブジェクトに基づいて、RGBデータとしてのイメージデータを生成する。別の言い方をすれば、RPI76は、レイアウトオブジェクトに基づいてプリンタ20独自のレイアウト処理を実行する。RPI76は、生成したイメージデータを印刷部37に出力する。これにより、印刷部37が、そのイメージデータに対して色変換処理及びハーフトーニング処理を行うことで、印刷画像データを生成し、その印刷画像データが表すページボックス(レイアウトされた画像等)を印刷する。   The RPI 76 generates image data as RGB data based on the layout object stored in the RAM 31 by the layouter 38. In other words, the RPI 76 executes a layout process unique to the printer 20 based on the layout object. The RPI 76 outputs the generated image data to the printing unit 37. Accordingly, the printing unit 37 performs color conversion processing and halftoning processing on the image data to generate print image data, and prints a page box (layout image or the like) represented by the print image data. To do.

このように、プリンタ20は、入力された完成型データパッケージ44を解釈する解釈ユニット72が備えられており、その解釈ユニット72の解釈結果に基づいて、上述したレイアウト処理が行われ、それにより、完成型データパッケージ44が表す表示内容が印刷される。   As described above, the printer 20 includes the interpretation unit 72 that interprets the input completed data package 44. Based on the interpretation result of the interpretation unit 72, the above-described layout processing is performed. The display content represented by the completed data package 44 is printed.

ところで、プリンタ20には、例えば図1に示すように、不確定要素として画像データが定められていないテンプレート型データパッケージ35が入力される場合がある。本実施形態では、このような場合であっても、解釈ユニット72を有効に利用することができるようにするために、テンプレート型データパッケージ35を完成型データパッケージ44に変換する処理を実行するプリプロセッサ71が備えられる。プリプロセッサ71は、例えば、テンプレート型データパッケージ35に、ユーザから操作部21を介して指定された画像データ(以下、ユーザ指定画像データ)に関する情報(例えばアクセスパス情報)を割り付ける等の処理を行うことで、不確定要素が除去された完成型データパッケージ44を生成し、生成した完成型データパッケージ44を、解釈ユニット72に出力する。   Incidentally, for example, as shown in FIG. 1, a template type data package 35 in which image data is not defined as an uncertain element may be input to the printer 20. In the present embodiment, even in such a case, a preprocessor that executes processing for converting the template type data package 35 into the complete type data package 44 so that the interpretation unit 72 can be used effectively. 71 is provided. For example, the preprocessor 71 performs processing such as assigning information (for example, access path information) related to image data (hereinafter referred to as user-specified image data) designated by the user via the operation unit 21 to the template type data package 35. Then, the completed data package 44 from which the indeterminate elements are removed is generated, and the generated completed data package 44 is output to the interpretation unit 72.

以下、テンプレート型データパッケージ35と完成型データパッケージ44とについて説明する。   Hereinafter, the template type data package 35 and the completed type data package 44 will be described.

図2Aは、テンプレート型データパッケージ35の構成概念例を示す。図2Bは、完成型データパッケージ44の構成概念例を示す。   FIG. 2A shows an example of the configuration concept of the template type data package 35. FIG. 2B shows an example of the configuration concept of the completed data package 44.

テンプレート型データパッケージ35は、オブジェクト(例えば画像或いは文字列)のの配置領域の位置情報が記述されたCSS文書36と、CSS文書36で記述された位置情報が表す配置領域にオブジェクトをどのように表示するかが記述されたスクリプト34とを含んでいる。この図2Aと、図2Bとを比較すれば分かるように、テンプレート型データパッケージ35では、表示対象となる画像データが指定されていないので、画像データが一つの不確定要素となっている。なお、テンプレート型データパッケージ35において、スクリプト34とCSS文書36とは、一つのデータファイルに記述されていてもよいし、スクリプト34とCSS文書36とは別々のデータファイルであっても良い。また、スクリプト34とCSS文書36とのうち、例えば、スクリプト34は、XHTML等の構造化タグ言語で記述することができ、CSS文書36は、テキストで記述することができる。   The template type data package 35 describes how to place an object in a CSS document 36 in which position information of an arrangement area of an object (for example, an image or a character string) is described, and an arrangement area represented by the position information described in the CSS document 36. It includes a script 34 that describes whether to display it. As can be seen from a comparison between FIG. 2A and FIG. 2B, in the template type data package 35, the image data to be displayed is not designated, so the image data is one uncertain factor. In the template type data package 35, the script 34 and the CSS document 36 may be described in one data file, or the script 34 and the CSS document 36 may be separate data files. Of the script 34 and the CSS document 36, for example, the script 34 can be described in a structured tag language such as XHTML, and the CSS document 36 can be described in text.

完成型データパッケージ44は、CSS文書36の内容と、画像データに関する情報46とが埋め込まれたスクリプトファイルである。すなわち、完成型データパッケージ44では、テンプレート型データパッケージ35とは異なり、画像データは確定した要素として存在する。完成型データパッケージ44は、例えば、XHTML等の構造化タグ言語で構築することができる。また、画像データに関する情報46は、例えば、画像データの識別情報(一例として、画像データの名称又は画像データへのアクセスパス情報)であっても良いし、画像データそれ自体であっても良い。   The completed data package 44 is a script file in which the contents of the CSS document 36 and information 46 related to image data are embedded. That is, unlike the template-type data package 35, the completed-type data package 44 has image data as defined elements. The completed data package 44 can be constructed by a structured tag language such as XHTML, for example. The information 46 related to the image data may be, for example, image data identification information (for example, the name of the image data or access path information to the image data) or the image data itself.

図3Aは、テンプレート型データパッケージ35を完成型データパッケージ44に変換する場合に行われる処理の概念を表す図である。図3Bは、図3Aを参照して説明した処理によって得られた完成型データパッケージ44が表す表示内容の一例を示す図である。   FIG. 3A is a diagram illustrating a concept of processing performed when the template type data package 35 is converted into the complete type data package 44. FIG. 3B is a diagram illustrating an example of display contents represented by the completed data package 44 obtained by the processing described with reference to FIG. 3A.

図3Aに示すように、テンプレート型データパッケージ44に含まれているCSS文書36から、参照番号61に示すようなページレイアウトが導き出せるとする。また、そのCSS文書36には、例えば、第一の画像配置領域62Aの位置情報と、第二の画像配置領域62Bの位置情報とが記述されているとする。各領域62A及び62Bは、例えば、図3Aに示すように矩形領域であれば、一つの頂点座標と、縦及び横のサイズとによって表すことができる。   As shown in FIG. 3A, it is assumed that a page layout as indicated by reference numeral 61 can be derived from the CSS document 36 included in the template type data package 44. In the CSS document 36, for example, position information of the first image arrangement area 62A and position information of the second image arrangement area 62B are described. If each of the regions 62A and 62B is a rectangular region as shown in FIG. 3A, for example, it can be represented by one vertex coordinate and vertical and horizontal sizes.

さらに、図3Aに示すように、テンプレート型データパッケージ35(例えば、そのうちのCSS文書36)には、領域ID=1の配置領域の位置情報である第一の位置情報と、領域ID=2の配置領域の位置情報である第二の位置情報とが記述されているとする。また、テンプレート型データパッケージ35(例えば、そのうちのスクリプト34)では、領域ID=1にフォトID=1が対応付けられており、且つ、領域ID=2にフォトID=2が対応付けられているとする。   Further, as shown in FIG. 3A, the template type data package 35 (for example, the CSS document 36) includes the first position information that is the position information of the arrangement area with the area ID = 1 and the area ID = 2. It is assumed that the second position information that is the position information of the arrangement area is described. In the template type data package 35 (for example, the script 34), the photo ID = 1 is associated with the region ID = 1, and the photo ID = 2 is associated with the region ID = 2. And

この場合、プリプロセッサ71は、図3Aに例示した内容が記述されたテンプレート型データパッケージ35を解析することにより、そのテンプレート型データパッケージ35を、図3Bに例示する印刷結果が得られるような完成型データパッケージ44に変換し、変換後の完成型データパッケージ44を解釈ユニット72に出力する。具体的には、例えば、プリプロセッサ71は、ユーザに指定された画像データのうち一番目の画像データが表す画像63Aを、第一の位置情報から特定される領域62Aに配置することと、ユーザに指定された画像データのうち二番目の画像データが表す画像63Bを、第二の位置情報から特定される領域62Bに配置することとを意味する内容を含んだ完成型データパッケージ44を生成する。このため、生成された完成型データパッケージ44では、例えば、第一の領域62Aを表す第一の位置情報に、上記一番目の画像データに関する情報が割り付けられており、第二の領域62Bを表す第二の位置情報に、上記二番目の画像データに関する情報が割り付けられている。この完成型データパッケージ44が解釈ユニット72に出力された後、例えば、解釈ユニット72の解釈結果に基づいて、レイアウタ75は、ページレイアウトを特定し、且つ、画像データに関する情報に基づいて画像データを取り込み、取り込んだ画像データが表す画像が上記特定されたページレイアウトの適切な位置に割り当てられたレイアウトオブジェクトを生成する。このレイアウトオブジェクトを参照することにより、図3Bに例示したような内容を表示することができる。   In this case, the preprocessor 71 analyzes the template type data package 35 in which the contents exemplified in FIG. 3A are described, and thereby the template type data package 35 is obtained as a completed type from which the printing result exemplified in FIG. 3B can be obtained. The data package 44 is converted, and the converted complete data package 44 is output to the interpretation unit 72. Specifically, for example, the preprocessor 71 arranges the image 63A represented by the first image data among the image data designated by the user in the area 62A specified from the first position information, and A complete data package 44 is generated that includes content indicating that the image 63B represented by the second image data of the designated image data is to be arranged in the region 62B specified from the second position information. For this reason, in the generated complete data package 44, for example, information on the first image data is allocated to the first position information representing the first area 62A, and represents the second area 62B. Information about the second image data is assigned to the second position information. After the completed data package 44 is output to the interpretation unit 72, for example, based on the interpretation result of the interpretation unit 72, the layouter 75 specifies the page layout and outputs the image data based on the information about the image data. A layout object is generated in which the image represented by the captured image data is assigned to an appropriate position of the specified page layout. By referring to this layout object, the contents illustrated in FIG. 3B can be displayed.

なおここでユーザーが画像を指定する順番と、画像を配置する領域に相関性があるのは、プリンタの備える操作系の機能に起因している。つまり特定の領域を指定しその指定した領域への特定画像の配置指定が困難な操作系しか備えていないためである。もし特定の領域に特定画像の配置を指定できる装置であれば、画像を指定する順番と、画像が配置される領域に相関性を持たせることは必須ではない。   Here, the correlation between the order in which the user designates the image and the region in which the image is arranged is attributed to the operation system function of the printer. In other words, it is only provided with an operation system in which a specific area is designated and it is difficult to designate the arrangement of the specific image in the designated area. If the device can specify the arrangement of a specific image in a specific area, it is not essential to correlate the order in which the images are specified and the area in which the image is arranged.

図4は、テンプレート型データパッケージ35に含まれるスクリプト34の構成概要例を示す。   FIG. 4 shows a configuration outline example of the script 34 included in the template type data package 35.

スクリプト34には、ヘッダ情報34Aと、ドキュメント属性情報34Bと、ページ属性情報34Cと、ページ表示属性情報34Dとが記述されている。   In the script 34, header information 34A, document attribute information 34B, page attribute information 34C, and page display attribute information 34D are described.

ヘッダ情報34Aには、例えば、CSS文書の指定に関する情報が含まれている。ここで、CSS文書の指定に関する情報とは、例えば、CSS文書の識別情報であっても良いし、CSS文書の指定方法に関する情報(たとえば、入力されたCSS文書を使用する旨の指令を表す情報)であっても良い。プリプロセッサ71は、このヘッダ情報34Aを解釈して、CSS文書の指定に関する情報に従って、完成型データパッケージ44を生成するために使用するCSS文書を特定する。   The header information 34A includes, for example, information related to CSS document designation. Here, the information regarding the designation of the CSS document may be, for example, identification information of the CSS document, or information regarding the designation method of the CSS document (for example, information indicating an instruction to use the input CSS document) ). The preprocessor 71 interprets the header information 34A, and specifies a CSS document to be used for generating the completed data package 44 according to the information related to the CSS document designation.

ドキュメント属性情報34Bには、一以上のページからなるドキュメントに関する属性が含まれている。具体的には、例えば、ドキュメント属性情報34Bには、フリーサイズ印刷が可能か否かを表す情報や、印刷サイズの上限値及び下限値の少なくとも一方を表す情報や、どんな表示サイズ(例えばA4)に基づいてスクリプト34が構築されているか(換言すれば、想定表示サイズは何であるか)などが含まれている。ここで、「フリーサイズ印刷」とは、想定表示サイズ(例えばA4サイズ)とは異なる印刷サイズ(例えばL版サイズ又はB4サイズ)で印刷することを意味する。プリプロセッサ71は、例えば、第一種のタグを検出することで、スクリプト34における各種記述のうちどれがドキュメント属性情報34Bを構成する記述であるかを特定する。   The document attribute information 34B includes attributes relating to a document composed of one or more pages. Specifically, for example, the document attribute information 34B includes information indicating whether or not free size printing is possible, information indicating at least one of an upper limit value and a lower limit value of the print size, and any display size (for example, A4). Whether the script 34 is constructed based on this (in other words, what is the assumed display size) is included. Here, “free size printing” means printing with a print size (for example, L size or B4 size) different from the assumed display size (for example, A4 size). For example, the preprocessor 71 detects the first type tag to identify which of the various descriptions in the script 34 is the description constituting the document attribute information 34B.

ページ属性情報34Cには、ドキュメントを構成するページに関する属性、例えば、そのページに幾つの画像が印刷されるかを表す情報が含まれている。プリプロセッサ71は、例えば、第二種のタグを検出することで、スクリプト34における各種記述のうちどれがページ属性情報34Cを構成する記述であるかを特定することができる。   The page attribute information 34C includes attributes relating to pages constituting the document, for example, information indicating how many images are printed on the page. For example, the preprocessor 71 can identify which of the various descriptions in the script 34 is the description constituting the page attribute information 34C by detecting the second type tag.

ページ表示属性情報34Dには、ページに印刷されるオブジェクトの表示に関する情報が含まれている。プリプロセッサ71は、例えば、第三種のタグを検出することで、スクリプト34における各種記述のうちどれがページ表示属性情報34Dを構成する記述であるかを特定することができる。ページ表示属性情報34Dには、例えば、ユーザから画像データの指定を受けた場合に何番目の画像データが表す画像をどの領域(ページレイアウト上の領域)に割り当てるかを記述した第一の属性34D1と、その画像をどのように表示するか(例えば画像をどの方向に何度回転させるか)を表した第二の属性34D2とが含まれる場合がある。また、例えば、ページ表示属性情報34Dには、どんな項目に対応した文字をどの領域(ページレイアウト上の領域)に割り当てるかを記述した第三の属性34D3と、その文字をどのように表示するか(例えばどんな文字サイズで表示するか)を表した第四の属性34D4とが含まれる場合もある。なお、第三の属性34D3には、所定の形式(例えば%○の形式)で表されたマクロ文字が含まれる場合がある。マクロ文字とは、表示対象の項目を表す情報である。プリプロセッサ71は、マクロ文字を解釈することにより、表示対象の項目を特定することができる。例えば、プリプロセッサ71は、マクロ文字“%F”を検出した場合には、完成型データパッケージ44に割り当てる画像データのアクセスパス情報を特定し、特定されたアクセスパス情報を完成型データパッケージ44に記述する。それにより、その完成型データパッケージ44に基づいて印刷処理が実行された場合には、用紙に、その記述されたアクセスパス情報が印刷される。   The page display attribute information 34D includes information related to the display of the object printed on the page. For example, the preprocessor 71 can identify which of the various descriptions in the script 34 is the description constituting the page display attribute information 34D by detecting the third type tag. The page display attribute information 34D includes, for example, a first attribute 34D1 that describes which area (area on the page layout) the image represented by which image data is assigned to when designated by the user. And a second attribute 34D2 representing how the image is displayed (for example, in which direction the image is rotated). Further, for example, in the page display attribute information 34D, a third attribute 34D3 describing which area (area on the page layout) a character corresponding to what item is assigned, and how the character is displayed. A fourth attribute 34D4 representing (for example, what character size to display) may be included. Note that the third attribute 34D3 may include a macro character represented in a predetermined format (for example, the format of% ○). Macro characters are information representing items to be displayed. The preprocessor 71 can identify items to be displayed by interpreting macro characters. For example, when the preprocessor 71 detects the macro character “% F”, it specifies the access path information of the image data to be assigned to the complete data package 44 and describes the specified access path information in the complete data package 44. To do. As a result, when the printing process is executed based on the completed data package 44, the described access path information is printed on a sheet.

図5は、テンプレート型データパッケージ35に含まれるCSS文書36の構成概要例を示す。   FIG. 5 shows a configuration outline example of the CSS document 36 included in the template type data package 35.

CSS文書36には、例えば、ページレイアウトのサイズ(例えば、ページレイアウトそれ自体のサイズ及びページレイアウトのマージンのサイズ)に関するサイズ情報36Aと、画像の配置領域の位置情報36Bと、文字の配置領域の位置情報36Cとが記述される。CSS文書36における各種記述がどんな情報36A、36B、36Cを構成する情報であるかは、例えば、どんな文字コードの直後の括弧で閉じられているかを検出することにより特定することができる。   The CSS document 36 includes, for example, size information 36A relating to the page layout size (for example, the size of the page layout itself and the size of the page layout margin), position information 36B of the image arrangement area, character arrangement area, and the like. Position information 36C is described. The information 36A, 36B, 36C constituting the various descriptions in the CSS document 36 can be specified by detecting, for example, what character code is enclosed in parentheses immediately after the character code.

図6は、完成型データパッケージ44の構成概念の具体例を示す。   FIG. 6 shows a specific example of the configuration concept of the completed data package 44.

完成型データパッケージ44は、図2Bを参照して説明したように、CSS文書の内容と、画像データに関する情報とが埋め込まれたスクリプトファイルである。プリプロセッサ71は、テンプレート型データパッケージ35に含まれていたスクリプト34を用いてこの図6に示すような完成型データパッケージ44を生成することができる。   As described with reference to FIG. 2B, the completed data package 44 is a script file in which the content of the CSS document and information related to image data are embedded. The preprocessor 71 can generate the completed data package 44 as shown in FIG. 6 by using the script 34 included in the template type data package 35.

例えば、プリプロセッサ71は、スクリプトファイルのヘッダ44Aに、CSS文書36の内容44A1と、属性情報44A2とを埋め込む。CSS文書36の内容44A1として、プリプロセッサ71は、図5に例示したCSS文書36の記述内容をヘッダ44Aに入れ込む。また、プリプロセッサ71は、図4を参照して説明したドキュメント属性情報34Bとページ属性情報34Cとの両方の内容が反映された属性情報44A2を生成し、生成した属性情報44A2をヘッダ44Aに入れ込む。なお、プリプロセッサ71は、属性情報44A2を生成する場合、ドキュメント属性情報34Bとページ属性情報34Cとの間で同種の情報が存在し、且つ、その同種の情報が異なる場合には、ページ属性情報34Cにおける情報を採用し、その採用した情報を属性情報44A2に含めるようにする。   For example, the preprocessor 71 embeds the content 44A1 of the CSS document 36 and the attribute information 44A2 in the header 44A of the script file. As the content 44A1 of the CSS document 36, the preprocessor 71 inserts the description content of the CSS document 36 illustrated in FIG. 5 into the header 44A. Further, the preprocessor 71 generates attribute information 44A2 reflecting the contents of both the document attribute information 34B and the page attribute information 34C described with reference to FIG. 4, and inserts the generated attribute information 44A2 into the header 44A. . When the preprocessor 71 generates the attribute information 44A2, if the same kind of information exists between the document attribute information 34B and the page attribute information 34C and the same kind of information is different, the page attribute information 34C Is adopted, and the adopted information is included in the attribute information 44A2.

また、例えば、プリプロセッサ71は、どの配置領域にどんな画像データが表す画像を配置するかに関する画像属性44Bを入れ込む。具体的には、例えば、プリプロセッサ71は、上述した第一の属性34D1(図4参照)を解析し、且つ、ユーザに指定された画像データのうちの一番目の画像データが特定された場合には、その画像データの識別情報(例えば、”E:\DCIM100EP\300PIX.JPG”)を、第一の属性34D1に含まれていた特定のタグ言語(例えば<div class = “container container_1>)に割り付ける。これにより、これまで不確定だった画像データが、上記識別情報を有する画像データに確定される。   Further, for example, the preprocessor 71 inserts an image attribute 44B regarding which image data represented by what image data is arranged in which arrangement region. Specifically, for example, the preprocessor 71 analyzes the first attribute 34D1 (see FIG. 4) described above, and when the first image data of the image data designated by the user is specified. The identification information of the image data (for example, “E: \ DCIM100EP \ 300PIX.JPG”) is added to the specific tag language (for example, <div class = “container container_1>”) included in the first attribute 34D1. As a result, the image data that has been indefinite until now is determined as the image data having the identification information.

また、例えば、プリプロセッサ71は、ユーザから操作部21を介して、ユーザ指定の画像データに対する画像補正方法(例えば、より明るくする、より鮮明にする等)が入力された場合には、その画像補正方法に関する画像補正情報44Cを、ユーザ指定の画像データに対応付ける(例えば、ユーザ指定の画像データに関する画像属性44Bの下位に、その画像データの補正方法に関する画像補正情報44Cを入れ込む)。これにより、例えば、この完成型データパッケージ44が解釈ユニット72により解釈されれば、レイアウタ75が、その解釈結果に基づいて、その画像データが表す画像に対して、画像補正情報44Cが表す補正方法による補正を実行することができる。   Further, for example, when an image correction method (for example, brighter or clearer) is input to the user-specified image data from the user via the operation unit 21, the preprocessor 71 corrects the image. The image correction information 44C related to the method is associated with the user-specified image data (for example, the image correction information 44C related to the correction method of the image data is inserted below the image attribute 44B related to the user-specified image data). Thus, for example, if the complete data package 44 is interpreted by the interpretation unit 72, the layout method is used by the layouter 75 to represent the image represented by the image data based on the interpretation result. Correction can be executed.

また、例えば、プリプロセッサ71は、どの配置領域にどんな文字列を配置するかに関する文字属性44Dを入れ込む。具体的には、例えば、プリプロセッサ71は、上記第三の属性34D3(特にマクロ文字)から、ユーザ指定の画像データのうちの一番目の画像データの識別情報を文字表示することを特定した場合には、その画像データの識別情報を表す文字列(例えば、”\DCIM100EP\300PIX.JPG”)を展開し、所定のタグ(例えば、<span>及び</span>)で挟んで、完成型データパッケージ44に入れ込む。これにより、これまで不確定だった文字列が、上記識別情報を表す文字列に確定される。この完成型データパッケージ44が解釈されて印刷処理が実行されれば、その画像データの識別情報を表す文字列が印刷される。その文字列の配置位置が、CSS文書36において、上記一番目の画像データが表す画像の配置領域内又はその近傍に設定されていれば、その文字列は、その配置領域上又はその近傍に印刷される。   Further, for example, the preprocessor 71 inserts a character attribute 44D relating to what character string is arranged in which arrangement area. Specifically, for example, when the preprocessor 71 specifies that the identification information of the first image data of the user-specified image data is to be displayed in characters from the third attribute 34D3 (especially macro characters). Expands a character string (for example, “\ DCIM100EP \ 300PIX.JPG”) representing the identification information of the image data, and sandwiches it between predetermined tags (for example, <span> and </ span>), thereby completing the completed data. Insert into package 44. As a result, the character string that has been indefinite until now is confirmed as a character string representing the identification information. When the completed data package 44 is interpreted and the printing process is executed, a character string representing the identification information of the image data is printed. If the arrangement position of the character string is set in or near the arrangement area of the image represented by the first image data in the CSS document 36, the character string is printed in or near the arrangement area. Is done.

図7は、プリプロセッサ71によって行われる処理流れの一例を示す。   FIG. 7 shows an example of the processing flow performed by the preprocessor 71.

プリプロセッサ71は、第一のIF22Aを介して入力されたファイルを取り込む(ステップS10)。なお、第一のIF22Aを介して完成型データパッケージ44が入力された場合には、その完成型データパッケージ44に割り当てられている情報に対応した画像データも一緒に入力される。   The preprocessor 71 takes in the file input via the first IF 22A (step S10). When the completed data package 44 is input via the first IF 22A, image data corresponding to information assigned to the completed data package 44 is also input.

プリプロセッサ71は、取り込まれたファイルがテンプレート型データパッケージ35であるか完成型データパッケージ44であるかを判別する(S20)。ここでは、例えば、プリプロセッサ71は、取り込まれたファイルの拡張子が何であるかや、或いは、取り込まれたファイルの記述内容がどのようになっているか(一例として、画像データに関する情報が記述されているか否か)を解析することにより、テンプレート型データパッケージ35であるか完成型データパッケージ44であるかを判別する。   The preprocessor 71 determines whether the captured file is the template type data package 35 or the complete type data package 44 (S20). Here, for example, the preprocessor 71 indicates what the extension of the captured file is, or what is the description content of the captured file (for example, information about image data is described). Whether it is the template type data package 35 or the complete type data package 44.

S20の判別の結果、完成型データパッケージ44であると判別された場合、プリプロセッサ71は、その完成型データパッケージ44を解釈ユニット72にそのまま出力する(S50)。   As a result of the determination in S20, when it is determined that the package is a completed data package 44, the preprocessor 71 outputs the completed data package 44 to the interpretation unit 72 as it is (S50).

S20の判別の結果、テンプレート型データパッケージ35であると判別された場合、プリプロセッサ71は、そのパッケージ35に含まれるスクリプト34におけるタグ構造や、CSS文書36の内容を解析して、テンプレート型データパッケージ35を完成型データパッケージ44に変換する処理を実行する(S30)。この処理は、テンプレート型データパッケージ35が入力され、且つ、テンプレート型データパッケージ35が表すレイアウトに組み合わせる画像の画像データが指定されたときに(例えば、ユーザから操作部21を介して画像データの指定を受けたときに)、開始される。   When it is determined that the template type data package 35 is determined as a result of the determination in S20, the preprocessor 71 analyzes the tag structure in the script 34 included in the package 35 and the content of the CSS document 36, and the template type data package. A process of converting 35 into a complete data package 44 is executed (S30). This process is performed when a template type data package 35 is input and image data of an image to be combined with a layout represented by the template type data package 35 is designated (for example, designation of image data from the user via the operation unit 21). Be started).

S30では、例えば、プリプロセッサ71は、ヘッダ情報34Aにおける、CSS文書の指定に関する情報を解析することにより、使用するCSS文書36を特定する。   In S30, for example, the preprocessor 71 identifies the CSS document 36 to be used by analyzing information related to the designation of the CSS document in the header information 34A.

また、例えば、プリプロセッサ71は、特定されたCSS文書36とスクリプト34とにおける「container」や「photoID」等の記述から、ページレイアウトにおけるどの配置領域が画像の配置領域であるかや、ユーザに指定された画像データのうち何番目の画像データに関する情報を割り付けるかを特定し、特定された配置領域の位置情報に、特定された画像データに関する情報をスクリプトファイル44上で割り付ける(S30A)。なお、プリプロセッサ71は、例えば、ユーザから複数の画像データの指定を受けた場合、初めに指定された画像データを一番目の画像データとして特定してもよいし、撮影日時(或いは更新日時)が最も古い画像データを一番目の画像データとして特定してもよい。   Further, for example, the preprocessor 71 specifies to the user which layout area in the page layout is the image layout area from the description of “container”, “photoID”, etc. in the specified CSS document 36 and script 34. The number of the image data regarding the specified image data to be assigned is specified, and the information about the specified image data is assigned to the position information of the specified arrangement area on the script file 44 (S30A). For example, when receiving a plurality of image data designations from the user, the preprocessor 71 may specify the first designated image data as the first image data, or the shooting date (or update date) is specified. The oldest image data may be specified as the first image data.

また、例えば、プリプロセッサ71は、特定されたCSS文書36とスクリプト34とにおける「caption」や「caption-value=%A」等の記述から、ページレイアウトにおけるどの配置領域が文字列の配置領域であるかや、どんな項目の文字列を展開するかを特定し、特定された配置領域の位置情報に、特定された項目に対応する文字列をスクリプトファイル44上で割り付ける(S30B)。例えば、プリプロセッサ71は、マクロ文字の記述から、印刷対象の項目が撮影日時であると判断した場合には、画像データ内から撮影日時の情報を取得し、取得した撮影日時を表す文字列を、スクリプトファイル44に記述する。   Further, for example, the preprocessor 71 determines which layout area in the page layout is a text string layout area from the descriptions such as “caption” and “caption-value =% A” in the specified CSS document 36 and script 34. Or, what item character string is to be developed is specified, and the character string corresponding to the specified item is assigned to the position information of the specified arrangement area on the script file 44 (S30B). For example, if the preprocessor 71 determines that the item to be printed is the shooting date / time from the description of the macro character, the preprocessor 71 acquires shooting date / time information from the image data, and a character string representing the acquired shooting date / time is obtained. It is described in the script file 44.

また、プリプロセッサ71は、操作部21等のデバイスを介して印刷サイズの指定をユーザから受けた場合、ユーザ指定の印刷サイズと、テンプレート型データパッケージ35(例えば、特にドキュメント属性情報34B)内の想定印刷サイズとを比較し、ユーザ指定の印刷サイズと想定印刷サイズとが異なるか否かを判断する。もし、想定印刷サイズとユーザ指定の印刷サイズとが異なっていると判断され、且つ、テンプレート型データパッケージ35においてフリーサイズ印刷が可能であることを示す情報が含まれていることを検出した場合には、プリプロセッサ71は、ユーザ指定の印刷サイズで印刷するための情報をスクリプトファイル44に設定する(S30C)。具体的には、例えば、プリプロセッサ71は、想定表示サイズとユーザ指定の印刷サイズとに基づいて、想定表示サイズからユーザ指定の印刷サイズに変更するためのサイズ変更倍率を計算する。そして、プリプロセッサ71は、計算されたサイズ変更倍率に基づいて、テンプレート型データパッケージ35(例えばそのうちのCSS文書36)における種々のサイズ(例えば少なくともページレイアウトのサイズ)に関するサイズ情報を、ユーザ指定の印刷サイズで印刷するためのサイズ情報に変更し、変更後のサイズ情報をスクリプトファイル44に記述する。また、その際、印刷サイズの変更前と変更後とで縦横比が異なる場合には、プリプロセッサ71は、更に、サイズ変更規則を完成型データパッケージ44に含める。サイズ変更規則としては、例えば、縦横比を維持しつつ印刷対象の全体が変更後の印刷サイズに収まるようにする、縦横比を維持しないで印刷対象の全体が変更後の印刷サイズに収まるようにする等の規則を採用することができる。なお、これは、例えば、画像データが表す画像のサイズと、配置領域のサイズとが異なる場合にも、適用することができる。すなわち、画像データが表す画像のサイズ(例えば、縦及び横のピクセルサイズ)と、配置領域のサイズとが異なる場合には、プリプロセッサ71は、その配置領域内に画像を配置するためのサイズ変更規則をスクリプトファイル44に設定することができる。この場合、解釈ユニット72又はレイアウタ75が、そのサイズ変更規則に従って、画像データのサイズ又は形状を調整したり、或いは、画像データが表す画像が配置されたページレイアウト全体のサイズ又は形状を調整したりする。   Further, when the preprocessor 71 receives a print size designation from the user via a device such as the operation unit 21, the preprocessor 71 assumes the print size designated by the user and the template type data package 35 (for example, the document attribute information 34B in particular). The print size is compared, and it is determined whether the user-specified print size is different from the assumed print size. If it is determined that the assumed print size is different from the print size specified by the user and the template type data package 35 detects that information indicating that free size printing is possible is included. The preprocessor 71 sets information for printing in the print size designated by the user in the script file 44 (S30C). Specifically, for example, the preprocessor 71 calculates a size change magnification for changing from the assumed display size to the user-specified print size based on the assumed display size and the user-specified print size. The preprocessor 71 then prints size information regarding various sizes (for example, at least the page layout size) in the template type data package 35 (for example, the CSS document 36) based on the calculated size change magnification. The size information is changed to size information for printing in size, and the changed size information is described in the script file 44. At this time, if the aspect ratio is different between before and after the print size change, the preprocessor 71 further includes a size change rule in the completed data package 44. As the size change rule, for example, while maintaining the aspect ratio, the entire print target should be within the changed print size. Without maintaining the aspect ratio, the entire print target should be within the changed print size. It is possible to adopt rules such as This can also be applied when, for example, the size of the image represented by the image data is different from the size of the arrangement area. That is, when the size of the image represented by the image data (for example, the vertical and horizontal pixel sizes) and the size of the arrangement area are different, the preprocessor 71 changes the size change rule for arranging the image in the arrangement area. Can be set in the script file 44. In this case, the interpretation unit 72 or the layouter 75 adjusts the size or shape of the image data according to the size change rule, or adjusts the size or shape of the entire page layout on which the image represented by the image data is arranged. To do.

また、例えば、プリプロセッサ71は、ユーザから操作部21を介して、ユーザ指定の画像データに対する画像補正方法(例えば、より明るくする、より鮮明にする等)が入力された場合には、その画像補正方法に関する画像補正情報をスクリプトファイル44に設定する(S30D)。   Further, for example, when an image correction method (for example, brighter or clearer) is input to the image data specified by the user from the user via the operation unit 21, the preprocessor 71 corrects the image. Image correction information regarding the method is set in the script file 44 (S30D).

プリプロセッサ71は、S30の処理を実行することにより完成型データパッケージ44を生成した場合には、その完成型データパッケージ44を解釈ユニット72に出力する(S40)。   When the preprocessor 71 generates the completed data package 44 by executing the process of S30, the preprocessor 71 outputs the completed data package 44 to the interpretation unit 72 (S40).

以上、上述した実施形態によれば、不確定要素の無い完成型データパッケージ44を解釈する解釈ユニット72が備えられる場合に、不確定要素が存在するテンプレート型データパッケージ35が入力されても、その解釈ユニット72を利用したデータ処理を行うことができる。   As described above, according to the above-described embodiment, when the interpretation unit 72 for interpreting the completed data package 44 having no uncertain element is provided, even if the template type data package 35 having the uncertain element is input, Data processing using the interpretation unit 72 can be performed.

ところで、上述した実施形態では、種々の変形例が考えられる。例えば、図7を参照してS30Cでは、プロプロセッサ71は、ユーザ指定の印刷サイズで印刷するための情報を設定する場合、その情報として、画像や文字列が配置されたページレイアウト全体がサイズ変更(拡大又は縮小)されるような情報を設定することもできるし、或いは、画像のサイズ変更倍率と文字列のサイズ変更倍率とが異なるような情報を設定することができる。後者の場合、プリプロセッサ71は、例えば、上記配置されたページレイアウト全体にユーザ指定の印刷サイズに基づくサイズ変更倍率を適用する際に、文字サイズが所定の上限値又は下限値を超えてしまう場合には、画像及びページレイアウトにのみ、ユーザ指定の印刷サイズに基づくサイズ変更倍率を適用し、文字については、文字サイズがその所定の上限値又は下限値を超えない文字サイズになるような別のサイズ変更倍率を適用した情報を設定することができる。   By the way, in the embodiment described above, various modifications can be considered. For example, referring to FIG. 7, in S30C, when the proprocessor 71 sets information for printing at a user-specified print size, the entire page layout in which images and character strings are arranged is resized as the information. Information that can be (enlarged or reduced) can be set, or information that makes the image size change magnification different from the character string size change magnification can be set. In the latter case, the preprocessor 71, for example, when the character size exceeds a predetermined upper limit value or lower limit value when applying a size change magnification based on the print size specified by the user to the entire page layout arranged above. Applies a resizing magnification based on a user-specified print size only to images and page layouts, and for text, another size that makes the character size not exceed its predetermined upper or lower limit Information to which the change magnification is applied can be set.

以上、本発明の実施形態及び幾つかの変形例を説明したが、これらは本発明の説明のための例示であって、本発明の範囲をこれらの実施形態及び変形例にのみ限定する趣旨ではない。本発明は、他の種々の形態でも実施することが可能である。例えば、実施形態及び変形例では、プリンタを例に採って説明したが、実施形態及び変形例の内容は、デジタルカメラ或いはパーソナルコンピュータなどの種々のデータ処理装置に適用することができる。   As mentioned above, although embodiment of this invention and some modification were demonstrated, these are the illustrations for description of this invention, Comprising: In the meaning which limits the scope of the present invention only to these embodiment and modification Absent. The present invention can be implemented in various other forms. For example, in the embodiment and the modification, the printer has been described as an example. However, the contents of the embodiment and the modification can be applied to various data processing apparatuses such as a digital camera or a personal computer.

本発明の一実施形態に係るデータ処理装置が適用されたプリンタの構成を表す図である。1 is a diagram illustrating a configuration of a printer to which a data processing apparatus according to an embodiment of the present invention is applied. 図2Aは、テンプレート型データパッケージ35の構成概念例を示す。図2Bは、完成型データパッケージ44の構成概念例を示す。FIG. 2A shows an example of the configuration concept of the template type data package 35. FIG. 2B shows an example of the configuration concept of the completed data package 44. 図3Aは、テンプレート型データパッケージ35を完成型データパッケージ44に変換する場合に行われる処理の概念を表す図である。図3Bは、図3Aを参照して説明した処理によって得られた完成型データパッケージ44が表す表示内容の一例を示す図である。FIG. 3A is a diagram illustrating a concept of processing performed when the template type data package 35 is converted into the complete type data package 44. FIG. 3B is a diagram illustrating an example of display contents represented by the completed data package 44 obtained by the processing described with reference to FIG. 3A. テンプレート型データパッケージ35に含まれるスクリプト34の構成概要例を示す。A configuration outline example of the script 34 included in the template type data package 35 is shown. テンプレート型データパッケージ35に含まれるCSS文書36の構成概要例を示す。An example of a configuration outline of the CSS document 36 included in the template type data package 35 is shown. 完成型データパッケージ44の構成概念の具体例を示す。A specific example of the configuration concept of the completed data package 44 is shown. プリプロセッサ71によって行われる処理流れの一例を示す。An example of the processing flow performed by the preprocessor 71 is shown.

符号の説明Explanation of symbols

20…プリンタ、 21…操作部、 22A…第一のインターフェース装置、22B…第二のインターフェース装置、 31…RAM、 32…CPU、 33…ROM、 35…テンプレート型データパッケージ、 44…完成型データパッケージ 71…プリプロセッサ、 72…解釈ユニット   DESCRIPTION OF SYMBOLS 20 ... Printer, 21 ... Operation part, 22A ... First interface device, 22B ... Second interface device, 31 ... RAM, 32 ... CPU, 33 ... ROM, 35 ... Template type data package, 44 ... Complete type data package 71 ... Preprocessor, 72 ... Interpretation unit

Claims (6)

コンテンツのレイアウトを定義するとともに前記コンテンツとして画像を指定したデータパッケージを解釈する解釈ユニットを備えたデータ処理装置において、
レイアウトを定義したテンプレートデータを入力し、該レイアウトに組み合わせる画像の画像データを選択して、前記入力したテンプレートデータに前記選択された画像データに関する情報を割り付けることで、前記データパッケージを生成し、前記生成されたデータパッケージを前記解釈ユニットに出力する前処理ユニットを備えたことを特徴とするデータ処理装置。
In a data processing apparatus comprising an interpretation unit that defines a layout of content and interprets a data package that specifies an image as the content
By inputting template data defining a layout, selecting image data of an image to be combined with the layout, and assigning information on the selected image data to the input template data, generating the data package, A data processing apparatus, comprising: a preprocessing unit that outputs the generated data package to the interpretation unit.
前記テンプレートデータは、所定の表示サイズに従うレイアウトを定義したものであり、且つ、表示サイズの変更が可能か否かを表す変更可否情報を含み、
前記前処理ユニットが、表示サイズの指定を受け、且つ、前記入力されたテンプレートデータに含まれている変更可否情報が変更可を表す場合、前記指定された表示サイズが前記所定の表示サイズと異なっているならば、前記画像が組み合わされた前記レイアウトを前記指定された表示サイズで表示するための情報を前記データパッケージに含める、
請求項1記載のデータ処理装置。
The template data defines a layout according to a predetermined display size, and includes changeability information indicating whether the display size can be changed.
When the preprocessing unit receives a display size specification and the changeability information included in the input template data indicates changeability, the specified display size is different from the predetermined display size. If so, information for displaying the layout combined with the image at the specified display size is included in the data package.
The data processing apparatus according to claim 1.
前記テンプレートデータは、所定の項目を表す情報である項目情報を含み、
前記前処理ユニットが、前記項目情報を解釈して、前記項目情報が表す項目を特定し、前記特定された項目に対応した文字を表す文字情報を前記データパッケージに含める、
請求項1記載のデータ処理装置。
The template data includes item information that is information representing a predetermined item,
The preprocessing unit interprets the item information, identifies an item represented by the item information, and includes character information representing characters corresponding to the identified item in the data package;
The data processing apparatus according to claim 1.
前記前処理ユニットが、前記画像の表示の補正方法に関する情報を前記データパッケージに含める、
請求項1記載のデータ処理装置。
The preprocessing unit includes information on a correction method for displaying the image in the data package;
The data processing apparatus according to claim 1.
コンテンツのレイアウトを定義するとともに前記コンテンツとして画像を指定したデータパッケージを解釈する解釈ユニットが存在する場合のデータ処理方法において、
レイアウトを定義したテンプレートデータを入力するステップと、
該レイアウトに組み合わせる画像の画像データを選択するステップと、
前記入力したテンプレートデータに前記選択された画像データに関する情報を割り付けることで、前記データパッケージを生成するステップと、
前記生成されたデータパッケージを前記解釈ユニットに出力するステップと
を有するデータ処理方法。
In a data processing method when there is an interpretation unit that defines a layout of content and interprets a data package that specifies an image as the content,
Entering template data that defines the layout;
Selecting image data of an image to be combined with the layout;
Generating the data package by assigning information about the selected image data to the input template data;
Outputting the generated data package to the interpretation unit.
レイアウトを定義したテンプレートデータを入力するステップと、
該レイアウトに組み合わせる画像の画像データを選択するステップと、
前記入力したテンプレートデータに前記選択された画像データに関する情報を割り付けることで、前記テンプレートデータに前記画像データに関する情報が割り付けられたデータパッケージを生成するステップと、
前記生成されたデータパッケージを、コンテンツのレイアウトを定義するとともに前記コンテンツとして画像を指定したデータパッケージを解釈する解釈ユニットに出力するステップと
をコンピュータに実行させるためのコンピュータ読み取り可能なコンピュータプログラム。
Entering template data that defines the layout;
Selecting image data of an image to be combined with the layout;
Generating a data package in which information about the image data is assigned to the template data by assigning information about the selected image data to the input template data;
A computer-readable computer program for causing a computer to execute the generated data package and defining a content layout and outputting the data package to an interpretation unit that interprets a data package in which an image is designated as the content.
JP2004278767A 2004-09-27 2004-09-27 Data processor and processing method Withdrawn JP2006092392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004278767A JP2006092392A (en) 2004-09-27 2004-09-27 Data processor and processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004278767A JP2006092392A (en) 2004-09-27 2004-09-27 Data processor and processing method

Publications (1)

Publication Number Publication Date
JP2006092392A true JP2006092392A (en) 2006-04-06

Family

ID=36233280

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004278767A Withdrawn JP2006092392A (en) 2004-09-27 2004-09-27 Data processor and processing method

Country Status (1)

Country Link
JP (1) JP2006092392A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009087071A (en) * 2007-09-28 2009-04-23 Fujifilm Corp Information processor and information processing method
JP2010517174A (en) * 2007-01-25 2010-05-20 マイクロソフト コーポレーション Streamable interactive rendering independent page layout

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010517174A (en) * 2007-01-25 2010-05-20 マイクロソフト コーポレーション Streamable interactive rendering independent page layout
US8745486B2 (en) 2007-01-25 2014-06-03 Microsoft Corporation Streamable interactive rendering-independent page layout
JP2009087071A (en) * 2007-09-28 2009-04-23 Fujifilm Corp Information processor and information processing method

Similar Documents

Publication Publication Date Title
US7821690B2 (en) Information processing apparatus, image forming apparatus and method, and storage medium readable by computer therefor
US9317226B2 (en) Image processing apparatus for allowing a user to select a region of a web page
JP4966533B2 (en) Printing system, printing method, printing program, and recording medium
JP2000083161A (en) Image processing unit, its method and image processing system
US7973964B2 (en) Printing program that adjusts annotation location and size
JP5152031B2 (en) Image processing apparatus and computer program
US20090204893A1 (en) Dynamically configurable page numbering system
US8751923B2 (en) Image processing apparatus, image processing method, and storage medium
JP2007148486A (en) Method for supporting document browsing, system for the same, document processor, and program
US20130176597A1 (en) Information processing apparatus, information processing method, and storage medium storing a program thereof
US20120092730A1 (en) Information processing apparatus, information processing method, and storage medium storing a program thereof
JP2006092392A (en) Data processor and processing method
JP2005208723A (en) Printing apparatus and medium type setting method
JP7238482B2 (en) program
JP4978202B2 (en) Printing program and image forming system
US9256581B2 (en) Information processing apparatus, information processing method, and storage medium for storing program
KR101508075B1 (en) Information processing apparatus, web browser control method, and storage medium storing program thereof
JP4599950B2 (en) Processing apparatus and processing method
US20080198390A1 (en) Image processing apparatus, image processing method, and program
JP4305343B2 (en) Image processing device
JP2006238248A (en) Apparatus and method for processing data group including multiple data
US20100141976A1 (en) Information processing apparatus, information processing method, and storage medium
JP2006091956A (en) Processor and processing method
JP2008083270A (en) Image forming system and image forming method
JP2008040773A (en) Image output device and image output program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20071204