JP6757368B2 - Information processing equipment, processing methods, and programs - Google Patents

Information processing equipment, processing methods, and programs Download PDF

Info

Publication number
JP6757368B2
JP6757368B2 JP2018126338A JP2018126338A JP6757368B2 JP 6757368 B2 JP6757368 B2 JP 6757368B2 JP 2018126338 A JP2018126338 A JP 2018126338A JP 2018126338 A JP2018126338 A JP 2018126338A JP 6757368 B2 JP6757368 B2 JP 6757368B2
Authority
JP
Japan
Prior art keywords
image
image data
processing
enlargement
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018126338A
Other languages
Japanese (ja)
Other versions
JP2018186537A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2018126338A priority Critical patent/JP6757368B2/en
Publication of JP2018186537A publication Critical patent/JP2018186537A/en
Application granted granted Critical
Publication of JP6757368B2 publication Critical patent/JP6757368B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Storing Facsimile Image Data (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

本発明は、例えば、プリンタなどの画像出力装置に対して外部デバイスとして動作する移動体端末などの情報処理装置で実行される、例えば、レンダリング処理に関するものである。 The present invention relates to, for example, a rendering process executed by an information processing device such as a mobile terminal that operates as an external device for an image output device such as a printer.

近年、カメラ機能が搭載された可搬型多機能携帯端末(以下、モバイルコンピュータ)が爆発的に普及し、デジタルカメラや従来のパーソナルコンピュータ(以下、PC)の販売台数を遥かに凌ぐ勢いで拡販されている。 In recent years, portable multifunctional mobile terminals (hereinafter, mobile computers) equipped with camera functions have exploded in popularity, and sales have expanded at a rate that far exceeds the number of digital cameras and conventional personal computers (hereinafter, PCs) sold. ing.

このようなモバイルコンピュータは、基本的には3つの要素で成り立っている。即ち、コンピュータ自身であるハードウェアと、該ハードウェア上で動作するオペレーティングシステム(以下、OS)と、そのOS上で動作するアプリケーションである。ユーザは、そのアプリケーションを用いて、地図やメール、インターネット上のウェブサイトの閲覧等の機能を使用することが可能である。 Such a mobile computer basically consists of three elements. That is, the hardware that is the computer itself, the operating system (hereinafter, OS) that runs on the hardware, and the application that runs on the OS. The user can use the application to use functions such as maps, e-mails, and browsing websites on the Internet.

このようなモバイルコンピュータ上で動作するアプリケーションの形態としては、主に二つのものが存在する。即ち、ネイティブアプリケーションとウェブアプリケーションである。以下、それぞれの特徴を説明する。 There are two main forms of applications that run on such mobile computers. That is, native applications and web applications. The features of each will be described below.

まず、ネイティブアプリケーションとは、通常、OS毎に用意される開発環境、及び開発言語を用いて開発される。例えば、A社が提供するOS上ではC/C++言語、B社が提供するOS上ではJava(登録商標)言語、C社が提供するOS上では更に異なる開発言語を用いる、という具合である。通常、ネイティブアプリケーションは、各開発環境において予めコンパイルされ、人間が理解可能ないわゆる高水準言語から、コンピュータのCPUが解釈可能なアセンブラ等の命令セット群に変換される。このように、通常のネイティブアプリケーションでは、命令をCPUが直接解釈するために、高速動作が可能である、というメリットがある。 First, a native application is usually developed using a development environment and a development language prepared for each OS. For example, the C / C ++ language is used on the OS provided by the company A, the Java (registered trademark) language is used on the OS provided by the company B, and a different development language is used on the OS provided by the company C. Normally, a native application is precompiled in each development environment and converted from a so-called high-level language that can be understood by humans to a set of instructions such as an assembler that can be interpreted by a computer CPU. As described above, in a normal native application, since the CPU directly interprets the instruction, there is an advantage that high-speed operation is possible.

一方、ウェブアプリケーションとは、近年では、各コンピュータ上のOSに標準的に組み込まれているウェブブラウザ上で動作するアプリケーションのことである。そのアプリケーションはウェブブラウザが解釈できるよう、一般的には、HTML5及びCSS、さらにJavaScript(登録商標)等の言語を用いて開発される。これらはウェブ標準言語であるため、これらのウェブ標準言語でウェブアプリケーションを一旦記述すれば、ウェブブラウザが動作する環境であれば、どこでも動作可能というメリットがある。 On the other hand, a web application is an application that runs on a web browser that is standardly embedded in an OS on each computer in recent years. The application is generally developed using languages such as HTML5 and CSS, as well as JavaScript® so that it can be interpreted by a web browser. Since these are web standard languages, once a web application is written in these web standard languages, there is an advantage that it can be operated in any environment where a web browser operates.

特開2011−233034号公報Japanese Unexamined Patent Publication No. 2011-23304

上述した近年のモバイルコンピュータは、高解像度のカメラを内蔵している。モバイルコンピュータはユーザによって日常携帯されており、かつ写真を数千枚程度記憶可能なメモリを備えているためユーザは非常に高い頻度で気楽に写真撮影を楽しむことができる。このようにして得られた写真画像に対して、例えば、モノクロ・セピア調にするフィルター処理を施したり、写真が暗い、色バランスが崩れている等の不具合を修正するための画像処理は、ユーザにとっても大変重要で欠かせない機能となっている。このような画像処理をユーザが、ストレスなく簡単に実行できるようなアプリケーションを、上記2つの形態で開発する場合、以下のような課題がある。 The recent mobile computers mentioned above have a built-in high resolution camera. Since mobile computers are carried by users on a daily basis and have a memory that can store thousands of photographs, users can enjoy taking photographs very frequently and comfortably. The user can perform image processing on the photographic image obtained in this manner, for example, by applying a filter process to make a monochrome sepia tone, or to correct problems such as a dark photograph or an imbalance in color. It is a very important and indispensable function for us. When developing an application in the above two forms in which a user can easily execute such image processing without stress, there are the following problems.

まずネイティブアプリケーションでは、上述したように処理を高速実行できるというメリットがある。しかし、このネイティブアプリケーションはOS毎に異なる開発言語で別々に開発する必要があるため、開発コストと開発時間が増大し、ユーザに迅速に提供できないという課題がある。また、ネイティブアプリケーションは、予めコンパイル(翻訳)する必要がある。そのため、例えば、アプリケーションのUI設計を動作時に変更したり、機能を動的に追加することが難しく、柔軟性に欠ける。 First, native applications have the advantage of being able to execute processing at high speed as described above. However, since this native application needs to be developed separately in a different development language for each OS, there is a problem that the development cost and the development time increase and it cannot be provided to the user quickly. In addition, the native application needs to be compiled (translated) in advance. Therefore, for example, it is difficult to change the UI design of the application at the time of operation or dynamically add functions, and it lacks flexibility.

特許文献1はウェブアプリケーションの形態の一例を開示している。ウェブアプリケーションでは通常、HTML5、CSS、JavaScript(登録商標)で記述されたアプリケーションの本体が、モバイルコンピュータ外部のサーバ上に存在する。そのアプリケーションは、利用時に動的にサーバからモバイルコンピュータにインターネットを介してダウンロードされるため、UI設計などを予めコンパイルする事なく動的に変更することが可能である。しかしながら、高度で複雑な処理を実行する場合、ウェブアプリケーションは、ブラウザのセキュリティ上の制約からブラウザ上でJavaScript(登録商標)によって実行するか、サーバ上で実行するという2つの選択肢しか存在しない。JavaScript(登録商標)は従来より、人間が視認可能な文字列のスクリプトとして記述され、そのスクリプトを動作時に随時コンパイルすることで実行することができるようになっている。このことから、複雑な処理をJavaScript(登録商標)で記述するとその動作が遅いという問題がある。 Patent Document 1 discloses an example of a form of a web application. In a web application, the main body of the application described in HTML5, CSS, and Javascript (registered trademark) usually exists on a server outside the mobile computer. Since the application is dynamically downloaded from the server to the mobile computer via the Internet at the time of use, it is possible to dynamically change the UI design without compiling in advance. However, when executing sophisticated and complicated processing, the web application has only two options, that is, it is executed by Javascript (registered trademark) on the browser or it is executed on the server due to the security limitation of the browser. Javascript (registered trademark) has conventionally been described as a human-visible character string script, and the script can be executed by compiling the script at any time during operation. For this reason, if a complicated process is described in Javascript (registered trademark), there is a problem that the operation is slow.

また、その処理をサーバで実行するように構築した場合、モバイルコンピュータ内部に存在する写真などのデータを、インターネットを介してサーバ上にアップロードし、処理後の結果を今度はダウンロードする時間が必要となる。これは、モバイルアプリケーションに対してストレスの少ない、即時的な処理を欲しているユーザにとっては、大きな問題となる。それに加え、サーバでの処理はオフラインでは実行できないという問題がある。 Also, if the process is built to be executed on the server, it will take time to upload the data such as photos existing inside the mobile computer to the server via the Internet and download the processed result this time. Become. This is a major problem for users who want less stressful, immediate processing of their mobile applications. In addition, there is a problem that the processing on the server cannot be executed offline.

さらに、画像処理において画像拡大処理を実行する場合、メモリ上に拡大前と拡大後の画素の値を保持する必要があるため、画素数が多い程、メモリを多く使用する。しかしながら、上記のようなアプリケーションを、例えばモバイルコンピュータが実行する場合、大容量のRAMをメモリとして実装することは難しい。加えて、上記のようなウェブアプリケーションは画像データをバイナリデータではなく文字列データとして保持するので、同じ量の画像データをバイナリデータで保持する場合と比べて大きな容量のメモリを必要とする。そのため、画像拡大処理には更に大きな容量のメモリを必要とし、コンピュータがメモリ不足に陥りやすい。 Further, when the image enlargement processing is executed in the image processing, it is necessary to hold the values of the pixels before and after the enlargement in the memory. Therefore, the larger the number of pixels, the more the memory is used. However, when a mobile computer, for example, executes an application as described above, it is difficult to implement a large-capacity RAM as a memory. In addition, since the web application as described above holds the image data as character string data instead of binary data, a large amount of memory is required as compared with the case where the same amount of image data is held as binary data. Therefore, the image enlargement process requires a larger amount of memory, and the computer tends to run out of memory.

本発明は上記の課題を解決するためになされたものであり、ハイブリッドアプリケーションを実行する場合にもメモリ不足を生じさせず、効率的に画像データを処理することが可能な情報処理装置、処理方法、及びプログラムを提供することを目的とする。 The present invention has been made to solve the above problems, and is an information processing device and a processing method capable of efficiently processing image data without causing a memory shortage even when executing a hybrid application. , And the purpose of providing the program.

上記の目的を達成するための本発明の情報処理装置は以下のような構成を備える。 The information processing apparatus of the present invention for achieving the above object has the following configuration.

即ち、プロセッサで翻訳され実行されるための命令セットが記述されている第1のプログラム層と、前記プロセッサ以外で予め翻訳された命令セットが記述されている第2のプログラム層とを含むハイブリッドアプリケーションプログラムを、前記プロセッサで実行する情報処理装置であって、画像データに対して分割処理と拡大処理を実行する分割拡大手段と、前記分割拡大手段による分割処理と拡大処理とにより得られた複数の画像データを用いて外部デバイスに対する出力処理を実行する出力手段とを有し、前記第1のプログラム層の命令セットは、HTML、CSS、JavaScriptのいずれかを含み、前記第1のプログラム層の前記分割拡大手段は、Web描画言語を用いて画像データの位置情報と画像データのサイズ情報を設定し、前記位置情報および前記サイズ情報に基づいて画像データに対して分割処理と拡大処理を実行することを特徴とする。 That is, a hybrid application including a first program layer in which an instruction set to be translated and executed by a processor is described, and a second program layer in which an instruction set pre-translated by a processor other than the processor is described. A plurality of information processing devices that execute a program on the processor, obtained by a division / enlargement means that executes division processing and enlargement processing on image data, and a plurality of division processing and enlargement processing by the division / enlargement means. It has an output means for executing output processing to an external device using image data, and the instruction set of the first program layer includes any one of HTML, CSS, and Javascript, and the instruction set of the first program layer includes the above. The division / enlargement means sets the position information of the image data and the size information of the image data using a Web drawing language, and executes the division processing and the enlargement processing on the image data based on the position information and the size information. It is characterized by.

また本発明を別の側面から見れば、プロセッサで翻訳され実行されるための命令セットが記述されている第1のプログラム層と、前記プロセッサ以外で予め翻訳された命令セットが記述されている第2のプログラム層とを含むハイブリッドアプリケーションプログラムを、前記プロセッサで実行する情報処理装置の処理方法であって、前記第1のプログラム層において画像データに対して分割処理と拡大処理を実行し、前記分割処理と前記拡大処理とにより得られた複数の画像データを用いて外部デバイスに対する出力処理を実行し、前記第1のプログラム層の命令セットは、HTML、CSS、JavaScriptのいずれかを含み、Web描画言語を用いて画像データの位置情報と画像データのサイズ情報を設定し、前記位置情報および前記サイズ情報に基づいて画像データに対して前記分割処理と前記拡大処理を実行することを特徴とする処理方法を備える。 Looking at the present invention from another aspect, a first program layer in which an instruction set to be translated and executed by a processor is described, and a first program layer in which an instruction set pre-translated by a processor other than the processor is described. A processing method of an information processing apparatus that executes a hybrid application program including two program layers by the processor, in which division processing and enlargement processing are executed on image data in the first program layer, and the division processing is performed. Output processing to an external device is executed using the plurality of image data obtained by the processing and the enlargement processing, and the instruction set of the first program layer includes any one of HTML, CSS, and Javascript, and is drawn on the Web. A process characterized by setting position information of image data and size information of image data using a language, and executing the division process and the enlargement process on the image data based on the position information and the size information. Provide a method.

さらに本発明を別の側面から見れば、ウェブ標準言語で記述された第1のプログラム層と、ウェブ標準言語とは異なるプログラム言語で記述された第2のプログラム層とを含むハイブリッドプログラムを実行するコンピュータを、画像データに対して分割処理と拡大処理を実行する分割拡大手段と、前記分割拡大手段による分割処理と拡大処理とにより得られた複数の画像データを用いて外部デバイスに対する出力処理を実行する出力手段として機能させ、前記第1のプログラム層の命令セットは、HTML、CSS、JavaScriptのいずれかを含み、前記第1のプログラム層の前記分割拡大手段は、Web描画言語を用いて画像データの位置情報と画像データのサイズ情報を設定し、前記位置情報および前記サイズ情報に基づいて画像データに対して前記分割処理と前記拡大処理を実行することを特徴とする前記コンピュータが読み取り可能なプログラムを備える。 Looking at the present invention from another aspect, a hybrid program including a first program layer written in a web standard language and a second program layer written in a programming language different from the web standard language is executed. A computer executes output processing to an external device using a division / enlargement means that executes division processing and enlargement processing on image data and a plurality of image data obtained by the division processing and enlargement processing by the division / enlargement means. The instruction set of the first program layer includes any one of HTML, CSS, and Javascript, and the division / enlargement means of the first program layer uses a Web drawing language to generate image data. A computer-readable program that sets the position information and the size information of the image data, and executes the division process and the enlargement process on the image data based on the position information and the size information. To be equipped.

従って、本発明によれば、例えば、画像拡大処理のような大きな容量のメモリを用いる画像処理を実行する場合にもメモリ不足の発生を抑えることができるという効果がある。 Therefore, according to the present invention, there is an effect that the occurrence of memory shortage can be suppressed even when performing image processing using a large capacity memory such as image enlargement processing.

本発明の代表的な実施形態である情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which is a typical embodiment of this invention. 図1に示した情報処理装置のソフトウェアの構成を示すブロック図である。It is a block diagram which shows the software structure of the information processing apparatus shown in FIG. ユーザ操作に伴う処理を示すフローチャートである。It is a flowchart which shows the process which accompanies the user operation. 実施形態1に従う写真画像選択の詳細を示すフローチャートである。It is a flowchart which shows the detail of the photographic image selection according to Embodiment 1. 実施形態1に従う画像処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the image processing according to Embodiment 1. 実施形態1に従うスタンプ追加の詳細を示すフローチャートである。It is a flowchart which shows the detail of the stamp addition according to Embodiment 1. スタンプ特定の詳細を示すフローチャートである。It is a flowchart which shows the detail of a stamp specific. スタンプ操作の詳細を示すフローチャートである。It is a flowchart which shows the detail of a stamp operation. プリンタ設定の詳細を示すフローチャートである。It is a flowchart which shows the details of a printer setting. 実施形態1に従うレンダリングの詳細を示すフローチャートである。It is a flowchart which shows the detail of the rendering according to Embodiment 1. プリントの詳細を示すフローチャートである。It is a flowchart which shows the detail of a print. アプリケーション画面の一例を示す図である。It is a figure which shows an example of an application screen. 設定画面の一例を示す図である。It is a figure which shows an example of the setting screen. バンドレンダリングを概念的に示す模式図である。It is a schematic diagram which conceptually shows a band rendering. 実施形態1に従うバンドレンダリングの詳細を示すフローチャートである。It is a flowchart which shows the detail of the band rendering according to Embodiment 1. 実施形態2に従うレンダリングの詳細を示すフローチャートである。It is a flowchart which shows the detail of the rendering according to Embodiment 2. 実施形態2に従うバンドレンダリングの詳細を示すフローチャートである。It is a flowchart which shows the detail of the band rendering according to Embodiment 2.

以下本発明の実施の形態について添付図面を参照して詳細に説明する。特に、以下の実施形態では、情報処理装置上で、後述するハイブリッド型写真印刷アプリケーションを動作させ、ユーザが選択した画像に対して、様々な画像処理を適用した後に、その画像を印刷する構成について説明する。なお、その情報処理装置の代表例としては、携帯電話やスマートフォンやタブレット端末のような携帯型情報端末が含まれる。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In particular, in the following embodiment, a configuration in which a hybrid photo printing application described later is operated on an information processing device, various image processes are applied to an image selected by a user, and then the image is printed. explain. A typical example of the information processing device includes a portable information terminal such as a mobile phone, a smartphone, or a tablet terminal.

<ハードウェア構成の説明>
図1は本発明の代表的な実施形態である情報処理装置115として、例えば、スマートフォンや携帯電話等の携帯型情報端末の構成例を説明するブロック図である。同図において、100はCPU(中央演算装置/プロセッサ)であり、以下で説明する各種処理をプログラムに従って実行する。図中のCPU100は1つであるが、複数のCPUあるいはCPUコアによって構成されていても良い。101はROMであり、CPU100により実行されるプログラムが記憶されている。102はRAMであり、CPU100によるプログラムの実行時に、各種情報を一時的に記憶するためのメモリである。なお、図1において、CPUは1つの例が示されているが、複数のCPUを用いる構成、即ち、マルチプロセッサ構成でも良い。
<Explanation of hardware configuration>
FIG. 1 is a block diagram illustrating a configuration example of a portable information terminal such as a smartphone or a mobile phone as the information processing device 115 which is a typical embodiment of the present invention. In the figure, 100 is a CPU (Central Processing Unit / Processor), and executes various processes described below according to a program. Although the number of CPUs 100 in the figure is one, it may be composed of a plurality of CPUs or CPU cores. Reference numeral 101 denotes a ROM, which stores a program executed by the CPU 100. Reference numeral 102 denotes a RAM, which is a memory for temporarily storing various information when the program is executed by the CPU 100. Although one example of the CPU is shown in FIG. 1, a configuration using a plurality of CPUs, that is, a multiprocessor configuration may be used.

103はハードディスクやフラッシュメモリ等の2次記憶装置であり、ファイルや画像解析等の処理結果を保持するデータベース等のデータや、各種プログラムを記憶するための記憶媒体である。104はディスプレイであり、各種処理を実現するための操作を受け付けるためのUI(ユーザインタフェース)や、実行された処理による処理結果等の各種情報を表示する。ディスプレイ104は、タッチセンサ105を備えても良い。 Reference numeral 103 denotes a secondary storage device such as a hard disk or a flash memory, which is a storage medium for storing data such as a database that holds processing results such as files and image analysis, and various programs. Reference numeral 104 denotes a display, which displays various information such as a UI (user interface) for receiving operations for realizing various processes and processing results of the executed processes. The display 104 may include a touch sensor 105.

情報処理装置115は、内部撮像デバイス110を備えてもよい。内部撮像デバイス110による撮像によって得られた画像データは、所定の画像処理を経た後、2次記憶装置103に保存される。また、画像データは、外部I/F(インタフェース)108を介して接続された外部撮像デバイス111から読み込むこともできる。 The information processing device 115 may include an internal imaging device 110. The image data obtained by imaging by the internal imaging device 110 is stored in the secondary storage device 103 after undergoing predetermined image processing. The image data can also be read from the external imaging device 111 connected via the external I / F (interface) 108.

情報処理装置115は、外部I/F(インタフェース)109を備え、インターネット等のネットワーク113を介して通信を行うことができる。情報処理装置115は、この通信I/F109を介して、ネットワーク113に接続されたサーバ114より画像データを取得することもできる。 The information processing device 115 includes an external I / F (interface) 109, and can communicate via a network 113 such as the Internet. The information processing device 115 can also acquire image data from the server 114 connected to the network 113 via the communication I / F 109.

情報処理装置115は、加速度センサ106を備え、情報処理装置115自身の位置姿勢に関する加速度情報を取得することができる。情報処理装置115は、外部I/F107を介し、プリンタ112と接続されており、画像データ等のデータを出力することができる。プリンタ112は、ネットワーク113にも接続されており、通信I/F109経由で、画像データを送受信することができる。 The information processing device 115 includes an acceleration sensor 106, and can acquire acceleration information regarding the position and orientation of the information processing device 115 itself. The information processing device 115 is connected to the printer 112 via an external I / F 107, and can output data such as image data. The printer 112 is also connected to the network 113, and can transmit and receive image data via the communication I / F 109.

外部I/F107〜109は、有線通信と無線通信の内、少なくともいずれかの通信形態を有するインタフェースであり、利用する通信形態に応じて外部デバイス(プリンタ112あるいはサーバ114)との通信を行う。有線通信には、例えば、USB、イーサネット(登録商標)等があり、無線通信には、無線LAN、NFC、Bluetooth(登録商標)、赤外線通信等がある。また、無線通信として、無線LANを利用する場合には、装置同士が直接接続する形態もあれば、無線LANルータ等の中継装置を介して接続する形態もある。また、外部I/F107〜109は、図では別々に構成されているが、一体となって構成されていても良い。 The external I / Fs 107 to 109 are interfaces having at least one of wired communication and wireless communication, and communicate with an external device (printer 112 or server 114) according to the communication mode to be used. Wired communication includes, for example, USB, Ethernet (registered trademark), and the like, and wireless communication includes wireless LAN, NFC, Bluetooth (registered trademark), infrared communication, and the like. Further, when a wireless LAN is used as wireless communication, there are a form in which the devices are directly connected to each other, and a form in which the devices are connected via a relay device such as a wireless LAN router. Further, although the external I / Fs 107 to 109 are separately configured in the figure, they may be integrally configured.

情報処理装置115の動作に必要な電源は、バッテリ117によって供給される。情報処理装置115が備える各種構成要素は、制御バス/データバス116を介して相互に接続され、CPU100は、この制御バス/データバス116を介して、各種構成要素を制御する。 The power supply required for the operation of the information processing apparatus 115 is supplied by the battery 117. The various components included in the information processing apparatus 115 are connected to each other via the control bus / data bus 116, and the CPU 100 controls the various components via the control bus / data bus 116.

尚、本実施形態では、情報処理装置115が、情報処理装置115が備える制御部(CPU100)によって実行されるプログラム等のソフトウェアの実行場所(ソフトウェア実行環境)となる。 In the present embodiment, the information processing device 115 serves as an execution place (software execution environment) for software such as a program executed by the control unit (CPU 100) included in the information processing device 115.

<ソフトウェアのブロック図>
図2は情報処理装置115で動作するソフトウェア構成のブロック図である。
<Software block diagram>
FIG. 2 is a block diagram of a software configuration operated by the information processing device 115.

情報処理装置115は、スクリプト層217、ネイティブ層218、及びOS層219のプログラムを実行する。これらの各層は、CPU100がROM101あるいは2次記憶装置103に記憶されている対応するプログラムを読み出し実行することにより実現される。 The information processing device 115 executes the programs of the script layer 217, the native layer 218, and the OS layer 219. Each of these layers is realized by the CPU 100 reading and executing the corresponding program stored in the ROM 101 or the secondary storage device 103.

スクリプト層217は、HTML5やCSS3、及びJavaScript等のウェブ標準言語を使って、テキストデータで命令セット(コンテンツの描画や画像の表示、動画の再生等)が記述されているプログラム層である。スクリプト層217では、アプリケーション実行環境上で、そのアプリケーション実行環境に存在するプロセッサ(例えば、CPU100)を用いて、テキストデータの各種命令セットを翻訳して実行することになる。その実行形態としては、実行の度に命令文を一行ずつ動的に翻訳する場合や、アプリケーションを起動したときに翻訳する場合、アプリケーションを情報処理装置115にインストールしたときに翻訳する場合等が考えられる。 The script layer 217 is a program layer in which an instruction set (drawing of contents, display of images, reproduction of moving images, etc.) is described by text data using a web standard language such as HTML5, CSS3, and Javascript. In the script layer 217, various instruction sets of text data are translated and executed on the application execution environment by using a processor (for example, CPU 100) existing in the application execution environment. As the execution form, there are cases where the statement is dynamically translated line by line each time it is executed, when the application is started, and when the application is installed on the information processing device 115. Be done.

以後、スクリプト層217で処理することや内容をスクリプトと呼ぶ。スクリプトの命令を情報処理装置115内で翻訳する形態の例として、ネイティブ層218やOS層219が備えるインタプリタの機能を使用することが挙げられる。尚、この実施形態においては、アプリケーションのUIの大部分が、スクリプト層217で記述されていることを想定している。 Hereinafter, the processing and contents of the script layer 217 will be referred to as a script. As an example of the form of translating the script instruction in the information processing apparatus 115, it is possible to use the interpreter function provided in the native layer 218 and the OS layer 219. In this embodiment, it is assumed that most of the UI of the application is described by the script layer 217.

ネイティブ層218は、アプリケーション実行環境以外で予め翻訳(コンパイル)された命令セットが記述されているプログラム層である。形態としては、CもしくはC++といった高水準言語で記述されたコードが、予めアプリケーションの開発者のPCやサーバ上でコンパイルされ、CPU100が解釈可能な命令の集合体となっている。以後、ネイティブ層218で処理することや内容、後述するOS層219の機能をネイティブ層218から呼び出すことを含め、ネイティブと呼ぶこととする。尚、ネイティブ層218の別の実装系として、Javaが挙げられる。Javaは、C/C++と類似の高水準言語であり、予めアプリケーション開発時の開発環境上で中間コードに翻訳される。翻訳された中間コードは、各OSが備えるJava仮想環境上で動作する。本実施形態においては、このようなプログラム形態も、ネイティブ層218の一種に含める。 The native layer 218 is a program layer in which an instruction set pre-translated (compiled) other than the application execution environment is described. As a form, code written in a high-level language such as C or C ++ is compiled in advance on the PC or server of the application developer, and is a set of instructions that can be interpreted by the CPU 100. Hereinafter, the processing and contents of the native layer 218 and the functions of the OS layer 219 described later will be referred to as native, including calling from the native layer 218. As another mounting system of the native layer 218, Java can be mentioned. Java is a high-level language similar to C / C ++, and is translated into intermediate code in advance in the development environment at the time of application development. The translated intermediate code operates in the Java virtual environment provided by each OS. In the present embodiment, such a program form is also included in a kind of native layer 218.

OS層219は、情報処理装置115のオペレーティングシステム(Operating System:OS)に対応する。OS層219は、ハードウェア機能の使用をアプリケーションに提供する役割及び固有の機能を有する。OS層219は、APIを備え、スクリプト層217やネイティブ層218から機能を使用することができる。 The OS layer 219 corresponds to the operating system (OS) of the information processing device 115. The OS layer 219 has a role and a unique function of providing the application with the use of the hardware function. The OS layer 219 includes an API, and functions can be used from the script layer 217 and the native layer 218.

この実施形態では、スクリプト層217からネイティブ層218の呼び出しを可能にすることをバインディング、もしくはバインドと呼ぶ。各種ネイティブの機能は、APIを備え、該APIをスクリプトが呼び出すことでネイティブの機能を使用することができる。このようなバインディング機能は、通常、各種OSが標準的に備えている機能である。 In this embodiment, enabling the call of the native layer 218 from the script layer 217 is called binding or binding. Various native functions are provided with APIs, and native functions can be used by calling the APIs by a script. Such a binding function is usually a function that various OSs have as standard.

尚、この実施形態では、スクリプト層217とネイティブ層218を含むアプリケーションのことをハイブリッドアプリケーションと呼ぶ。 In this embodiment, the application including the script layer 217 and the native layer 218 is referred to as a hybrid application.

スクリプト層217の画像取得部201は、ネイティブ層218に対し画像データの取得を依頼する。取得依頼時に、画像取得部201は、一意なIDを生成し、ネイティブ層218に送信する。このIDと、ネイティブ層218の画像読込部202で読み込まれた画像データは、対となって、ネイティブ層218のデータ保持部204に記憶される。これ以外にも、例えば、絶対パスを指定する方法や、ダイアログ表示を促す方法等が取得依頼の方法として挙げられる。 The image acquisition unit 201 of the script layer 217 requests the native layer 218 to acquire image data. At the time of the acquisition request, the image acquisition unit 201 generates a unique ID and transmits it to the native layer 218. This ID and the image data read by the image reading unit 202 of the native layer 218 are stored as a pair in the data holding unit 204 of the native layer 218. In addition to this, for example, a method of specifying an absolute path, a method of prompting a dialog display, and the like can be mentioned as a method of requesting acquisition.

ネイティブ層218の画像読込部202は、画像データ群215から画像データを取得する。画像データ群215からの画像データの取得方法は、スクリプト層217の画像取得部201の依頼に依存する。依頼方法は、UI上に提供されているダイアログボックスから選択する、ファイルのパスから直接画像を選択する等が挙げられる。 The image reading unit 202 of the native layer 218 acquires image data from the image data group 215. The method of acquiring the image data from the image data group 215 depends on the request of the image acquisition unit 201 of the script layer 217. The request method includes selecting from the dialog box provided on the UI, selecting the image directly from the file path, and the like.

ネイティブ層218のデータ変換部203は、ネイティブ層218のデータ(例:バイナリ形式の画像データ)をスクリプト層217で利用できる形式のデータ(例:テキスト形式(BASE64)の画像データ)に変換する。一方で、データ変換部203は、スクリプト層217から送られてきたデータ(例:テキスト形式(BASE64)の画像データ)をネイティブ層218で利用できる形式のデータ(例:バイナリ形式の画像データ)にする変換も行う。 The data conversion unit 203 of the native layer 218 converts the data of the native layer 218 (example: image data in binary format) into data in a format that can be used in the script layer 217 (example: image data in text format (BASE64)). On the other hand, the data conversion unit 203 converts the data sent from the script layer 217 (example: image data in text format (BASE64)) into data in a format that can be used in the native layer 218 (example: image data in binary format). It also performs conversion.

スクリプト層217のデータ変換部207は、スクリプト層217のデータ(例:テキスト形式の処理パラメータ)をネイティブ層218で利用できる形式のデータ(例:テキスト形式(JSON形式)の処理パラメータ)に変換する。 The data conversion unit 207 of the script layer 217 converts the data of the script layer 217 (example: text format processing parameters) into the data of the format that can be used by the native layer 218 (example: text format (JSON format) processing parameters). ..

ネイティブ層218のデータ保持部204は、画像読込部202で読み込んだ画像データ、画像処理部208で画像処理が施された画像データを保持する。保持される画像データは、例えば、RGB画像データに展開されており、すぐに画像処理が実行できる形式になっている。また、保持されている画像データは画像取得部201で生成したIDと対になっており、データ保持部204から画像データを取得する際はIDを指定すればよい。 The data holding unit 204 of the native layer 218 holds the image data read by the image reading unit 202 and the image data processed by the image processing unit 208. The retained image data is expanded into, for example, RGB image data, and is in a format in which image processing can be immediately executed. Further, the retained image data is paired with the ID generated by the image acquisition unit 201, and the ID may be specified when acquiring the image data from the data acquisition unit 204.

スクリプト層217のコンテンツ描画部205は、プリントのためのコンテンツをウェブ標準言語を利用して記述する。この記述には、コンテンツ操作部210で操作されたスクリプトも反映される。コンテンツ描画部205で記述されたコンテンツのスクリプトは、OS層219のインタプリタ214で解釈され、ディスプレイ104に表示される。 The content drawing unit 205 of the script layer 217 describes the content for printing by using a web standard language. The script operated by the content operation unit 210 is also reflected in this description. The content script described by the content drawing unit 205 is interpreted by the interpreter 214 of the OS layer 219 and displayed on the display 104.

スクリプト層217の画像処理制御部206は、画像処理に用いる補正パラメータと、処理対象となる画像を決定し、画像処理部208に画像処理を依頼する。補正パラメータはデータ変換部207でネイティブ層へ送信できる形式へ変換された後、処理対象となる画像のIDと共にネイティブ層へ送信される。 The image processing control unit 206 of the script layer 217 determines the correction parameters used for image processing and the image to be processed, and requests the image processing unit 208 to perform image processing. The correction parameter is converted into a format that can be transmitted to the native layer by the data conversion unit 207, and then transmitted to the native layer together with the ID of the image to be processed.

ネイティブ層の画像処理部208は、画像処理制御部206で指定された画像に対し画像処理を施す。その際、どのような画像処理を施すかは、画像処理制御部206で設定されたパラメータにより決定される。画像の指定については、例えば、スクリプト層から画像のパスを受け取る方法や、画像データごと受け取る方法などが考えられる。 The image processing unit 208 of the native layer performs image processing on the image specified by the image processing control unit 206. At that time, what kind of image processing is performed is determined by the parameters set by the image processing control unit 206. Regarding the designation of the image, for example, a method of receiving the image path from the script layer, a method of receiving the entire image data, and the like can be considered.

OS層219のタッチイベント209は、ディスプレイ104のタッチに関する情報を取得する。タッチに関する情報とは、ディスプレイ104のタッチ検知、タッチされた位置情報等が挙げられる。取得したタッチに関する情報は、ネイティブ層218経由でスクリプト層217のコンテンツ操作部210に送信される。 The touch event 209 of the OS layer 219 acquires information regarding the touch of the display 104. Examples of the touch-related information include touch detection of the display 104, touched position information, and the like. The acquired information regarding the touch is transmitted to the content operation unit 210 of the script layer 217 via the native layer 218.

スクリプト層217のコンテンツ操作部210は、画像を操作、例えば、画像の拡大、移動、回転などを行い、その操作を反映すべく、スクリプト命令を変更する。 The content operation unit 210 of the script layer 217 operates the image, for example, enlarges, moves, or rotates the image, and changes the script command in order to reflect the operation.

スクリプト層217のプリンタ制御部211は、レンダリング部216へのレンダリング開始依頼、プリンタ検知の依頼、プリンタ設定画面の表示、プリント情報の生成と送信を制御する。プリンタ設定画面では、用紙のサイズ、用紙の種類、カラー・モノクロ等のプリンタ設定がなされる。ここで設定された項目を基に、プリンタデータ生成部212でプリンタデータが生成される。 The printer control unit 211 of the script layer 217 controls a rendering start request, a printer detection request, a printer setting screen display, and print information generation and transmission to the rendering unit 216. On the printer setting screen, printer settings such as paper size, paper type, and color / monochrome are made. The printer data is generated by the printer data generation unit 212 based on the items set here.

ネイティブ層218のプリンタデータ生成部212は、プリンタ制御部211からの依頼を基に、プリンタ通信に必要なデータ、コマンドを生成する。プリンタ通信に必要なデータとは、通信プロトコルに則ったデータであり、コマンドとは、印刷やスキャン等、プリンタの動作を決定するためのデータである。よって、プリンタデータ生成部212は、プリンタの動作を決定するためのコマンドを含むプリンタデータを生成する。 The printer data generation unit 212 of the native layer 218 generates data and commands necessary for printer communication based on a request from the printer control unit 211. The data required for printer communication is data according to the communication protocol, and the command is data for determining the operation of the printer such as printing and scanning. Therefore, the printer data generation unit 212 generates printer data including commands for determining the operation of the printer.

さて、ネイティブ層218の外部デバイス通信部221は、プリンタなどの情報処理装置115と接続している外部デバイスとの通信を行うためのインタフェース(IF)である。ここでは、プリンタデータ生成部212から受け取ったデータを送信したり、プリンタ112からの情報を受信する。この実施形態ではOS層219の通信制御部213を介して通信するが、外部デバイス通信部221が直接、外部IF107へデータを送信してもよい。OS層219の通信制御部213が外部デバイスが用いる通信プロトコルに対応していればその機能を使えば良く、通信制御部213が外部デバイスが用いる通信プロトコルに対応していなければ外部デバイス通信部221がその通信プロトコルに従って通信する。 By the way, the external device communication unit 221 of the native layer 218 is an interface (IF) for communicating with an external device connected to the information processing device 115 such as a printer. Here, the data received from the printer data generation unit 212 is transmitted, and the information from the printer 112 is received. In this embodiment, communication is performed via the communication control unit 213 of the OS layer 219, but the external device communication unit 221 may directly transmit data to the external IF 107. If the communication control unit 213 of the OS layer 219 supports the communication protocol used by the external device, the function may be used, and if the communication control unit 213 does not support the communication protocol used by the external device, the external device communication unit 221 Communicates according to its communication protocol.

OS層219のインタプリタ214は、スクリプト層217で生成されたウェブ標準言語で記述された命令を解釈・実行する。例えば、画像の描画等の命令は、インタプリタ214を通して実行され、ディスプレイ104に表示される。 The interpreter 214 of the OS layer 219 interprets and executes the instruction written in the web standard language generated by the script layer 217. For example, commands such as drawing an image are executed through the interpreter 214 and displayed on the display 104.

画像データ群215は、画像データを保持している領域である。データ保存部220は、必要に応じて、データ保持部204が保持する画像データを画像データ群215に保存させるために機能する。 The image data group 215 is an area that holds image data. The data storage unit 220 functions to store the image data held by the data storage unit 204 in the image data group 215, if necessary.

レンダリング部216は、コンテンツ描画部205、画像処理制御部206、及びコンテンツ操作部210を制御して、処理対象の画像データのレンダリングを行う。このレンダリングには、例えば、スクリプト層217でプリンタ112への出力解像度で画像を生成することが含まれる。また、スクリプト層217におけるレンダリング結果、及び、スクリプト層217が生成途中の画像はディスプレイ104に表示されない。レンダリング結果は、ネイティブ層218のデータ変換部203に送信され、プリンタ112が利用できる形式の画像データに変換される。 The rendering unit 216 controls the content drawing unit 205, the image processing control unit 206, and the content operation unit 210 to render the image data to be processed. This rendering includes, for example, generating an image at the output resolution to the printer 112 at the script layer 217. Further, the rendering result in the script layer 217 and the image in which the script layer 217 is being generated are not displayed on the display 104. The rendering result is transmitted to the data conversion unit 203 of the native layer 218 and converted into image data in a format that can be used by the printer 112.

<ユーザ操作に伴う処理>
図3はユーザ操作を含む処理を示すフローチャートである。まず、図3を用いて、S21からS28の各処理の概要を説明し、詳細は後述する。なお、本願のフローチャートの各ステップの処理は、情報処理装置115のCPU100が、ROM101あるいは2次記憶装置103に記憶されているプログラムを実行することにより実現される。また、図3に示す各ステップは、UIの1つである図12に示すアプリケーション画面1200に対するユーザ操作に従って遷移する。アプリケーション画面1200は、スクリプト層217によって生成される。アプリケーション画面1200の操作は、例えば、タッチセンサ105を介して実現される。
<Processing associated with user operation>
FIG. 3 is a flowchart showing a process including a user operation. First, the outline of each process of S21 to S28 will be described with reference to FIG. 3, and the details will be described later. The processing of each step of the flowchart of the present application is realized by the CPU 100 of the information processing device 115 executing the program stored in the ROM 101 or the secondary storage device 103. Further, each step shown in FIG. 3 transitions according to a user operation on the application screen 1200 shown in FIG. 12, which is one of the UIs. The application screen 1200 is generated by the script layer 217. The operation of the application screen 1200 is realized, for example, via the touch sensor 105.

S21で、CPU100は、アプリケーション画面1200の写真画像選択ボタン1201に対するユーザ操作(タッチ操作入力も含む。以後も同様)を検知すると、その操作に応じて、任意の画像を選択する。画像を選択すると、CPU100は、アプリケーション画面1200の描画領域1206に選択された画像を表示する。 In S21, when the CPU 100 detects a user operation (including touch operation input; the same applies hereinafter) for the photo image selection button 1201 on the application screen 1200, the CPU 100 selects an arbitrary image according to the operation. When an image is selected, the CPU 100 displays the selected image in the drawing area 1206 of the application screen 1200.

S22では、CPU100は、表示されている画像の輝度を調整するためのスライドバー1202に対するユーザ操作を検知すると、そのユーザ操作に応じて、画像処理時に利用する補正パラメータを設定する。そして、CPU100は、設定した補正パラメータに従って、表示されている画像に画像処理を施し、その処理内容及び処理結果を描画領域1206に表示する。 In S22, when the CPU 100 detects a user operation on the slide bar 1202 for adjusting the brightness of the displayed image, the CPU 100 sets a correction parameter to be used during image processing according to the user operation. Then, the CPU 100 performs image processing on the displayed image according to the set correction parameter, and displays the processing content and the processing result in the drawing area 1206.

S23は、CPU100は、スタンプ追加ボタン1203に対するユーザ操作を検知すると、スタンプ一覧を表示する。スタンプ一覧に対するユーザ操作によってスタンプの選択を検知すると、CPU100は、描画領域1206に選択されたスタンプを追加・表示する。 In S23, when the CPU 100 detects a user operation on the stamp addition button 1203, the CPU 100 displays a stamp list. When the selection of the stamp is detected by the user operation on the stamp list, the CPU 100 adds / displays the selected stamp to the drawing area 1206.

S24で、CPU100は、アプリケーション画面1200に対するユーザ操作に応じて、スタンプを特定する。スタンプの特定とは、ディスプレイ104にユーザ操作によってタッチされた座標とスタンプの座標より、スタンプがタッチされたか否かを判断するものである。スタンプがタッチされた場合、そのスタンプは操作受付状態となる。ここでは、ユーザ操作に応じて、スタンプが操作受付状態になっているものとする。操作受付状態については後述する。 In S24, the CPU 100 identifies the stamp in response to a user operation on the application screen 1200. The identification of the stamp is to determine whether or not the stamp has been touched from the coordinates touched by the user operation on the display 104 and the coordinates of the stamp. When the stamp is touched, the stamp is in the operation acceptance state. Here, it is assumed that the stamp is in the operation acceptance state according to the user operation. The operation acceptance status will be described later.

S25で、CPU100は、操作受付状態になっている表示領域内でスタンプをスワイプするユーザ操作を検知すると、そのユーザ操作に応じて、操作受付状態にあるスタンプが描画領域内を移動する。 In S25, when the CPU 100 detects a user operation of swiping the stamp in the display area in the operation acceptance state, the stamp in the operation acceptance state moves in the drawing area in response to the user operation.

S26で、CPU100は、プリントボタン1205に対するユーザ操作を検知すると、プリントに必要な情報を設定するための設定画面1301(図13)を表示する。プリントに必要な情報とは、例えば、図13の設定画面1301に示されるように、用紙サイズ、用紙種類、印刷品位、縁あり/なしの設定項目がある。これ以外にも、両面/片面、モノクロ・カラー等、使用するプリンタが有する機能に応じて、設定可能な設定項目が構成される。 When the CPU 100 detects a user operation on the print button 1205 in S26, the CPU 100 displays a setting screen 1301 (FIG. 13) for setting information necessary for printing. The information required for printing includes, for example, as shown in the setting screen 1301 of FIG. 13, setting items of paper size, paper type, print quality, and with / without border. In addition to this, setable setting items such as double-sided / single-sided, monochrome / color, etc. are configured according to the functions of the printer to be used.

S27で、CPU100は、設定画面1301の設定完了ボタン1302に対するユーザ操作を検知すると、描画領域1206に表示されている画像を、プリンタに出力するためのプリント解像度に変換するためのレンダリングを実行する。 In S27, when the CPU 100 detects a user operation on the setting completion button 1302 on the setting screen 1301, the CPU 100 executes rendering for converting the image displayed in the drawing area 1206 into a print resolution for output to the printer.

S28で、CPU100は、プリンタの解像度に変換された画像を、プリンタ制御のコマンドと共にプリンタ112に送信する。以上の処理により、ユーザにより選択された画像がプリンタ112でプリントされる。 In S28, the CPU 100 transmits the image converted to the resolution of the printer to the printer 112 together with the printer control command. By the above processing, the image selected by the user is printed by the printer 112.

尚、図3に示す処理は一例であり、処理内容はこれに限定されず、ステップ群の処理順序もこれに限定されるものではない。また、この実施形態において、プロセッサで翻訳され実行されるための命令セットを含む第1のプログラム層をスクリプト層217、プロセッサ以外で予め翻訳された命令セットを含む第2のプログラム層をネイティブ層218と定義する。そして、これらの第1のプログラム層と第2のプログラム層とを包含するプログラムがハイブリッドアプリケーションを実現する。文字列データ(テキストデータ)を第1の形式、バイナリデータを第2の形式と定義する。なお、スクリプト層217は、テキスト形式のデータを保持することが可能であり、ネイティブ層218は、バイナリ形式のデータを保持することが可能である。 The processing shown in FIG. 3 is an example, and the processing content is not limited to this, and the processing order of the step group is not limited to this. Further, in this embodiment, the first program layer including the instruction set to be translated and executed by the processor is the script layer 217, and the second program layer including the instruction set pre-translated by a non-processor is the native layer 218. Is defined as. Then, a program including these first program layer and the second program layer realizes a hybrid application. Character string data (text data) is defined as the first format, and binary data is defined as the second format. The script layer 217 can hold text format data, and the native layer 218 can hold binary format data.

<写真画像選択とその画像処理の詳細>
次に以上のような構成の情報処理装置において実行する写真画像選択とそれに伴う画像処理に関する幾つかの実施形態について説明する。従って、これらの場合、情報処理装置115は画像処理装置として機能することになる。
<Details of photographic image selection and its image processing>
Next, some embodiments relating to photographic image selection and image processing associated therewith to be executed in the information processing apparatus having the above configuration will be described. Therefore, in these cases, the information processing device 115 functions as an image processing device.

[実施形態1]
ユーザが図12に示した写真画像選択ボタン1201を押下することでS21が開始する。ここで、図3のS21の写真画像選択の詳細について、図4を用いて説明する。なお、S301〜S302、S309〜S311はCPU100がスクリプト層217のプログラムを用いて実行する処理であり、S303〜S308はCPU100がネイティブ層218のプログラムを用いて実行する処理である。
[Embodiment 1]
S21 is started when the user presses the photographic image selection button 1201 shown in FIG. Here, the details of the photographic image selection in S21 of FIG. 3 will be described with reference to FIG. Note that S301 to S302 and S309 to S311 are processes executed by the CPU 100 using the program of the script layer 217, and S303 to S308 are processes executed by the CPU 100 using the program of the native layer 218.

S301で、CPU100は、一意なIDを生成する。このIDは、数値、文字列等、スクリプト層217からネイティブ層218へ送信できる形式であればどのような形でも良い。S302で、CPU100は、写真画像選択ボタン1201に対するユーザ操作に応じて画像選択をネイティブ層218に依頼する。S302では、S301で生成されたIDもネイティブ層218に送信される。その依頼では、バインディング機能によりスクリプト層217からネイティブ層218固有の画像選択APIを直接呼び出す。しかしながら、直接ネイティブ層固有の画像選択APIを呼び出せないのであれば、ネイティブ層218にスクリプト層217から直接呼び出せる関数を用意し、その関数内にネイティブ層固有の画像選択APIを呼び出す関数を記述しておけばよい。これは、ラッパを予め用意しておく方法である。また、そのAPIは、前記IDを、例えば、引数として渡す仕組みを備える。このようにしてネイティブ層218へIDが渡される。 In S301, the CPU 100 generates a unique ID. This ID may be in any form such as a numerical value or a character string as long as it can be transmitted from the script layer 217 to the native layer 218. In S302, the CPU 100 requests the native layer 218 to select an image in response to a user operation on the photographic image selection button 1201. In S302, the ID generated in S301 is also transmitted to the native layer 218. In that request, the binding function directly calls the image selection API specific to the native layer 218 from the script layer 217. However, if the image selection API specific to the native layer cannot be called directly, prepare a function that can be called directly from the script layer 217 in the native layer 218, and describe a function that calls the image selection API specific to the native layer in the function. Just leave it. This is a method of preparing a trumpet in advance. Further, the API includes a mechanism for passing the ID as an argument, for example. In this way, the ID is passed to the native layer 218.

S303で、CPU100は、デバイス固有の画像選択UIをディスプレイ104に表示する。表示された画像選択UIに対するユーザ操作に基づいて、任意の画像を1枚選択する。なお、この実施形態ではデバイス内の画像フォルダから画像を1枚選択しているが、本発明はそれに限定されるものではない。例えば、インターネット上の画像や、脱着可能な記憶媒体内の画像を選択しても良いし、デバイスのカメラ機能を利用しその場で画像を撮影し、これを選択しても良い。 In S303, the CPU 100 displays the device-specific image selection UI on the display 104. Select one arbitrary image based on the user operation for the displayed image selection UI. In this embodiment, one image is selected from the image folder in the device, but the present invention is not limited thereto. For example, an image on the Internet or an image in a removable storage medium may be selected, or an image may be taken on the spot using the camera function of the device and selected.

S304で、CPU100は、選択された画像を取得する。例えば、選択した画像が画像ファイルの状態であれば、CPU100は、ファイルを開き、その内容を読み取る。 In S304, the CPU 100 acquires the selected image. For example, if the selected image is in the state of an image file, the CPU 100 opens the file and reads its contents.

S305で、CPU100は、取得した画像をRGB空間に展開する。ここでは、RGBデータをネイティブ層218に保持しているが、これに限定されるものではない。例えば、JPEG(Joint Photography Expert Group)、PNG(Portable Network Graphics)、RGBA形式などで保持することもできる。RGBA形式とは、画像データのRGB(赤、緑、青)成分に、透明度としてAを組み合わせたものである。 In S305, the CPU 100 develops the acquired image in RGB space. Here, the RGB data is stored in the native layer 218, but the present invention is not limited to this. For example, it can be held in JPEG (Joint Photographic Expert Group), PNG (Portable Network Graphics), RGBA format, or the like. The RGBA format is a combination of RGB (red, green, blue) components of image data and A as transparency.

S306で、CPU100は、展開したRGB画像を、スクリプト層217から取得したIDと関連付けてデータ保持部204に保持する。関連付け方法は、例えば、IDとRGB画像を有するオブジェクトを作成することで、IDによりRGB画像の特定を可能にするという方法が考えられる。この関連付け方法は、これに限らず、IDと選択された画像のアクセス先であるパスや、IDとRGB展開に応じて実行される関数やクラス等も考えられる。 In S306, the CPU 100 holds the developed RGB image in the data holding unit 204 in association with the ID acquired from the script layer 217. As an association method, for example, a method of creating an object having an ID and an RGB image so that the RGB image can be specified by the ID can be considered. This association method is not limited to this, and a path that is an access destination of the ID and the selected image, a function or a class that is executed according to the ID and RGB expansion, and the like can be considered.

S307で、CPU100は、展開したRGB画像をスクリプト層217で利用可能な形式(サポート可能な形式)の画像データに変換する。この実施形態では、変換するデータ形式をJPEG(Joint Photography Expert Group)とする。RGB画像データからJPEGデータへの変換は、OS層219に備えられたエンコーダを利用すればよい。 In S307, the CPU 100 converts the expanded RGB image into image data in a format (supportable format) that can be used by the script layer 217. In this embodiment, the data format to be converted is JPEG (Joint Photography Expert Group). The conversion from the RGB image data to the JPEG data may be performed by using the encoder provided in the OS layer 219.

なお、ここでは、ディスプレイ104の表示サイズに対してあまりにも大きな画像であれば、縮小してからJPEGへ変換する。スクリプトは画像をUIの大きさ、ディスプレイの解像度に合わせて縮小処理を行うことになる。UIに対して過多な画素数の画像をスクリプトで扱うと、CPUに処理負荷が掛かり、かつ、大容量のメモリが必要となるため無駄が生じる。従って、この実施形態では、その無駄を回避するために縮小処理を実行する。縮小処理の目安としては、例えば、ディスプレイの表示サイズやUIで画像を表示する箇所のサイズを上限にし、それを越える画素数を持つ画像に対して縮小処理を行うよう制御するようにすれば良い。さて、その画像に対しては後述のように画像処理を施す場合があるかもしれない。これについても、元の画像(RGB展開した画像データ)に対して画像処理を施し、上記の縮小処理を実行後に縮小された画像をスクリプト層に引き渡す。 Here, if the image is too large for the display size of the display 104, it is reduced and then converted to JPEG. The script will reduce the image according to the size of the UI and the resolution of the display. If an image with an excessive number of pixels for the UI is handled by a script, a processing load is applied to the CPU and a large amount of memory is required, which causes waste. Therefore, in this embodiment, the reduction process is executed in order to avoid the waste. As a guideline for the reduction process, for example, the display size of the display or the size of the part where the image is displayed on the UI may be set as the upper limit, and the reduction process may be controlled for the image having the number of pixels exceeding the upper limit. .. By the way, the image may be subjected to image processing as described later. Also for this, image processing is performed on the original image (image data developed in RGB), and the reduced image is passed to the script layer after the above reduction processing is executed.

S308で、CPU100は、JPEG形式のデータをBASE64データに変換し、スクリプト層217へ送信する。これは、スクリプト層217では、RGB画像のデータ配列をそのまま利用できないため、ネイティブ層218において、スクリプト層217で解釈可能な形式に変換する必要があるためである。JavaScript(登録商標)では、文字列しか扱えないため、この実施形態では、文字列としてデータを表現するBASE64の形式を利用する。 In S308, the CPU 100 converts the JPEG format data into BASE64 data and transmits it to the script layer 217. This is because the RGB image data array cannot be used as it is in the script layer 217, and therefore it is necessary to convert it into a format that can be interpreted by the script layer 217 in the native layer 218. Since Javascript (registered trademark) can handle only character strings, in this embodiment, the format of BASE64 that expresses data as a character string is used.

ここで、BASE64とは、バイナリデータを文字列データとして扱うためのエンコード方式である。スクリプト層217ではネイティブ層218と同様、画像データを取得し、変更を加えることが可能である。しかし、ネイティブ層218はRGB配列のように、RAM102(メモリ)の連続した領域にその値を保持するのに対し、スクリプト層217では、連続した領域にデータが保持されているとは限らない。このように、スクリプト層217とネイティブ層218ではデータ保持方法が異なるため、従来、スクリプト層217から画像データを連続データとして一括してネイティブ層218へ送信することができなかった。 Here, BASE64 is an encoding method for handling binary data as character string data. Similar to the native layer 218, the script layer 217 can acquire image data and make changes. However, the native layer 218 holds the value in a continuous area of the RAM 102 (memory) like the RGB array, whereas the script layer 217 does not always hold the data in the continuous area. As described above, since the data holding method is different between the script layer 217 and the native layer 218, it has not been possible to collectively transmit the image data from the script layer 217 to the native layer 218 as continuous data.

しかしながら、文字列データはスクリプト層217でも連続したデータとして扱われるので、CPU100は、スクリプト層217からBASE64形式でネイティブ層218へ連続したデータを送信する。この実施形態では、ネイティブ層218は画像情報の変換処理を行う。即ち、スクリプト層217から受け取った文字列情報を画像データへ変換することで、ネイティブ層218でのデータ操作を可能としている。逆に、ネイティブ層218からスクリプト層217へ画像データを送信する際は、ネイティブ層218で扱う画像データをBASE64方式を用いて文字列情報へと変換する。これにより、スクリプト層217とネイティブ層218との間で画像データの受け渡しが可能となる。 However, since the character string data is also treated as continuous data in the script layer 217, the CPU 100 transmits the continuous data from the script layer 217 to the native layer 218 in the BASE64 format. In this embodiment, the native layer 218 performs image information conversion processing. That is, by converting the character string information received from the script layer 217 into image data, data manipulation in the native layer 218 is possible. On the contrary, when the image data is transmitted from the native layer 218 to the script layer 217, the image data handled by the native layer 218 is converted into character string information by using the BASE64 method. As a result, image data can be transferred between the script layer 217 and the native layer 218.

S309で、CPU100は、ネイティブ層218で変換されたBASE64データを受信するとともに、そのBASE64データを表示するための描画領域をRAM102に確保する。この実施形態では、描画領域の確保の一例としてHTMLのCanvas機能を利用し、画像の描画は、Canvasの有するContextオブジェクトのAPIを利用する。 In S309, the CPU 100 receives the BASE64 data converted by the native layer 218, and secures a drawing area for displaying the BASE64 data in the RAM 102. In this embodiment, the HTML function of Cambas is used as an example of securing the drawing area, and the API of the Context object possessed by Cambas is used for drawing the image.

S310で、CPU100は、補正パラメータを生成し、初期化する。ここで、補正パラメータとは、S22の画像処理の内容を決定するパラメータ群を保持するオブジェクトである。ネイティブ層でどのような画像処理が施されるかは、補正パラメータによって決定される。JavaScript(登録商標)で保持する補正パラメータの一例として、下記のような形態が考えられる。 In S310, the CPU 100 generates a correction parameter and initializes it. Here, the correction parameter is an object that holds a parameter group that determines the content of the image processing of S22. What kind of image processing is performed in the native layer is determined by the correction parameters. As an example of the correction parameters held by Javascript (registered trademark), the following forms can be considered.

var CorrectionParam = function(){
this.brightness = 10;
}
この補正パラメータは、CorrectionParamオブジェクトの中に、明るさ補正用にbrightnessという名前の変数が設けられており、10という値を格納するということを表している。
var CorrectionParam = function () {
this.brightness = 10;
}
This correction parameter indicates that a variable named brightness is provided for brightness correction in the DirectionParam object, and a value of 10 is stored.

この実施形態では、説明の簡略化のために、補正パラメータは明るさ(輝度)補正用のみであるが、その他の補正処理用のパラメータ(ぼかしフィルタの強度、セピア変換のオン・オフ等)を追加し処理の種類を増やしても良いことは言うまでもない。 In this embodiment, for simplification of the description, the correction parameters are only for brightness (luminance) correction, but other parameters for correction processing (blur filter strength, sepia conversion on / off, etc.) are set. Needless to say, it is possible to add more types of processing.

S311で、CPU100は、描画領域で描画するデータにBASE64データを指定し、それに従って、その描画領域に画像を描画する。具体的には、CPU100は、スクリプト層で指定されたBASE64データをOS層のインタプリタ214に送信する。そして、インタプリタ214がBASE64データのスクリプトを解釈し、描画領域に画像として表示する。ここで、描画領域に、BASE64データを反映させるサンプルコードの一例を示す。 In S311 the CPU 100 specifies BASE64 data as the data to be drawn in the drawing area, and draws an image in the drawing area accordingly. Specifically, the CPU 100 transmits the BASE64 data specified in the script layer to the interpreter 214 in the OS layer. Then, the interpreter 214 interprets the script of the BASE64 data and displays it as an image in the drawing area. Here, an example of sample code that reflects BASE64 data in the drawing area is shown.

--------------------------------------------------
var base64Data = ネイティブ層からのBASE64データ
var canvas = document.createElement("canvas"); //画像の描画領域確保
canvas.setAttribute("width", 100); //描画領域の大きさ設定
canvas.setAttribute("height", 100);
var context = canvas.getContext("2d"); //描画領域に描画するAPIを持つオブジェクトの生成
var img = new Image(); //Imageオブジェクトの生成
img.src = base64Data; //画像のURIを受け取ったBASE64データとする
img.onload = function(){ //画像のロードが終わってから処理を開始する
context.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width,
canvas.height); //contextオブジェクトのメソッドを用いて画像を描画領域に描画
document.getElementById("div").appendChild(canvas);
//本フローチャートではCanvasが何層にもなるレイヤー構造を想定している}
これらのCanvasは至る所好き勝手に存在するわけではなく、描画、移動、拡大等の操作は、特定の領域内(図12の描画領域1206)で完結するその領域を指定しているものが「div」であり、Canvasはそのdivに追加されてゆく形態をとる。
--------------------------------------------------
var base64Data = BASE64 data from the native layer
var canvas = document.createElement ("canvas"); // Secure drawing area for image
canvas.setAttribute ("width", 100); // Set the size of the drawing area
canvas.setAttribute ("height", 100);
var context = canvas.getContext ("2d"); // Generate an object with API to draw in the drawing area
var img = new Image (); // Create Image object
img.src = base64Data; // Let the URI of the image be the received BASE64 data
img.onload = function () {// Start processing after the image has finished loading
context.drawImage (img, 0, 0, img.width, img.height, 0, 0, canvas.width,
canvas.height); // Draw the image in the drawing area using the method of the context object
document.getElementById ("div"). appendChild (canvas);
// This flowchart assumes a layered structure with multiple layers of Canvas}
These Cambas do not exist freely everywhere, and operations such as drawing, moving, and enlarging specify an area that is completed within a specific area (drawing area 1206 in FIG. 12). It is a "div", and Canvas takes the form of being added to the div.

--------------------------------------------------
この実施形態では、描画領域1206に対しCanvasが追加されてゆくレイヤー構造を用いている。Canvasは一枚の画像として扱われるため、Canvasに写真画像を描画後、スタンプなどを追加すると、スタンプも合わせて一枚の画像となる。この場合、画像内のスタンプのみに対して特定・操作を行うことは難しい。これに対して、レイヤー構造を用いてCanvasを重ねて表示すれば、ユーザには一枚の絵に見えるが、実際の描画物はそれぞれ独立しており、各々に対し個別の操作を指示することができる。なお、スタンプは、画像データに対して付加されるので付加画像と呼ぶこともある。
--------------------------------------------------
In this embodiment, a layer structure in which Canvas is added to the drawing area 1206 is used. Since Canvas is treated as one image, if a stamp or the like is added after drawing a photographic image on Canvas, the stamp is also combined into one image. In this case, it is difficult to specify and operate only the stamp in the image. On the other hand, if Canvas is displayed in layers using a layer structure, it looks like a single picture to the user, but the actual drawings are independent of each other, and each is instructed to perform an individual operation. Can be done. Since the stamp is added to the image data, it may be called an additional image.

こうして、画像とスタンプが一枚の絵(画像)としてUI上に表示される。この実施形態では、その画像が印刷コンテンツとなる。ただし、この時点での画像はUI上に表示され、操作や確認を行うためのものである。後述するように、印刷するためには印刷に適した解像度への変換が必要となる。 In this way, the image and the stamp are displayed on the UI as a single picture (image). In this embodiment, the image is the print content. However, the image at this point is displayed on the UI for operation and confirmation. As will be described later, in order to print, it is necessary to convert to a resolution suitable for printing.

<画像処理の詳細>
ユーザが図12に示したスライドバー1202を変化させることでS22が開始する。ここでは、図3のS22の画像処理の詳細について、図5を用いて説明する。なお、S401〜S403、S409、S411は、CPU100がスクリプト層217のプログラムを用いて実行する処理であり、S404〜S408、S410はCPU100がネイティブ層218のプログラムを用いて実行する処理である。
<Details of image processing>
S22 is started when the user changes the slide bar 1202 shown in FIG. Here, the details of the image processing of S22 of FIG. 3 will be described with reference to FIG. Note that S401 to S403, S409, and S411 are processes executed by the CPU 100 using the program of the script layer 217, and S404 to S408 and S410 are processes executed by the CPU 100 using the program of the native layer 218.

S401で、CPU100は、補正パラメータを設定する。ここでは、図3のS310で生成した補正パラメータのbrightnessの値を、スライドバー1202に対するユーザ操作に応じて設定される値が設定される。S402で、CPU100は、インジケータを起動し、ディスプレイ104に表示する。ここで、インジケータとは、ユーザに処理中である旨を伝える表示であり、一般には、プログレスバーや、時計マーク、図形の点滅や回転等の画像で表現する。S403で、CPU100は、S401にて設定された補正パラメータをネイティブ層218で利用できるJSON文字列の形式に変換する。ここで、補正パラメータはオブジェクトの形態を取っており、そのままではネイティブ層218で利用できないため、設定した補正パラメータをJSON文字列に変換する。そして、CPU100は、JSON文字列に変換された補正パラメータを、図4のS301で生成したIDと共にネイティブ層218へ転送する。 In S401, the CPU 100 sets a correction parameter. Here, the value of the correction parameter brightness generated in S310 of FIG. 3 is set to a value set according to the user operation on the slide bar 1202. In S402, the CPU 100 activates the indicator and displays it on the display 104. Here, the indicator is a display that informs the user that processing is in progress, and is generally represented by an image such as a progress bar, a clock mark, or a blinking or rotating figure. In S403, the CPU 100 converts the correction parameter set in S401 into a JSON character string format that can be used in the native layer 218. Here, since the correction parameter is in the form of an object and cannot be used as it is in the native layer 218, the set correction parameter is converted into a JSON character string. Then, the CPU 100 transfers the correction parameter converted into the JSON character string to the native layer 218 together with the ID generated in S301 of FIG.

S404で、CPU100は、JSON文字列に変換された補正パラメータをデコードし、補正パラメータを取得する。より具体的には、補正パラメータをOS層219に備えられているパーサを利用してパース(解析)する。パース後に、上記の例の場合、補正パラメータ内のbrightnessが取得されることになる。 In S404, the CPU 100 decodes the correction parameter converted into the JSON character string and acquires the correction parameter. More specifically, the correction parameter is parsed (analyzed) by using the parser provided in the OS layer 219. After parsing, in the case of the above example, the brightness in the correction parameter will be acquired.

S405で、CPU100は、スクリプト層217から取得したIDを基に、図4のS305で展開されたRGB画像を特定する。尚、上述のように、IDと画像の対応付けは、IDとRGB画像と対にすることに限定されるわけではなく、例えば、IDと画像のパスを関連付ける方法を用いてもよい。その他にIDと関連付ける例として、ネイティブ層218のオブジェクト、画像データの先頭アドレス、画像を呼び出す関数等、様々なものが考えられる。 In S405, the CPU 100 identifies the RGB image developed in S305 of FIG. 4 based on the ID acquired from the script layer 217. As described above, the association between the ID and the image is not limited to the pairing of the ID and the RGB image, and for example, a method of associating the ID and the image path may be used. In addition, as an example of associating with the ID, various things such as an object of the native layer 218, a start address of image data, and a function for calling an image can be considered.

S406で、CPU100は、取得した補正パラメータから施すべき画像処理を判断し、RGB画像に対して画像処理を行う。この実施形態では、明るさ補正のパラ―メータより、全ての画素のRGBの値に10が加算される。前述の通り、補正パラメータに他の情報を追加し、画像処理の種類を増やしても良い。例えば、公知のモノクロ変換、公知のセピア色変換、「ImageFix」、「RedeyeFix」、「SmartSkin」などを追加することも可能である。 In S406, the CPU 100 determines the image processing to be performed from the acquired correction parameters, and performs the image processing on the RGB image. In this embodiment, 10 is added to the RGB values of all the pixels from the brightness correction parameter. As described above, other information may be added to the correction parameters to increase the types of image processing. For example, known monochrome conversion, known sepia color conversion, "ImageFix", "RedeeyeFix", "SmartSkin" and the like can be added.

ここで、「ImageFix」とは、写真画像を、人物顔検出やシーン解析部を用いて自動で解析し、適切な明るさ・ホワイトバランス調整を行う機能(顔検出機能)である(特開2010−278708号公報参照)。また、「RedeyeFix」とは、画像中から自動で赤目画像を検出して補正する機能(赤目検出機能)である(特開2006−350557号公報参照)。また、「SmartSkin」とは、写真画像から人物の顔を検出して、該顔の肌領域を好適に加工する機能である(特開2010−010938号公報参照)。なお、画像処理機能の種類は、これに限定されるものではなく、用途や目的に応じて、様々な画像処理を利用することができる。さらに、画像処理はOS層219が提供する機能を利用してもよく、その場合であっても処理構成はこの実施形態と同じである。 Here, "ImageFix" is a function (face detection function) that automatically analyzes a photographic image using a human face detection or a scene analysis unit and adjusts appropriate brightness and white balance (Japanese Patent Laid-Open No. 2010). -278708 (see). Further, "Red-eye Fix" is a function (red-eye detection function) that automatically detects and corrects a red-eye image from an image (see JP-A-2006-350557). Further, "SmartSkin" is a function of detecting a person's face from a photographic image and appropriately processing the skin region of the face (see JP-A-2010-010938). The type of image processing function is not limited to this, and various image processing can be used depending on the application and purpose. Further, the image processing may utilize the function provided by the OS layer 219, and even in that case, the processing configuration is the same as that of this embodiment.

S407で、CPU100は、画像処理が施されたRGB画像をスクリプト層217で利用可能な形式(サポート可能な形式)の画像データに変換する。ここでは、図3のS307と同様に、JPEG形式のデータに変換する。尚、前述のようにUIに対して画像サイズが大きい場合は、JPEGデータに変換する前に縮小処理を実行する。S408で、CPU100は、スクリプト層217にインジケータの停止を依頼する。これは、ネイティブ層218から、スクリプト層217で定義されているインジケータ停止の関数を呼び出すことで実現する。 In S407, the CPU 100 converts the image-processed RGB image into image data in a format (supportable format) that can be used by the script layer 217. Here, the data is converted into JPEG format data in the same manner as in S307 of FIG. If the image size is larger than the UI as described above, the reduction process is executed before converting to JPEG data. In S408, the CPU 100 requests the script layer 217 to stop the indicator. This is achieved by calling the indicator stop function defined in the script layer 217 from the native layer 218.

S409で、CPU100は、インジケータを停止して、ディスプレイ104の表示からインジケータを消去する。 In S409, the CPU 100 stops the indicator and erases the indicator from the display 104.

一方、S410で、CPU100は、変換されたJPEG形式のデータをBASE64データに変換し、スクリプト層217へ送信する。 On the other hand, in S410, the CPU 100 converts the converted JPEG format data into BASE64 data and transmits it to the script layer 217.

S411で、CPU100は、ネイティブ層218で変換されたBASE64データを受信し、それに従って、図4のS309で確保した描画領域に画像を描画する。具体的には、CPU100は、スクリプト層で指定されたBASE64データをOS層のインタプリタ214に送信する。そして、インタプリタ214がBASE64データのスクリプトを解釈し、指定したUIの描画領域に画像データの描画結果を表示する。以上の処理により補正パラメータに基づく画像処理が適用された画像データが表示される。 In S411, the CPU 100 receives the BASE64 data converted in the native layer 218, and draws an image in the drawing area secured in S309 of FIG. 4 accordingly. Specifically, the CPU 100 transmits the BASE64 data specified in the script layer to the interpreter 214 in the OS layer. Then, the interpreter 214 interprets the BASE64 data script and displays the drawing result of the image data in the drawing area of the designated UI. By the above processing, the image data to which the image processing based on the correction parameter is applied is displayed.

この実施形態では、図12に示すようなスライドバー1202の変化によって画像処理が開始されるが、その開始方法はこれに限定されるものではない。例えば、画面にプラスボタン、マイナスボタンが配置されており、そのボタンを押すごとに明るさが調整されるという形態であっても良い。他にも、画像の右半分がタッチされたら明るさを増す、左半分がタッチされたら暗くするなど、タッチイベントと連動させた処理によって実現しても良い。また、ユーザ操作で補正パラメータだけ変化させておいて、画像処理の実行指示があった時に、全ての画像処理が一括して行われるという方法などを採用しても良い。 In this embodiment, the image processing is started by the change of the slide bar 1202 as shown in FIG. 12, but the starting method is not limited to this. For example, a plus button and a minus button may be arranged on the screen, and the brightness may be adjusted each time the button is pressed. In addition, it may be realized by processing linked with a touch event, such as increasing the brightness when the right half of the image is touched and darkening when the left half is touched. Further, it is also possible to adopt a method in which only the correction parameters are changed by the user operation and all the image processing is performed at once when the execution instruction of the image processing is given.

<スタンプ追加の詳細>
ユーザが、図12に示すスタンプ追加ボタン1203を押下し、ハートスタンプ1208を選択すると、S23の処理が開始する。ここでは、図3のS23のスタンプ追加の詳細について、図6を用いて説明する。以下の説明では、ユーザ操作によって、図12のアプリケーション画面1200のスタンプ追加ボタン1203が押下されてスタンプ一覧が表示された後、ハートスタンプ1208が選択された場合を例に挙げる。なお、S501〜S502、S508〜S510は、CPU100がスクリプト層217のプログラムを用いて実行する処理であり、S503〜S507はCPU100がネイティブ層218のプログラムを用いて実行する処理である。
<Details of adding stamps>
When the user presses the stamp addition button 1203 shown in FIG. 12 and selects the heart stamp 1208, the process of S23 starts. Here, the details of adding the stamp of S23 of FIG. 3 will be described with reference to FIG. In the following description, a case where the heart stamp 1208 is selected after the stamp addition button 1203 on the application screen 1200 of FIG. 12 is pressed and the stamp list is displayed by the user operation will be given as an example. Note that S501 to S502 and S508 to S510 are processes executed by the CPU 100 using the program of the script layer 217, and S503 to S507 are processes executed by the CPU 100 using the program of the native layer 218.

S501で、CPU100は、一意なIDを生成する。このIDは、図3のS301で生成するIDと同等であるため、S301で説明した方法に従って生成される。S502で、CPU100は、S501で生成されたIDととともに、スタンプとして利用される画像のアクセス先(絶対パス)をネイティブ層218に送信することで、スタンプに対応するスタンプ画像の画像選択を依頼する。 In S501, the CPU 100 generates a unique ID. Since this ID is equivalent to the ID generated in S301 of FIG. 3, it is generated according to the method described in S301. In S502, the CPU 100 requests the image selection of the stamp image corresponding to the stamp by transmitting the access destination (absolute path) of the image used as the stamp to the native layer 218 together with the ID generated in S501. ..

S503で、CPU100は、スクリプト層217から受信したスタンプ画像の絶対パスとデバイス固有の画像選択APIを利用して、スタンプ画像を取得する。S504で、CPU100は、取得したスタンプ画像をRGB展開する。S505で、CPU100は、展開したRGB画像を、スクリプト層217から取得したIDと関連付けてデータ保持部204に保持する。その関連付け方法は、図3のS306と同様である。S506で、CPU100は、ネイティブ層218で、展開したRGB画像をスクリプト層217で利用可能な形式(サポート可能な形式)の画像データに変換する。ここでの変換は、図3のS307と同様に、JPEG形式のデータに変換する。S507で、CPU100は、JPEG形式のデータをBASE64データに変換し、スクリプト層217へ送信する。 In S503, the CPU 100 acquires the stamp image by using the absolute path of the stamp image received from the script layer 217 and the device-specific image selection API. In S504, the CPU 100 develops the acquired stamp image in RGB. In S505, the CPU 100 holds the expanded RGB image in the data holding unit 204 in association with the ID acquired from the script layer 217. The association method is the same as S306 in FIG. In S506, the CPU 100 converts the expanded RGB image in the native layer 218 into image data in a format (supportable format) that can be used in the script layer 217. The conversion here is converted to JPEG format data in the same manner as in S307 of FIG. In S507, the CPU 100 converts the JPEG format data into BASE64 data and transmits the data to the script layer 217.

S508で、CPU100は、ネイティブ層218で変換されたBASE64データを受信するとともに、そのBASE64データを表示するための描画領域をRAM102に確保する。S509で、CPU100は、オブジェクトパラメータを生成し、初期化する。ここで、オブジェクトパラメータとは、図3のS27のレンダリング(詳細は後述)の際、レンダリング後のスタンプの回転角度を決定するために用いられるパラメータを保持するオブジェクトである。JavaScript(登録商標)で保持するオブジェクトパラメータの一例としては、下記のような形態が考えられる。 In S508, the CPU 100 receives the BASE64 data converted by the native layer 218, and secures a drawing area for displaying the BASE64 data in the RAM 102. In S509, the CPU 100 generates and initializes the object parameters. Here, the object parameter is an object that holds a parameter used for determining the rotation angle of the stamp after rendering at the time of rendering (details will be described later) of S27 of FIG. As an example of the object parameter held by Javascript (registered trademark), the following form can be considered.

var ObjectParam = function(){
this.theta = 0;
this.posX = 0;
this.posY = 0;
this.width = 100;
this.height = 100;
}
このオブジェクトパラメータは、ObjectParamオブジェクトの中に、回転角度を示すthetaという変数名と、thetaには0という値が格納されているということを表している。同様に、posXは描画領域(図12の1206)の左上を基準点(図12の1210)とした時のx座標、posYは描画領域の左上を基準点とした時のy座標を表わしている。また、widthは描画領域(図12の1209)の横幅、heightは描画領域の縦幅を表している。尚、この実施形態では、説明を簡単にするため、オブジェクトパラメータは必要最小限であるが、その他のパラメータ(平行移動量、拡大倍率等)を追加し、描画時やレンダリング時に利用できることは明らかである。
var ObjectParam = function () {
this.theta = 0;
this.posX = 0;
this.posY = 0;
this.width = 100;
this.height = 100;
}
This object parameter indicates that the variable name "theta" indicating the rotation angle and the value "0" are stored in the ObjectParam object. Similarly, posX represents the x-coordinate when the upper left of the drawing area (1206 in FIG. 12) is the reference point (1210 in FIG. 12), and posY represents the y-coordinate when the upper left of the drawing area is the reference point. .. Further, width represents the width of the drawing area (1209 in FIG. 12), and height represents the height of the drawing area. In this embodiment, the object parameters are the minimum necessary for the sake of simplicity, but it is clear that other parameters (translation amount, magnification, etc.) can be added and used at the time of drawing or rendering. is there.

S510で、CPU100は、BASE64データを、生成したオブジェクトパラメータを基に、描画領域1206に画像として表示する。具体的には、CPU100は、選択されたスタンプに対応するBASE64データをOS層のインタプリタ214に送信する。そして、インタプリタ214がBASE64データのスクリプトを解釈し、描画領域にスタンプ画像として表示する。 In S510, the CPU 100 displays the BASE64 data as an image in the drawing area 1206 based on the generated object parameters. Specifically, the CPU 100 transmits the BASE64 data corresponding to the selected stamp to the interpreter 214 of the OS layer. Then, the interpreter 214 interprets the script of the BASE64 data and displays it as a stamp image in the drawing area.

尚、この実施形態では、説明を簡単にするために、スタンプを1つ選択した場合を例に挙げているが、複数個のスタンプを選択できることは言うまでもない。また、この実施形態では、スタンプに予め用意した画像を利用しているが、Contextオブジェクトを利用して描画物をスクリプト層で生成する方法を用いても良い。 In this embodiment, for the sake of simplicity, the case where one stamp is selected is given as an example, but it goes without saying that a plurality of stamps can be selected. Further, in this embodiment, the image prepared in advance for the stamp is used, but a method of generating a drawing object in the script layer by using the Context object may be used.

<スタンプ特定の詳細>
ユーザが図1に示したディスプレイ104にタップすることでS24が開始する。「タップ」とは携帯型情報端末上で画面を指で押す操作のことをいい、これは、PCでのポインティングデバイスによる「クリック」に相当する操作である。ここでは、図3のS24のスタンプ特定の詳細について、図7を用いて説明する。なお、S602〜S603は、CPU100がスクリプト層217のプログラムを用いて実行する処理であり、S601はCPU100がネイティブ層218のプログラムを用いて実行する処理である。
<Details of stamp identification>
S24 starts when the user taps on the display 104 shown in FIG. "Tap" refers to an operation of pressing the screen with a finger on a portable information terminal, which is an operation equivalent to "clicking" by a pointing device on a PC. Here, the details of specifying the stamp of S24 in FIG. 3 will be described with reference to FIG. 7. Note that S602 to S603 are processes executed by the CPU 100 using the program of the script layer 217, and S601 is a process executed by the CPU 100 using the program of the native layer 218.

S601で、CPU100は、ディスプレイ104上でタップされた座標を取得し、スクリプト層217に送信する。 In S601, the CPU 100 acquires the coordinates tapped on the display 104 and transmits them to the script layer 217.

S602で、CPU100は、ネイティブ層218から受信した座標と、図5のS509で生成したオブジェクトパラメータの情報より、図3のS23で追加したスタンプがタッチされたかどうかを判断する。追加したスタンプにおいて、オブジェクトパラメータは初期値のままである。そのため、上記のオブジェクトパラメータの一例に従えば、スタンプは、描画領域1206の基準点1210を(0,0)とし、そこからx方向に100、y方向に100の領域に描画されていることになる。これより、受信した座標の座標(x,y)の内、x座標から描画領域1206のx座標分を差し引いた値が0〜100の範囲、かつ、y座標から描画領域1206のy座標分を差し引いた値が0〜100の範囲であれば、スタンプはタッチされたと判断できる。スタンプが複数個ある場合は、より上層に表示されているスタンプから順番に判定してゆき、スタンプの特定がなされた時点で処理を終了すればよい。スタンプがタッチされたと判断された場合、そのスタンプは、図3のS25の操作受付状態となる。 In S602, the CPU 100 determines whether or not the stamp added in S23 of FIG. 3 is touched from the coordinates received from the native layer 218 and the object parameter information generated in S509 of FIG. In the added stamp, the object parameter remains the default value. Therefore, according to the above example of the object parameter, the stamp is drawn in an area of 100 in the x direction and 100 in the y direction from the reference point 1210 of the drawing area 1206 as (0,0). Become. From this, among the received coordinate coordinates (x, y), the value obtained by subtracting the x-coordinate of the drawing area 1206 from the x-coordinate is in the range of 0 to 100, and the y-coordinate of the drawing area 1206 is calculated from the y-coordinate. If the subtracted value is in the range of 0 to 100, it can be determined that the stamp has been touched. When there are a plurality of stamps, the stamps displayed in the upper layer are determined in order, and the process may be terminated when the stamps are specified. When it is determined that the stamp has been touched, the stamp is in the operation acceptance state of S25 in FIG.

以降の説明では、図3のS24において、図3のS23で追加したスタンプがタッチされたものとして説明する。 In the following description, it is assumed that the stamp added in S23 of FIG. 3 is touched in S24 of FIG.

S603で、CPU100は、判断結果に応じて、スタンプを操作受付状態に設定する。ここで、操作受付状態に設定することは、スタンプ操作に対する指示がなされたとき、スタンプがそれに応じた操作が実施される状態をいう。操作受付状態のスタンプが存在しない場合は、スタンプ操作に関する指示を行っても、何の変化も生じない。この実施形態では、スタンプの回転を行うスライドバー1204のみに言及しているが、他のスタンプ操作の構成を利用してもよいことは言うまでもない。 In S603, the CPU 100 sets the stamp to the operation acceptance state according to the determination result. Here, setting the operation acceptance state means a state in which when an instruction for a stamp operation is given, the stamp performs an operation corresponding to the instruction. If there is no stamp in the operation acceptance state, no change occurs even if the instruction regarding the stamp operation is given. In this embodiment, only the slide bar 1204 that rotates the stamp is mentioned, but it goes without saying that other stamp operation configurations may be used.

<スタンプ操作の詳細>
スタンプが操作受付状態になった時点で図3のS25が開始する。以下、図3のS25のスタンプ操作の詳細について、図8を用いて説明する。なお、図8の各ステップは、CPU100がスクリプト層217のプログラムを用いて実行する処理である。
<Details of stamp operation>
When the stamp is in the operation acceptance state, S25 in FIG. 3 starts. Hereinafter, the details of the stamp operation in S25 of FIG. 3 will be described with reference to FIG. Each step in FIG. 8 is a process executed by the CPU 100 using the program of the script layer 217.

S701で、CPU100はスタンプが「スワイプ」されたかどうかを、タッチイベントから取得できる情報に基いて調べる。ここで、「スワイプ」されたと判断された場合、処理はS702へ進み、そうでない場合はS704へ進む。ここで、「スワイプ」とは、携帯型情報端末をタップしたのち、指を画面から離さない状態で移動させる操作のことをいい、これはPCのポンティングデバイスを用いた「ドラッグ」操作に対応する。 In S701, the CPU 100 checks whether the stamp has been "swipe" based on the information that can be obtained from the touch event. Here, if it is determined that the "swipe" has been performed, the process proceeds to S702, and if not, the process proceeds to S704. Here, "swipe" refers to an operation of tapping a portable information terminal and then moving a finger without releasing it from the screen, which corresponds to a "drag" operation using a PC's pointing device. To do.

S702で、CPU100は、スタンプのオブジェクトパラメータのposXとposYの値を「スワイプ」によって得られたx座標とy座標に更新する。S703で、CPU100は、オブジェクトパラメータを用いて、更新されたposX、posYの値を基にして、描画領域1206内のスタンプ1209を更新された座標位置(posX,posY)へと移動させる。 In S702, the CPU 100 updates the values of posX and posY of the object parameters of the stamp to the x-coordinate and the y-coordinate obtained by "swipe". In S703, the CPU 100 uses the object parameters to move the stamp 1209 in the drawing area 1206 to the updated coordinate position (posX, posY) based on the updated posX, posY values.

S704では、スタンプ操作後、画面のタッチが維持されているかどうかをタッチイベントから取得する。ここで、タッチが解除されていると判断された場合、スタンプ操作は終了し、図3のS25の処理は終了する。これに対して、引き続きユーザによりタッチがされていると判断された場合、処理はS701に戻り、前述の処理を繰り返す。 In S704, after the stamp operation, whether or not the touch of the screen is maintained is acquired from the touch event. Here, when it is determined that the touch is released, the stamp operation ends, and the process of S25 in FIG. 3 ends. On the other hand, when it is determined that the user continues to touch, the process returns to S701 and the above-described process is repeated.

尚、この実施形態では、スタンプの操作はスワイプイベントによる移動のみであるが、本発明はこれによって限定されるものではない。例えば、ピンチアウトによるスタンプの拡大、ロングタップ(長押し)とスワイプを組み合わせてCanvasの描画物を平行移動させるなど、タッチイベントとコンテンツ操作には多くの組み合わせが考えられる。 In this embodiment, the stamp operation is limited to movement by a swipe event, but the present invention is not limited thereto. For example, there are many possible combinations of touch events and content operations, such as enlarging the stamp by pinching out, and translating the Canvas drawing object by combining long tap (long press) and swipe.

ここで、ピンチアウトとは、ユーザが二本の指で画面にタッチした後、二本の指の間隔を空ける操作である。一般的な携帯型情報端末において、この操作は、画像・画面の拡大などに利用される事が多い。また、先述の移動とは、描画領域1206内の移動とは異なり、描画物であるスタンプ1209がCanvas内で移動することを意味している。例えば、図12において、スタンプ1209内のハートをwidth/2だけ右に移動したとすると、スタンプ1209の左半分は何も表示されず、その右半分にはハートの左半分が入っているような状態になる。 Here, the pinch-out is an operation in which the user touches the screen with two fingers and then the two fingers are spaced apart from each other. In a general portable information terminal, this operation is often used for enlarging an image / screen. Further, the above-mentioned movement means that the stamp 1209, which is a drawing object, moves in the Canvas, unlike the movement in the drawing area 1206. For example, in FIG. 12, if the heart in the stamp 1209 is moved to the right by width / 2, nothing is displayed on the left half of the stamp 1209, and the left half of the heart is contained in the right half. Become in a state.

<プリンタ設定の詳細>
ユーザが、図12に示したプリントボタン1205を押下することで図3のS26の処理が開始する。ここでは、図3のS26のプリンタ設定の詳細について、図9を用いて説明する。なおS901、S909〜S911はCPU100がスクリプト層217のプログラムを用いて実行する処理であり、S902、S904〜S905、S907、S908、S912はCPU100がネイティブ層218のプログラムを用いて実行する処理である。また、S903とS906とはプリンタ112が実行する処理である。
<Details of printer settings>
When the user presses the print button 1205 shown in FIG. 12, the process of S26 in FIG. 3 starts. Here, the details of the printer setting of S26 of FIG. 3 will be described with reference to FIG. Note that S901 and S909 to S911 are processes executed by the CPU 100 using the program of the script layer 217, and S902, S904 to S905, S907, S908 and S912 are processes executed by the CPU 100 using the program of the native layer 218. .. Further, S903 and S906 are processes executed by the printer 112.

S901で、CPU100は、スクリプト層217からネイティブ層218へデバイス情報としてのプリンタ情報取得を依頼する。これは、プリンタ112と通信を行うためのスクリプト層217からの要求にあたる。依頼の方法は、画像選択時と同様に、バインディング機能によりスクリプトからネイティブ固有のAPIを呼び出す。ネイティブ層218には、スクリプト層217から直接呼び出せる関数もしくはその関数を間接的に呼び出す、いわゆる、ラッパが予め用意されている。例えば、GetPrinterInfoというネイティブ関数を用意しておき、スクリプト側からその関数を呼び出す。このようにして、ネイティブ層はスクリプト層からの外部デバイスとの通信の要求を取得する。 In S901, the CPU 100 requests the script layer 217 to the native layer 218 to acquire printer information as device information. This corresponds to a request from the script layer 217 for communicating with the printer 112. As for the request method, the native API is called from the script by the binding function as in the case of image selection. The native layer 218 is provided with a so-called wrapper that can be called directly from the script layer 217 or indirectly calls the function. For example, a native function called GetPrinterInfo is prepared, and the function is called from the script side. In this way, the native layer gets the request for communication with the external device from the script layer.

通常、スクリプト層217からはセキュリティ上の制限で外部デバイスと直接通信することはできない。そのため、上記のように、スクリプト層217から、一旦、ネイティブ層218へ外部デバイス情報の取得を依頼し、ネイティブ層218を介して外部デバイスと通信を行う。ここで、ネイティブ層218は、OS層219を介して、外部デバイス(例えば、プリンタ112)と通信する機能を備えている。 Normally, the script layer 217 cannot directly communicate with an external device due to security restrictions. Therefore, as described above, the script layer 217 once requests the native layer 218 to acquire the external device information, and communicates with the external device via the native layer 218. Here, the native layer 218 has a function of communicating with an external device (for example, a printer 112) via the OS layer 219.

S902で、CPU100は、ネイティブ層218が該関数を呼び出されると、プリンタの検出、いわゆるディスカバリーを行う。例えば、同一無線LANルータで繋がっているプリンタを検出する。ここでは、通信可能なプリンタの検出を行うため、例えば、Bonjour(登録商標)などのプロトコルにより、ブロードキャストやマルチキャスト等の方法を用いてプリンタに対して通信を試みる。 In S902, the CPU 100 performs printer detection, so-called discovery, when the native layer 218 calls the function. For example, it detects printers connected by the same wireless LAN router. Here, in order to detect a printer that can communicate, for example, a protocol such as Bonjour (registered trademark) is used to attempt communication with the printer using a method such as broadcasting or multicast.

これに対して、S903では、プリンタ112はその要求に応じて応答する。 On the other hand, in S903, the printer 112 responds to the request.

S904では、CPU100は、応答のあったプリンタのIPアドレスを検知して記憶する。さらに、S905では、CPU100は、応答のあったプリンタのIPアドレスへプリンタ情報の提供を要求する。応答のあったプリンタが複数の場合、CPU100は、全てのプリンタに対して情報の提供を要求する。そのために、CPU100はネイティブ層で、プリンタの情報を取得するためのコマンドを生成する。そのコマンドとは、プリンタの動作を指定する命令であり、その一例としては、以下のようなXMLで表現される。 In S904, the CPU 100 detects and stores the IP address of the printer that responded. Further, in S905, the CPU 100 requests the IP address of the printer that responded to provide the printer information. When there are a plurality of responsive printers, the CPU 100 requests all printers to provide information. Therefore, the CPU 100 generates a command for acquiring printer information in the native layer. The command is a command for specifying the operation of the printer, and as an example thereof, it is expressed in XML as shown below.

----------------------------------------------
01: <?xml version="1.0" encoding="utf-8" ?>
02: <cmd xmlns:trans="http://www.xxxx/yyyyy/">
03: <contents>
04: <operation>GetInformation</operation>
05: </contents>
06: </cmd>
----------------------------------------------
上記各行の左側に書かれている「01:」等の数値は説明を行うために付加した行番号であり、本来のXML形式のテキストには記載されない。
----------------------------------------------
01: <? xml version = "1.0" encoding = "utf-8"?>
02: <cmd xmlns: trans = "http://www.xxxx/yyyyy/">
03: <contents>
04: <operation> GetInformation </ operation>
05: </ contents>
06: </ cmd>
----------------------------------------------
Numerical values such as "01:" written on the left side of each of the above lines are line numbers added for explanation and are not described in the original XML format text.

1行目はヘッダであり、XML形式で記述していることを表している。 The first line is a header, which indicates that it is described in XML format.

2行目のcmdはコマンドの開始を意味する。xmlnsで名前空間を指定し、コマンドの解釈の定義を指定している。尚、6行目の</cmd>でコマンドの終了を示している。 The cmd on the second line means the start of the command. The namespace is specified by xmlns, and the definition of command interpretation is specified. The end of the command is indicated by </ cmd> on the 6th line.

3行目は以後に内容を記載する宣言であり、5行目でその終了を示している。 The third line is a declaration that describes the contents thereafter, and the fifth line indicates the end.

4行目には要求する命令が記載されており、<operation>と</operation>の間に実際の命令文言が存在する。命令文言であるGetInformationは、外部デバイスであるプリンタの情報を取得する命令である。例えば、プリンタが対応している用紙種類、サイズ、縁なし印刷機能の有無、印刷品位、等のケーパビリティ情報を提供するよう要求する。 The required instruction is described on the fourth line, and the actual instruction wording exists between <operation> and </ operation>. The command wording, Get Information, is a command for acquiring information on a printer that is an external device. For example, it is requested to provide capability information such as the paper type, size, borderless printing function, print quality, etc. supported by the printer.

尚、プリンタ情報取得コマンドの生成は、例えば、ROM101に予め記憶した固定のテキストを読み込んでも構わない。また、XML等のテキスト形式に限らず、バイナリ形式で記述し、それに沿ったプロトコルで通信しても良い。また、生成したプリンタ情報取得コマンドは、HTTP等のプリンタが対応している通信プロトコルに従った形式で、外部デバイス通信部221を介してプリンタ112へ送信される。 To generate the printer information acquisition command, for example, a fixed text stored in advance in the ROM 101 may be read. Further, it is not limited to the text format such as XML, and may be described in a binary format and communicated by a protocol according to the description. Further, the generated printer information acquisition command is transmitted to the printer 112 via the external device communication unit 221 in a format according to a communication protocol supported by the printer such as HTTP.

また、通信方法はこれに限定されるものではない。Wi−Fi(登録商標)ダイレクトやBluetooth(登録商標)、赤外線通信、電話回線、有線LAN、USBを用いた接続でも良く、その方法に沿ったプロトコルで通信を行えば同様の効果を得ることができる。 Moreover, the communication method is not limited to this. Connection using Wi-Fi (registered trademark) direct, Bluetooth (registered trademark), infrared communication, telephone line, wired LAN, or USB may be used, and the same effect can be obtained by communicating using a protocol according to the method. it can.

図9では、ネイティブ層218で、コマンドを生成する構成としているが、スクリプト層217で、コマンドを生成する構成でも、同様の効果が得られる。その場合、スクリプト層217で、例えば、上記のXML形式の命令文を含むコマンドを作成し、ネイティブ層218へ渡す。それを受けて、ネイティブ層218は、通信プロトコルに従った形式でプリンタ112へそのコマンドを送信する。 In FIG. 9, the native layer 218 is configured to generate commands, but the script layer 217 is configured to generate commands, and the same effect can be obtained. In that case, the script layer 217 creates, for example, a command including the above XML format statement and passes it to the native layer 218. In response, the native layer 218 transmits the command to the printer 112 in a format according to the communication protocol.

S906で、プリンタ112は、情報処理装置115からコマンドを受信すると、デバイス情報であるプリンタ情報をXML形式で通信プロトコルに沿って、情報処理装置115へ送信する。以下に、プリンタの情報の一例を示す。 In S906, when the printer 112 receives a command from the information processing device 115, the printer 112 transmits the printer information, which is the device information, to the information processing device 115 in the XML format according to the communication protocol. An example of printer information is shown below.

----------------------------------------------
01: <?xml version="1.0" encoding="utf-8" ?>
02: <cmd xmlns:trans="http://www.xxxx/yyyyy/">
03: <contents>
04: <device id=”Printer001” />
05: <memory receive= 7680000 />
06: <mode = 1>
07: <media>GlossyPaper</media>
08: <size>A4</size>
09: <quality>1</quality>
10: <border>no</border>
11: <dpi x=1200 y=1200 />
12: </mode>
13: <mode = 2>
〜中略〜
</mode>
<mode = 3>
〜中略〜
</mode>

〜中略〜

</contents>
</cmd>
----------------------------------------------
1行目はヘッダであり、XML形式で記述していることを表している。2行目のcmdはコマンドの開始を意味する。xmlnsで名前空間を指定し、コマンドの解釈の定義を指定している。尚、最下行の</cmd>でコマンドの終了を示している。
----------------------------------------------
01: <? xml version = "1.0" encoding = "utf-8"?>
02: <cmd xmlns: trans = "http://www.xxxx/yyyyy/">
03: <contents>
04: <device id = ”Printer001” />
05: <memory receive = 7680000 />
06: <mode = 1>
07: <media> Glossy Paper </ media>
08: <size> A4 </ size>
09: <quality> 1 </ quality>
10: <border> no </ border>
11: <dpi x = 1200 y = 1200 />
12: </ mode>
13: <mode = 2>
~ Omitted ~
</ Mode>
<Mode = 3>
~ Omitted ~
</ Mode>

~ Omitted ~

</ Contents>
</ cmd>
----------------------------------------------
The first line is a header, which indicates that it is described in XML format. The cmd on the second line means the start of the command. The namespace is specified by xmlns, and the definition of command interpretation is specified. The bottom line </ cmd> indicates the end of the command.

3行目は以後に内容を記載する宣言であり、下の</contents>までその内容は継続する。4行目でデバイスIDを示している。ここでは、プリンタ112の機種名が「Printer001」であることを表している。5行目についてはこの実施形態では用いない。後の実施形態で詳細に述べる。6行目以降はプリンタ112が有する各モードについての記述である。<mode>から</mode>までで、1つのモードにおける情報が記述されている。6行目では、モードの番号が1である。以降の<media>は印刷用紙の種類、<size>は用紙サイズ、<quality>は印刷品位、<border>は縁あり/なしの情報をそれぞれ記述している。11行目の<dpi>は入力解像度を表しており、横方向が1200[dpi]、縦方向が1200[dpi]である。入力解像度についての詳細は後述する。 The third line is a declaration that describes the content after that, and the content continues until </ contents> below. The device ID is shown on the 4th line. Here, it means that the model name of the printer 112 is "Printer001". The fifth line is not used in this embodiment. It will be described in detail in a later embodiment. The sixth and subsequent lines are descriptions of each mode of the printer 112. Information in one mode is described from <mode> to </ mode>. In the sixth line, the mode number is 1. Subsequent <media> describes the type of printing paper, <size> describes the paper size, <quality> describes the print quality, and <border> describes information with / without borders. The <dpi> on the 11th line represents the input resolution, which is 1200 [dpi] in the horizontal direction and 1200 [dpi] in the vertical direction. Details of the input resolution will be described later.

13行目以降は他のモードであるモード2についての情報が記述されている。このように、プリンタ112の機種名と、そのプリンタが対応している全てのモードがこのXMLに記述されている。尚、プリンタ情報の記述方法はこれに限定されることはなく、タグ形式でないテキストや、バイナリ形式等の他の形式であっても構わない。 From the 13th line onward, information about mode 2, which is another mode, is described. As described above, the model name of the printer 112 and all the modes supported by the printer are described in this XML. The method of describing the printer information is not limited to this, and may be a text other than the tag format or another format such as a binary format.

また、上記はプリンタの印刷機能の情報を受け渡ししている例を記載しているが、本発明はこれに限定されるものではない。例えば、プリンタが処理可能な画像処理や解析処理、静かに印刷するモードの有無、メモリカードの利用有無、インク残量などのステータスなどの情報を受け渡ししても良い。画像処理の例としては、モノクロやセピア、彩度強調などの色変換、複数画像のレイアウト、ホワイトバランス補正、ノイズ除去、その他自動で写真を好ましい色や輝度に補正する処理などが挙げられる。 Further, although the above describes an example in which information on the printing function of the printer is passed, the present invention is not limited to this. For example, information such as image processing and analysis processing that can be processed by the printer, presence / absence of a quiet printing mode, presence / absence of use of a memory card, and status such as the remaining amount of ink may be passed. Examples of image processing include color conversion such as monochrome, sepia, and saturation enhancement, layout of multiple images, white balance correction, noise removal, and other processing that automatically corrects a photograph to a preferable color and brightness.

そして、S907では、CPU100は、プリンタからプリンタ情報を取得する。CPU100は、ネイティブ層で、受信したプリンタ情報から、例えば、プリンタ112が有する全てのモードにおける印刷用紙の種類、サイズ、印刷品位、縁あり/なしの項目と項目数等を取得する。 Then, in S907, the CPU 100 acquires printer information from the printer. In the native layer, the CPU 100 acquires, for example, the type, size, print quality, bordered / non-rimmed items and the number of items of the printing paper in all modes of the printer 112 from the received printer information.

S908では、CPU100は、受信したプリンタ情報をスクリプト層217が解釈可能な形式に変換して、スクリプト層217へ送信する。つまり、CPU100は、プリンタ112との通信によって得られた情報をスクリプト層217へ渡す。具体的には、ネイティブ関数を設けておき、バインディング機能を用いる。また、受け取ったXML形式のプリンタ情報で送信したり、タグなしのテキスト形式に変えて送信する等の方法を用いても良い。加えて、スクリプト層217から特定のネイティブ関数を呼び出す毎に、その戻り値として情報を取得しても良い。また、ネイティブ関数に取得するモードなどの引数を渡し、その戻り値として情報を得ても良い。さらに、上述のJSON文字列を用いた受け渡しや、データ変換部207及び203を用いてBASE64等の文字列で受け渡しを行ってもよい。 In S908, the CPU 100 converts the received printer information into a format that can be interpreted by the script layer 217 and transmits it to the script layer 217. That is, the CPU 100 passes the information obtained by the communication with the printer 112 to the script layer 217. Specifically, a native function is provided and the binding function is used. Further, a method such as transmitting with the received XML format printer information or changing to a text format without a tag may be used. In addition, each time a specific native function is called from the script layer 217, information may be acquired as the return value. In addition, you may pass an argument such as the mode to be acquired to the native function and obtain information as the return value. Further, the above-mentioned JSON character string may be used for delivery, or the data conversion units 207 and 203 may be used for delivery using a character string such as BASE64.

S909で、CPU100は、ネイティブ層218から受信したプリンタ情報に基づいて、プリンタ112で利用できる機能を含む設定画面(図13)を形成し、表示する。これは、表示制御とも呼ばれる。ここで、接続可能なプリンタが複数ある場合はプリンタ名を表示し、設定画面1301を表示する前にユーザに印刷するプリンタを選択させるための表示画面を生成する。そして、CPU100は、選択されたプリンタに対応するプリンタ情報を用いて、選択されたプリンタの設定画面を表示する。尚、プリンタの選択は、上記に限らず、一番早く応答してきたプリンタや、より機能が多いプリンタ、印刷ジョブが混雑していないプリンタを選択する、等の方法も考えられる。 In S909, the CPU 100 forms and displays a setting screen (FIG. 13) including functions available in the printer 112 based on the printer information received from the native layer 218. This is also called display control. Here, when there are a plurality of connectable printers, the printer name is displayed, and a display screen for allowing the user to select a printer to print before displaying the setting screen 1301 is generated. Then, the CPU 100 displays the setting screen of the selected printer by using the printer information corresponding to the selected printer. The selection of the printer is not limited to the above, and a method such as selecting the printer that responded earliest, the printer having more functions, or the printer that the print job is not congested can be considered.

このように、CPU100は、印刷用紙の種類・サイズ、印刷品位、縁あり/なし等のプリンタで利用できる機能を選択させる設定画面1301(図13)を表示する。設定画面の形成方法の一例として、以下に、HTML記述のサンプルを示す。 In this way, the CPU 100 displays the setting screen 1301 (FIG. 13) for selecting functions that can be used in the printer, such as the type / size of printing paper, print quality, and with / without borders. As an example of the method of forming the setting screen, a sample of HTML description is shown below.

------------------------------------------------
<!DOCTYPE html>
<head>
<title>印刷設定 </title>
<script>
<!-- 用紙サイズ -->
var PaperSizeNum = GetPaperSizeNum();
var p = document.getElementById("PaperList");
var i;
for(i=0; i<PaperSizeNum; i++){
p.options[i] = new Option(GetPaperSizeT(i), GetPaperSizeV(i));
}

<!-- 用紙種類-->
var MediaTypeNum = GetMediaTypeNum();
var m = document.getElementById("MediaList");
var j;
for(j=0; j<MediaTypeNum; j++){
m.options[i] = new Option(GetMediaTypeT(j), GetMediaTypeV(j));
}

<!-- 印刷品位 -->
var QualityNum = GetQualityNum();
var q = document.getElementById("QualityList");
var k;
for(k=0; k< QualityNum; k++){
q.options[i] = new Option(GetQualityT(k), GetQualityV(k));
}

<!-- 縁あり/なし-->
var BorderNum = GetBorderNum();
var b = document.getElementById("BorderList");
var l;
for(l=0; l<BorderNum; l++){
b.options[i] = new Option(GetBorderT(l), GetBorderV(l));
}

<!-- 印刷関数-->
function printer() {
SetPrint(document.getElementById("PaperList").value,
document.getElementById("MediaList").value,
document.getElementById("QualityList").value,
document.getElementById("BorderList").value);
}
</script>
</head>

<!-- 表示部 -->
<body>
用紙サイズ <select id="PaperList"></select><br />
用紙種類 <select id="MediaList"></select><br />
印刷品位 <select id="QualityList"></select><br />
縁あり/なし <select id="BorderList"></select><br />
<br />

<button id="btn1" onclick="printer()">設定完了</button>
</body>
</html>
------------------------------------------------
上記のGetPaperSizeNum( )、GetMediaTypeNum( )、GetQualityNum( )、GetBorderNum( )はネイティブ関数であり、それぞれの項目数を取得する機能を備える。例えば、プリンタが対応している用紙サイズがA4、A5、B5、L判の4種類である場合、GetPaperSizeNum( )は4を返す。
------------------------------------------------
<! DOCTYPE html>
<Head>
<Title> Print settings </ title>
<Script>
<!-Paper size->
var PaperSizeNum = GetPaperSizeNum ();
var p = document.getElementById ("PaperList");
var i;
for (i = 0; i <PaperSizeNum; i ++) {
p.options [i] = new Option (GetPaperSizeT (i), GetPaperSizeV (i));
}

<!-Paper type->
var MediaTypeNum = GetMediaTypeNum ();
var m = document.getElementById ("MediaList");
var j;
for (j = 0; j <MediaTypeNum; j ++) {
m.options [i] = new Option (GetMediaTypeT (j), GetMediaTypeV (j));
}

<!-Print quality->
var QualityNum = GetQualityNum ();
var q = document.getElementById ("QualityList");
var k;
for (k = 0; k <QualityNum; k ++) {
q.options [i] = new Option (GetQualityT (k), GetQualityV (k));
}

<!-With / without rim->
var BorderNum = GetBorderNum ();
var b = document.getElementById ("BorderList");
var l;
for (l = 0; l <BorderNum; l ++) {
b.options [i] = new Option (GetBorderT (l), GetBorderV (l));
}

<!-Print function->
function printer () {
SetPrint (document.getElementById ("PaperList"). value,
document.getElementById ("MediaList"). value,
document.getElementById ("QualityList"). value,
document.getElementById ("BorderList"). value);
}
</ Script>
</ Head>

<!-Display->
<Body>
Paper size <select id = "PaperList"></select><br/>
Paper type <select id = "MediaList"></select><br/>
Print quality <select id = "QualityList"></select><br/>
With / without border <select id = "BorderList"></select><br/>
<br />

<Button id = "btn1" onclick = "printer ()"> Setting completed </ button>
</ Body>
</ html>
------------------------------------------------
The above-mentioned GetPaperSizeNum (), GetMediaTypeNum (), GetQualityNum (), and GetBorderNum () are native functions and have a function of acquiring the number of each item. For example, when the printer supports four types of paper sizes, A4, A5, B5, and L size, GetPaperSizeNum () returns 4.

GetPaperSizeT(n)、GetMediaTypeT(n)、GetQualityT(n)、GetBorderT(n)もネイティブ関数であり、引数nの値番目の文字列を返す。例えば、用紙サイズのテキストを返す関数のGetPaperSize(0)の返り値は「A4」、GetPaperSize(1)の返り値は「A5」となる。これらの値は、プリンタから受信するプリンタ情報からネイティブ関数が取り出す。 GetPaperSizeT (n), GetMediaTypeT (n), GetQualityT (n), and GetBorderT (n) are also native functions, and return the character string of the value th of the argument n. For example, the return value of GetPaperSize (0), which is a function that returns paper-sized text, is "A4", and the return value of GetPaperSize (1) is "A5". These values are retrieved by the native function from the printer information received from the printer.

GetPaperSizeV(n)、GetMediaTypeV(n)、GetQualityV(n)、GetBorderV(n)もネイティブ関数であり、引数nの値番目の文字列を返す。例えば、用紙種類のテキストを返す関数のGetMediaTypeT(n)の返り値は「光沢紙」のように、表示してユーザに示す文言である。これに対して、GetMediaTypeV(0)の返り値は「GlossyPaper」とプリンタが解釈可能な表現となっている。 GetPaperSizeV (n), GetMediaTypeV (n), GetQualityV (n), and GetBorderV (n) are also native functions and return the character string of the value th of the argument n. For example, the return value of GetMediaTypeT (n), a function that returns the text of the paper type, is a wording that is displayed and shown to the user, such as "glossy paper". On the other hand, the return value of GetMediaTypeV (0) is an expression that can be interpreted by the printer as "GlossyPaper".

これらの文言や表現は、プリンタから送られてきた情報と結び付けてネイティブが決定する。例えば、プリンタから送られてきた情報より取り出した値が「GlossyPaper」であった場合、表示するテキストは「光沢紙」と決定する。決定の方法として、ネイティブはこれらの対応表を予め保持しておき、その対応表に沿ってテキストを決定すれば良い。 These words and expressions are determined by the native in association with the information sent from the printer. For example, if the value extracted from the information sent from the printer is "GlossyPaper", the text to be displayed is determined to be "glossy paper". As a method of determination, the native may hold these correspondence tables in advance and determine the text according to the correspondence table.

尚、上記では、例として、用紙サイズ、用紙種類、印刷品位、縁あり/なしの設定を行う仕様であるが、これに限定されるものではない。他の例として、両面/片面、カラー/モノクロ、画像補正のオン/オフ等の他の設定項目が挙げられることは言うまでもない。また、前述のように印刷機能のみではなく、プリンタが処理可能な画像処理や解析処理、静かに印刷するモードの有無、メモリカードの利用有無、インク残量などのステータスなどの情報を表示しても良い。 In the above, as an example, the specifications are such that the paper size, the paper type, the print quality, and the presence / absence of the border are set, but the specification is not limited to this. Needless to say, other setting items such as double-sided / single-sided, color / monochrome, and image correction on / off can be mentioned as other examples. In addition to the printing function as described above, information such as image processing and analysis processing that can be processed by the printer, the presence / absence of a quiet printing mode, the presence / absence of a memory card, and the status such as the remaining ink level is displayed. Is also good.

S910で、CPU100は、設定画面1301に対するユーザ操作に基づいて、プリンタに設定する機能を選択する。上記の例で示したHTMLを、レンダリング部216を用いてディスプレイ104に表示した例が図13に示す1301である。ネイティブ層218を介してプリンタ情報を要求し、プリンタ情報から上記のネイティブ関数を用いて取得した情報を基に設定画面1301が形成されている。尚、上記HTMLはスクリプト層217、ネイティブ層218のいずれで形成しても良い。 In S910, the CPU 100 selects a function to be set in the printer based on a user operation on the setting screen 1301. An example in which the HTML shown in the above example is displayed on the display 104 using the rendering unit 216 is 1301 shown in FIG. The printer information is requested via the native layer 218, and the setting screen 1301 is formed based on the information acquired from the printer information by using the above native function. The HTML may be formed by either the script layer 217 or the native layer 218.

また、図13に示す用紙サイズ等の設定項目はそれぞれプルダウンメニューになっており、ユーザ操作によって項目を選択する事ができる。ここで、設定画面1301は、プルダウンメニューによって、用紙サイズの設定項目として選択可能な項目の一覧が表示されている状態を示しており、ユーザ操作によってA4やA5等の用紙サイズを選択することができる。 Further, each setting item such as the paper size shown in FIG. 13 is a pull-down menu, and the item can be selected by a user operation. Here, the setting screen 1301 shows a state in which a list of items that can be selected as paper size setting items is displayed by a pull-down menu, and a paper size such as A4 or A5 can be selected by user operation. it can.

S911で、CPU100は、設定完了ボタン1302に対するユーザ操作を検知すると、ユーザ操作によって選択された設定項目を含む設定情報を作成して、ネイティブ層218へ送信する。上記HTML記述の例にあるSetPrint( )もバインディング機能を有するネイティブ関数である。上記の例では、SetPrint( )を用いて、用紙サイズ、用紙種類、印刷品位、縁あり/なしの設定を文字列としてネイティブ層218へ渡している。 When the CPU 100 detects the user operation for the setting completion button 1302 in S911, the CPU 100 creates setting information including the setting items selected by the user operation and transmits the setting information to the native layer 218. SetPrint () in the above HTML description example is also a native function having a binding function. In the above example, SetPrint () is used to pass the settings of paper size, paper type, print quality, and with / without border to the native layer 218 as a character string.

S912で、CPU100は、バインディング機能によりスクリプト層217から設定情報を受信する。ネイティブ層218では、後に、受信した設定情報、印刷対象の画像データ、さらにはスタンプの画像データとを基に、プリンタ112の通信プロトコルに従って、プリントコマンドを生成する。そして、プリンタコマンドは、通信制御部213を介してプリンタ112へ送信されることになる。 In S912, the CPU 100 receives the setting information from the script layer 217 by the binding function. The native layer 218 later generates a print command according to the communication protocol of the printer 112 based on the received setting information, the image data to be printed, and the image data of the stamp. Then, the printer command is transmitted to the printer 112 via the communication control unit 213.

<レンダリングの詳細>
ユーザが、図13に示した設定画面1301の設定完了ボタン1302を押下することで図3のS27のレンダリング処理が開始する。ここでは、図3のS27のレンダリングの詳細について、図10を用いて説明する。
<Rendering details>
When the user presses the setting completion button 1302 on the setting screen 1301 shown in FIG. 13, the rendering process of S27 in FIG. 3 starts. Here, the details of the rendering of S27 in FIG. 3 will be described with reference to FIG.

この実施形態のレンダリングは、UIに表示しているコンテンツをプリント用の画像サイズ(画素数)に変換する事である。コンテンツとは、上述した写真画像とスタンプを配置した画像である。通常、UIに表示される画像の画素数よりも印刷で用いられる画像の画素数の方が多いため、印刷には画像の拡大処理が必要となる。ここでは、UIに表示されたコンテンツを同じ構図でより大きな画像(画素数)になるように描画する事で、拡大処理を行う。この実施形態では、バンドレンダリング(分割拡大)の処理を主にスクリプト層で実行する。 The rendering of this embodiment is to convert the content displayed on the UI into an image size (number of pixels) for printing. The content is an image in which the above-mentioned photographic image and stamp are arranged. Normally, the number of pixels of an image used for printing is larger than the number of pixels of an image displayed on the UI, so printing requires enlargement processing of the image. Here, the enlargement processing is performed by drawing the content displayed on the UI so as to have a larger image (number of pixels) with the same composition. In this embodiment, the band rendering (division / enlargement) process is mainly executed in the script layer.

なお、図10において、S1001、S1003、S1004、S1007は、CPU100がスクリプト層217のプログラムを用いて実行する処理である。S1002、S1005、S1008は、CPU100がOS層219のプログラムを用いて実行する処理である。S1006は、CPU100がスクリプト層217とネイティブ層218のプログラムを用いて実行する処理である。 In FIG. 10, S1001, S1003, S1004, and S1007 are processes executed by the CPU 100 using the program of the script layer 217. S1002, S1005, and S1008 are processes executed by the CPU 100 using the program of the OS layer 219. S1006 is a process executed by the CPU 100 using the programs of the script layer 217 and the native layer 218.

S1001で、CPU100は、インジケータの起動をOS層219に依頼する。S1002で、CPU100は、依頼によって起動したインジケータをディスプレイ104に表示する。これにより、ユーザは処理が実行中であることを知ることができる。 In S1001, the CPU 100 requests the OS layer 219 to start the indicator. In S1002, the CPU 100 displays the indicator activated by the request on the display 104. This allows the user to know that the process is in progress.

S1003で、CPU100は、S911で確定した設定情報で設定されている用紙サイズに対応する出力サイズを決定する。出力サイズとは画像の画素数の事であり、この実施形態で出力サイズは、上記の設定で指定された印刷モードでの入力解像度と用紙サイズより算出する。入力解像度とは、プリンタ112の印刷モード毎に定められており、その入力解像度の画素数で画像処理や量子化処理が行われる。その入力解像度以外の画像データがプリンタ112へ転送された場合、プリンタでその入力解像度になるように拡大・縮小(変倍)が行われる。 In S1003, the CPU 100 determines the output size corresponding to the paper size set in the setting information determined in S911. The output size is the number of pixels of the image, and in this embodiment, the output size is calculated from the input resolution and the paper size in the print mode specified in the above settings. The input resolution is defined for each print mode of the printer 112, and image processing and quantization processing are performed based on the number of pixels of the input resolution. When image data other than the input resolution is transferred to the printer 112, the printer performs enlargement / reduction (magnification) so as to have the input resolution.

ここでは、入力解像度が1200dpi、用紙サイズがA4であるとして出力サイズの算出方法の例を後述する。なお、「入力画素数[pixel]」が出力サイズにあたり、入力解像度はプリンタで設定されている印刷モードによって異なる場合がある。印刷モードとは用紙種類や品位などによって設けられた設定である。他の例として、出力サイズは用紙サイズ毎に予め定めておいても良いし、予め定めた解像度から算出しても良い。例えば、入力解像度を300dpiなどに設定しておき、用紙サイズを用いて算出しても良い。 Here, an example of a method of calculating the output size will be described later assuming that the input resolution is 1200 dpi and the paper size is A4. The "number of input pixels [pixel]" corresponds to the output size, and the input resolution may differ depending on the print mode set in the printer. The print mode is a setting provided according to the paper type and quality. As another example, the output size may be predetermined for each paper size, or may be calculated from a predetermined resolution. For example, the input resolution may be set to 300 dpi or the like and calculated using the paper size.

なお、プリンタの印刷モードでの入力解像度以下の画像データをプリンタへ転送して印刷する場合は、プリンタ内で印刷モードの入力解像度へと拡大処理が実行される。しかし、公知の単純なロジックを用いて拡大処理を実行する場合、印刷画像にスタンプなどのオブジェクトの線や写真画像にボケやジャギーが発生し、人の目には画像品質が劣化したように見えてしまう。これとは反対に、プリンタの印刷モードの入力解像度以上の画像データが転送されたとしても、その画像データはプリンタ内で入力解像度に縮小されてしまう。 When transferring image data equal to or lower than the input resolution in the print mode of the printer to the printer for printing, the enlargement process is executed in the printer to the input resolution in the print mode. However, when the enlargement process is executed using a known simple logic, blurring and jaggies occur in the lines of objects such as stamps in the printed image and in the photographic image, and the image quality seems to be deteriorated to the human eye. It ends up. On the contrary, even if the image data larger than the input resolution of the print mode of the printer is transferred, the image data is reduced to the input resolution in the printer.

従って、上記のように出力サイズをプリンタの印刷モードでの入力解像度と用紙サイズより決定することが、処理効率が良く、結果として得られる画像の画質も良い。 Therefore, determining the output size from the input resolution and the paper size in the print mode of the printer as described above improves the processing efficiency and the image quality of the resulting image.

S1004では、出力画像の描画領域のサイズを算出する。 In S1004, the size of the drawing area of the output image is calculated.

ここで、出力画像の描画領域とは一枚のCanvasであり、出力サイズのCanvasに対して、先述した個々のCanvasを、サイズと領域内の相対位置が合うようにレンダリングしてゆく。 Here, the drawing area of the output image is one Canvas, and the individual Canvass described above are rendered so that the size and the relative position in the area match with respect to the Canvas of the output size.

この実施形態において、出力画像の描画領域のサイズは、アプリケーションが動作している情報処理装置の状況により算出される。これは、その情報処理装置でのメモリ不足を回避するためである。例えば、入力解像度が1200dpiのプリンタで用紙サイズがA4の印刷を行う場合、メモリに1.25[GB]の容量が必要となる。そのメモリ容量の算出方法を以下に示す。 In this embodiment, the size of the drawing area of the output image is calculated according to the situation of the information processing device in which the application is operating. This is to avoid running out of memory in the information processing device. For example, when printing on a paper size of A4 with a printer having an input resolution of 1200 dpi, a capacity of 1.25 [GB] is required in the memory. The calculation method of the memory capacity is shown below.

------------------------------
サイズA4:縦210[mm]×横297[mm]
縦画素数[pixel]
=210[mm]÷25.4[mm/inch] ×1200[dpi]
横画素数[pixel]
=297[mm]÷25.4[mm/inch] ×1200[dpi]
入力画素数[pixel]
=縦画素数[pixel]×横画素数[pixel]
必要メモリ容量[Byte]
=入力画素数[pixel]×3[channel]×8[ビット]
≒417.6[MB](バイナリデータの場合)
ここで、3[channelとは、画像データの各画素がRGBの3成分で表現されることを示している。画像データの各画素がYMCKの4成分で表現されるなら、4[channel]となる。また、8[ビット]とは、各画素各色成分が0〜255の値をとる8ビットで表現されることを示している。
------------------------------
Size A4: length 210 [mm] x width 297 [mm]
Number of vertical pixels [pixel]
= 210 [mm] ÷ 25.4 [mm / inch] × 1200 [dpi]
Number of horizontal pixels [pixel]
= 297 [mm] ÷ 25.4 [mm / inch] × 1200 [dpi]
Number of input pixels [pixel]
= Number of vertical pixels [pixel] x number of horizontal pixels [pixel]
Required memory capacity [Byte]
= Number of input pixels [pixel] x 3 [channel] x 8 [bits]
≒ 417.6 [MB] (for binary data)
Here, 3 [channel means that each pixel of the image data is represented by three components of RGB. If each pixel of the image data is represented by the four components of YMCK, it will be 4 [channel]. Further, 8 [bit] indicates that each color component of each pixel is represented by 8 bits having a value of 0 to 255.

ここで、8ビットの値(0〜255)をすべて3桁の文字列で扱うとすると、必要メモリ容量(文字データ)は417.6[MB]×3[文字]≒ 1.25[GB]となる。 Here, assuming that all 8-bit values (0 to 255) are handled by a 3-digit character string, the required memory capacity (character data) is 417.6 [MB] x 3 [characters] ≒ 1.25 [GB]. It becomes.

------------------------------
出力画像の描画領域のサイズの決定方法として、例えば、メモリ確保を試みて、確保できなければ確保する量を減らして再度試み、確保できるまでそれを続けるなどの方法がある。そのメモリ確保はCanvasのsetAttributeで横幅(x方向)と高さ(y方向)を設定し、getContextで領域確保を行うことでなされる。ここで、横幅はプリンタに出力する全体画像の横幅で固定し、縦幅(高さ)を減らしながら上記のメモリ確保の試みを行う。こうする事で、図14に例示するように出力する全体画像を帯状(バンド)に分ける事が可能である。
------------------------------
As a method of determining the size of the drawing area of the output image, for example, there is a method of trying to allocate memory, reducing the amount to be allocated if it cannot be allocated, trying again, and continuing until it can be allocated. The memory allocation is performed by setting the width (x direction) and the height (y direction) with the Cambas setAttribute and allocating the area with getContext. Here, the width is fixed to the width of the entire image output to the printer, and the above-mentioned memory allocation attempt is made while reducing the height (height). By doing so, it is possible to divide the entire image to be output into bands as illustrated in FIG.

なお、この実施形態では横幅を固定し、高さ方向に帯状に分割する形にしたが、本発明はこれによって限定されるものではない。例えば、正方形や横方向に分割を行っても良い。ただし、プリンタでの印刷は画像の上部から下部に向かって順になされるのが一般的である。従って、プリンタに入力する画像データもこの印刷順序に対応して横に分割した帯状にすることが望ましい。このようにして、後述する分割拡大の処理が進む毎に、プリンタに画像データの分割送信が可能となり、印刷終了までの時間を短縮するという工夫も可能である。以上の処理から、帯状(バンド)に分割してレンダリング(プリンタの入力解像度に合わせて画像データを拡大処理して描画すること)を行うことをバンドレンダリングと呼ぶ。 In this embodiment, the width is fixed and the width is divided into strips in the height direction, but the present invention is not limited thereto. For example, it may be divided into a square or a horizontal direction. However, printing with a printer is generally performed in order from the top to the bottom of the image. Therefore, it is desirable that the image data to be input to the printer is also horizontally divided into strips corresponding to this printing order. In this way, each time the division / enlargement processing described later progresses, the image data can be divided and transmitted to the printer, and it is possible to shorten the time until the end of printing. From the above processing, performing rendering by dividing into bands (bands) (enlarging and drawing image data according to the input resolution of the printer) is called band rendering.

なお、出力画像の描画領域のサイズの決定方法は上記に限らず、例えば、確実にメモリ不足が生じないと予想される値に予め定めておいても良いし、レンダリングで印刷に遅延が起きない容量に決定するなどしても良い。 The method for determining the size of the drawing area of the output image is not limited to the above. For example, it may be set in advance to a value that is expected not to cause a memory shortage, and there is no delay in printing in rendering. You may decide on the capacity.

この実施形態では上記のように出力画像の描画領域のサイズを決定する事により、スクリプト層におけるメモリ不足の発生を防いでいる。 In this embodiment, the size of the drawing area of the output image is determined as described above to prevent the occurrence of memory shortage in the script layer.

S1005で、CPU100は、算出した出力画像の描画領域をRAM102に確保する。 In S1005, the CPU 100 secures a drawing area of the calculated output image in the RAM 102.

S1006で、CPU100は、バンドレンダリングを行う。なお、実際のレンダリング処理は、スクリプト層からの指示を受けてOS層219のインタプリタが実行するが、ここでは、スクリプトがOSの機能を利用する事もスクリプト層での実行として表している。その際、写真画像がS1005で確保した出力画像の描画領域に描画されるようにする。S1006で、CPU100は、写真画像の描画の依頼のスクリプトを解釈し、写真画像をレンダリングする。画像の描画はOS層219で行われ、CanvasのContextオブジェクトのdrawImageメソッドを利用する。なお、ここでいう描画とは、出力画像の描画領域として確保したメモリ空間へ画像データとして出力することをいい、ディスプレイ104上に画像を表示することではない。この実施形態ではS1006でバンドレンダリングの手法を用い、分割して画像を描画する。以下、その詳細について説明する。 In S1006, the CPU 100 performs band rendering. The actual rendering process is executed by the interpreter of the OS layer 219 in response to the instruction from the script layer, but here, the fact that the script uses the functions of the OS is also expressed as the execution in the script layer. At that time, the photographic image is drawn in the drawing area of the output image secured in S1005. In S1006, the CPU 100 interprets the script for requesting the drawing of the photographic image and renders the photographic image. The drawing of the image is performed in the OS layer 219, and the drawImage method of the Context object of Cambas is used. Note that the drawing referred to here means to output as image data to the memory space secured as the drawing area of the output image, and does not mean to display the image on the display 104. In this embodiment, the band rendering method is used in S1006 to divide and draw the image. The details will be described below.

図14は描画領域に出力される画像とバンドレンダリングとの関係を模式的に示す図である。 FIG. 14 is a diagram schematically showing the relationship between the image output to the drawing area and the band rendering.

図14において、1401はUI上に表示されたCanvasの画像、1402、1404はユーザの指示により配置されたスタンプ、1403はユーザが選択した写真画像である。尚、拡大に用いる写真画像はUI表示されているものではなく、画像ファイルをオープンして原画像を読取ったものを用いる。上述のように、UI用の表示には縮小処理が施されたものを使っている場合がある。縮小画像は原画像の情報を失っており、これを拡大しても失われた情報は元に戻らないからである。そのため、拡大対象の画像として、UI用の画像ではなく、ファイルから読み取られた画像サイズのものが使用される。尚、上述で補正等の画像処理を施した場合、画像ファイルをオープンして読み取った画像に対して該画像処理を施したものを拡大対象とする。ここでは、図4のS304で取得し、S305でRGB展開した画像をネイティブ層218から受け取り、スクリプト層217がその画像に拡大処理を行う。 In FIG. 14, 1401 is an image of Canvas displayed on the UI, 1402 and 1404 are stamps arranged according to the user's instruction, and 1403 is a photographic image selected by the user. The photographic image used for enlargement is not the one displayed on the UI, but the one obtained by opening the image file and reading the original image is used. As mentioned above, the display for the UI may be reduced. This is because the reduced image loses the information of the original image, and even if it is enlarged, the lost information cannot be restored. Therefore, as the image to be enlarged, an image of the image size read from the file is used instead of the image for UI. When image processing such as correction is performed as described above, the image that has been subjected to the image processing on the image read by opening the image file is targeted for enlargement. Here, the image acquired in S304 of FIG. 4 and expanded in RGB in S305 is received from the native layer 218, and the script layer 217 enlarges the image.

スタンプなどの画像はベクタデータとして保持しているものがある。ベクタデータは描画する際に画像として作成されるデータであるため、例えば、Canvasで拡大後に描画する場合にはその画質が劣化しない。ただし、一度ビットマップデータとして描画されたものやベクタデータでない画像データのスタンプは写真画像と同様である。この場合、上記の写真画像と同様、UI表示されているものではなく、なるべく解像度が高いソースを用いる。 Some images such as stamps are stored as vector data. Since the vector data is data created as an image at the time of drawing, for example, when drawing after enlarging with Cambas, the image quality does not deteriorate. However, the stamp of the image data that is once drawn as bitmap data or is not vector data is the same as the photographic image. In this case, as in the case of the above photographic image, a source having as high a resolution as possible is used instead of being displayed in the UI.

この実施形態ではCanvasの画像1401をプリンタ112が求める入力解像度(画素数)へ拡大する。拡大前のCanvasの画像1401は画像1405と同じサイズであり、横幅がWb[pixel]、高さ(縦長)Hb[pixel]である。1406は拡大後の画像であり、横幅We[pixel]、高さ(縦長)He[pixel]である。また、1407、1410、1413は同サイズの出力画像の描画領域であり、横幅We[pixel]、高さ(縦長)Hp[pixel]である。 In this embodiment, the Canvas image 1401 is enlarged to the input resolution (number of pixels) required by the printer 112. The image 1401 of Canvas before enlargement has the same size as the image 1405, and has a width of Wb [pixel] and a height (vertical) of Hb [pixel]. 1406 is an enlarged image, and has a width We [pixel] and a height (vertical) He [pixel]. Further, 1407, 1410, and 1413 are drawing areas of output images of the same size, and are width We [pixel] and height (vertical) Hp [pixel].

上述のように拡大後の画像の画素数は多くなるため、メモリ不足が生じやすい。そのため、図14に示す例では、3つに分割して拡大後の画像データを保持、あるいは外部デバイス(例えば、プリンタ)へ送信する。つまり、ここでは、拡大処理後の画像データの容量に対して1/3の容量であれば格納可能なメモリを出力画像の描画領域として確保できた例を説明する。なお、この実施形態では簡潔に説明するために、拡大画像を3つに分割しているが、本発明はこれによって限定されるものではなく、実際は実行環境のメモリの状態によって出力画像の描画領域と分割数を定めれば良い。 As described above, since the number of pixels of the enlarged image is large, memory shortage is likely to occur. Therefore, in the example shown in FIG. 14, the image data after being divided into three parts is retained or transmitted to an external device (for example, a printer). That is, here, an example will be described in which a memory that can be stored if the capacity is 1/3 of the capacity of the image data after the enlargement processing can be secured as the drawing area of the output image. In this embodiment, the enlarged image is divided into three for a brief explanation, but the present invention is not limited thereto, and in reality, the drawing area of the output image depends on the state of the memory of the execution environment. The number of divisions should be determined.

次に、分割拡大の一例としてのバンドレンダリングの処理についてフローチャートを参照して説明する。 Next, the band rendering process as an example of division and enlargement will be described with reference to the flowchart.

図15はバンドレンダリング処理の詳細を示す図である。なお、図15において、S1501〜S1506、S1508はCPU100がスクリプト層217のプログラムを実行する処理であり、S1507はCPU100がネイティブ層218のプログラムを実行する処理である。 FIG. 15 is a diagram showing details of the band rendering process. In FIG. 15, S1501 to S1506 and S1508 are processes in which the CPU 100 executes the program of the script layer 217, and S1507 is a process in which the CPU 100 executes the program of the native layer 218.

まず、S1501では分割数を算出する。分割数は以下の式に従って決定する。即ち、
分割数 =He[pixel]/Hp[pixel]
である。ただし、小数点以下は切り上げる。ここで、HpはS1004で算出された出力画像領域の高さである。
First, in S1501, the number of divisions is calculated. The number of divisions is determined according to the following formula. That is,
Number of divisions = He [pixel] / Hp [pixel]
Is. However, the numbers after the decimal point are rounded up. Here, Hp is the height of the output image area calculated in S1004.

S1502では拡大率を決定する。 In S1502, the enlargement ratio is determined.

拡大率はUI表示されたCanvasのサイズ(画像1401、1405)に対する画像1406の比であり、以下のようになる。即ち、
ScaleW(横倍率)=We/Wb
ScaleH(縦倍率)=He/Hb
である。
The enlargement ratio is the ratio of the image 1406 to the size of the Canvas displayed on the UI (images 1401 and 1405), and is as follows. That is,
ScaleW (horizontal magnification) = We / Wb
ScaleH (vertical magnification) = He / Hb
Is.

S1503では、変数iに“0”を代入し、分割数だけループ処理を実行する。 In S1503, "0" is assigned to the variable i, and loop processing is executed for the number of divisions.

次に、S1504では、画像1401に含まれるスタンプ1402、1404と写真画像1403の移動量を設定する。その移動は上方への平行移動であり、その移動距離はHbp×iである。ここで、初回はi=0のため、移動は行われない。移動の詳細な説明は後述する。 Next, in S1504, the movement amounts of the stamps 1402 and 1404 and the photographic image 1403 included in the image 1401 are set. The movement is an upward parallel movement, and the movement distance is Hbp × i. Here, since i = 0 at the first time, no movement is performed. A detailed description of the movement will be described later.

S1505では拡大率を設定する。この実施形態での拡大率の設定は、Canvasのscale( )メソッドを使用し、次のように設定する。 In S1505, the enlargement ratio is set. The enlargement ratio in this embodiment is set as follows by using the scale () method of Cambas.

scale(ScaleW,ScaleH);
そして、S1506で出力画像の描画領域の出力を行う。
scale (ScaleW, ScaleH);
Then, in S1506, the drawing area of the output image is output.

この実施形態ではCanvasのdrawImage( )メソッドにより、出力画像の描画領域へ画像データを出力する。その際、画像1406の全体は出力画像の描画領域1407には入りきらない。そのため、drawImage( )は画像1406の上端から出力画像の描画領域へ画像データを出力していき、出力画像の描画領域の下端へ到ると出力を終了する。よって、出力画像の描画領域へは画像1406の点線部から上部を切り出したような画像が描画領域1407に出力される。 In this embodiment, the image data is output to the drawing area of the output image by the drawImage () method of Cambas. At that time, the entire image 1406 does not fit in the drawing area 1407 of the output image. Therefore, the drawImage () outputs the image data from the upper end of the image 1406 to the drawing area of the output image, and ends the output when the lower end of the drawing area of the output image is reached. Therefore, in the drawing area of the output image, an image in which the upper part is cut out from the dotted line portion of the image 1406 is output to the drawing area 1407.

S1507で、出力画像の描画領域の画像データをファイルへ出力する。この場合、スクリプト層217はネイティブ層218を介してファイルへ出力する。この出力形態は、この実施形態ではRGBビットマップ形式とする。そのファイルの保存場所は2次記憶装置103なので、容量に関してメモリ(RAM102)への直接的な影響がない。そのため、メモリ(RAM)の不足に関する問題は生じない。 In S1507, the image data in the drawing area of the output image is output to a file. In this case, the script layer 217 outputs to a file via the native layer 218. This output form is an RGB bitmap format in this embodiment. Since the storage location of the file is the secondary storage device 103, there is no direct influence on the memory (RAM 102) in terms of capacity. Therefore, there is no problem with insufficient memory (RAM).

ここではバインディング機能によりスクリプト層からネイティブ層の関数を呼び出す。この際、保存する画像データの縦、横の画素数も引数として渡す。ネイティブ層は渡された縦×横の画素数分の画像データをファイルに保存する。前述のようにスクリプト層では文字列で数値を保持しているため、ネイティブ層にてバイナリデータに変換してからファイルへ保存を行う。 Here, the binding function calls the native layer function from the script layer. At this time, the number of vertical and horizontal pixels of the image data to be saved is also passed as an argument. The native layer saves the image data for the number of passed vertical and horizontal pixels in a file. As mentioned above, since the script layer holds the numerical value as a character string, it is converted to binary data in the native layer and then saved in a file.

なお、以上の例では2次記憶装置103へファイルとして画像データを保存したが、本発明はこれによって限定されるものではない。例えば、メモリカードや外部の記憶装置、サーバ、インターネットを介したクラウドシステムへ保存しても良い。加えて、OSの制約でスクリプト層217ではメモリに大きな容量を確保することはできないが、ネイティブ層218では大きな容量のメモリを扱えることがある。その際は、ネイティブ層218で管理するメモリ(RAM)に分割拡大した画像データを保持しても良い。 In the above example, the image data is stored as a file in the secondary storage device 103, but the present invention is not limited thereto. For example, it may be saved in a memory card, an external storage device, a server, or a cloud system via the Internet. In addition, due to OS restrictions, the script layer 217 cannot secure a large amount of memory, but the native layer 218 may be able to handle a large amount of memory. In that case, the divided and enlarged image data may be held in the memory (RAM) managed by the native layer 218.

S1508では分割数分の処理を終えたかどうかを調べる。ここで、分割数分の処理を全て終えていないと判断された場合、iの値を“+1”インクリメントして処理はS1504へ戻り、全て終えている場合はバンドレンダリングの処理を終了する。 In S1508, it is checked whether or not the processing for the number of divisions is completed. Here, if it is determined that all the processing for the number of divisions has not been completed, the value of i is incremented by "+1" and the processing returns to S1504. If all the processing is completed, the band rendering processing is terminated.

次に、3分割での出力中央部の拡大について説明する。ここは、2回目のループ処理(i=1)にあたる。 Next, the expansion of the output center portion in the three divisions will be described. This corresponds to the second loop processing (i = 1).

S1504では、画像1401に含まれるスタンプ1402、1404と写真画像1403の移動量を設定する。その移動は上方への平行移動であり、その移動距離はHbp×iである。ここでは移動にCanvasのtranslate( )メソッドを用いる。ここで、Hbpは、画像1401を3分割したときの高さである。以下の式で表す事ができる。即ち、
Hbp=Hp×Hb/He
である。
In S1504, the movement amounts of the stamps 1402 and 1404 and the photographic image 1403 included in the image 1401 are set. The movement is an upward parallel movement, and the movement distance is Hbp × i. Here, the Translate () method of Canvas is used for movement. Here, Hbp is the height when the image 1401 is divided into three parts. It can be expressed by the following formula. That is,
Hbp = Hp × Hb / He
Is.

こうして平行移動の設定を行った際の仮想図が図14の1408である。その太線枠はCanvasで出力される範囲であり、この太線枠の外は出力(又は描画)されない。ここでは、図14の1408に示すように、画像1401を上方にHbpだけ平行移動する設定を行う。 The virtual diagram when the parallel movement is set in this way is 1408 in FIG. The thick line frame is the range output by Cambas, and the outside of the thick line frame is not output (or drawn). Here, as shown in 1408 of FIG. 14, the image 1401 is set to be translated upward by Hbp.

そして、上述した上部の拡大と同様に、S1505ではCanvasのscale( )メソッドで拡大率を設定する。拡大の倍率は前述した上部と同じである。図14の1409はその拡大率で拡大した際の仮想図である。図14の1408のように上方にスライドし、scale( )メソッドで拡大設定した事により、拡大後の画像がHpだけ上へ平行移動している。なお、移動、拡大の順で設定を行ったが、拡大、移動の順であっても構わない。その際の移動量は、拡大後の画像に合わせた値(この例ではHp)とする。 Then, similarly to the enlargement of the upper part described above, in S1505, the enlargement ratio is set by the scale () method of Canvas. The magnification of enlargement is the same as the above-mentioned upper part. 1409 in FIG. 14 is a virtual diagram when enlarged at the enlargement ratio. By sliding upward as shown in 1408 in FIG. 14 and setting the enlargement with the scale () method, the enlarged image is translated upward by Hp. The settings were made in the order of movement and enlargement, but the order of enlargement and movement may be used. The amount of movement at that time is a value (Hp in this example) that matches the enlarged image.

続いて、S1506では上記と同様にCanvasのdrawImage( )メソッドにより、出力画像の描画領域へ画像データを出力する。図14の1406〜1407を参照して上述したように、図14の1409の太線枠の点線部より上部のみが出力画像の描画領域へ出力される。その出力の結果は図14の1410として示されており、これが3分割の中央部となる。 Subsequently, in S1506, the image data is output to the drawing area of the output image by the drawImage () method of Canvas in the same manner as described above. As described above with reference to 1406 to 1407 of FIG. 14, only the portion above the dotted line portion of the thick line frame of 1409 of FIG. 14 is output to the drawing area of the output image. The result of the output is shown as 1410 in FIG. 14, which is the central portion of the three divisions.

上部と同様に、出力結果はネイティブ層へ送られ、S1707ではファイルへ出力される。 Similar to the upper part, the output result is sent to the native layer, and in S1707, it is output to a file.

最後に、3分割での出力の下部の拡大について説明する。ここはループ処理の3回目(i=2)にあたる。 Finally, the expansion of the lower part of the output in three divisions will be described. This corresponds to the third loop processing (i = 2).

S1504では、上記の中央部と同様、translate( )メソッドを用いて元のCanvasの画像1401を上方へ平行移動する設定を行う。平行移動の距離はHbp×2である。その移動量がHbp×2である理由は、上部での出力で元画像のHbpの高さ相当の画像が、中央部の出力で元画像のHbpの高さ相当の画像が、それぞれ拡大されて出力済みであるためである。この平行移動の様子を仮想的に表したのが図14の1411である。 In S1504, as in the case of the central portion described above, the translate () method is used to set the original Canvas image 1401 to be translated upward. The distance of parallel movement is Hbp × 2. The reason why the movement amount is Hbp × 2 is that the image corresponding to the height of Hbp of the original image is enlarged in the output at the upper part, and the image corresponding to the height of Hbp of the original image is enlarged in the output at the center. This is because it has already been output. 1411 of FIG. 14 is a virtual representation of this parallel movement.

続いて、S1505では上記の中央部と同様、scale( )メソッドを用いて拡大設定を行う。その拡大の様子を仮想的に表したのが図14の1412である。 Subsequently, in S1505, the enlargement setting is performed using the scale () method as in the central portion described above. 1412 of FIG. 14 shows the state of the expansion virtually.

続いて、S1506では上記の中央部と同様、CanvasのdrawImage( )メソッドにより、出力画像の描画領域へ画像データを出力する。上述と同様に、図14の1412の太線枠の点線部より上方のみが出力画像の描画領域へ出力される。出力の結果は、図14の1413であり、3分割の下部となる。上部、中央部と同様にS1507でこれをファイルに出力する。 Subsequently, in S1506, the image data is output to the drawing area of the output image by the drawImage () method of Canvas, as in the central portion described above. Similar to the above, only the part above the dotted line portion of the thick line frame of 1412 in FIG. 14 is output to the drawing area of the output image. The result of the output is 1413 in FIG. 14, which is the lower part of the three divisions. Output this to a file with S1507 in the same way as the upper part and the central part.

ここではちょうど3分割したときの例を示したが、その他の場合にも対応可能である。例えば、分割した最下部の画像が、出力画像の描画領域の高さ(Hp)に満たない、つまりちょうど分割できず余りがでる場合がある。その際も上記と同様に平行移動と拡大、出力を行う。この時、最下部が出力された出力画像の描画領域の下の方は画像がない状態となる。この出力結果をネイティブ層218でファイルに保存するとき、この画像がない領域を省いて保存する。 Here, an example of just dividing into three is shown, but other cases can also be dealt with. For example, the divided bottom image may be less than the height (Hp) of the drawing area of the output image, that is, it may not be divided and a remainder may appear. At that time, parallel movement, enlargement, and output are performed in the same manner as described above. At this time, there is no image in the lower part of the drawing area of the output image in which the lowermost part is output. When this output result is saved in a file in the native layer 218, the area where this image does not exist is omitted and saved.

S1007で、CPU100は、インジケータの停止をOS層219へ依頼する。S1008で、CPU100は、インジケータを停止して、ディスプレイ104の表示から消去する。 In S1007, the CPU 100 requests the OS layer 219 to stop the indicator. In S1008, the CPU 100 stops the indicator and erases it from the display 104.

<プリントの詳細>
図3のS28ではレンダリングした後の画像データを用いてプリント処理を実行する。ここでは、図3のS28のプリントの詳細について、図11を用いて説明する。なお、図11のS1101〜S1103は、CPU100がネイティブ層218のプログラムを用いて実行し、S1104はプリンタ側で実行される処理である。
<Print details>
In S28 of FIG. 3, the print process is executed using the image data after rendering. Here, the details of the print of S28 of FIG. 3 will be described with reference to FIG. Note that S1101 to S1103 of FIG. 11 are processes executed by the CPU 100 using the program of the native layer 218, and S1104 is a process executed on the printer side.

S1101で、CPU100は、図10のS1006のバンドレンダリングにより分割拡大し、ファイルとして保存した各バンドのRGB画像をプリンタ112で利用可能な形式に変換する。プリンタが利用可能な形式は、RGBやJPEG、CMYKに加え、PDF等のプリンタベンダーの独自フォーマット等もある。ここではそれらのうち、どのような形式であっても構わない。 In S1101, the CPU 100 divides and enlarges the image by the band rendering of S1006 in FIG. 10, and converts the RGB image of each band saved as a file into a format that can be used by the printer 112. The formats that can be used by the printer include RGB, JPEG, and CMYK, as well as the original formats of printer vendors such as PDF. Any form of them may be used here.

S1102で、CPU100は、前記設定情報とS1101で変換された画像データを基に、プリンタ112へ送信するコマンドを生成する。そのコマンドには画像フォーマット、個々の画像の画素数(図14のWe,Hp)、画像データを含む。プリンタ112へ送る先頭のコマンドには画像全体の画素数(図14のWe,He)を含む。S1103で、CPU100は、プリンタの利用できる通信プロトコルに則り、S1102で生成した複数のバンドのコマンドを、ユーザにより選択されたプリンタ112に対し順次送信する。以上の処理により、複数のバンドのコマンド(複数の画像データ)を用いた出力処理が実現される。 In S1102, the CPU 100 generates a command to be transmitted to the printer 112 based on the setting information and the image data converted in S1101. The command includes an image format, the number of pixels of each image (We, Hp in FIG. 14), and image data. The first command sent to the printer 112 includes the number of pixels of the entire image (We, He in FIG. 14). In S1103, the CPU 100 sequentially transmits commands of a plurality of bands generated in S1102 to the printer 112 selected by the user according to the communication protocol that can be used by the printer. By the above processing, output processing using commands of a plurality of bands (a plurality of image data) is realized.

プリンタ112は、コマンドとして送られる画像をプリンタ112内のメモリに蓄積する。プリンタ112は全ての画像が揃うまで待機する。全ての画像が揃うと、プリンタ112はそれらの画像を結合し、出力する1枚の画像にする。なお、各バンドのRGB画像のファイルを用いて1つの画像データを生成した後、その画像データをプリンタで利用可能な形式に変換しても良い。ただし、ネイティブ層でその処理を行うだけのメモリを使用可能な場合に限る。 The printer 112 stores the image sent as a command in the memory in the printer 112. The printer 112 waits until all the images are prepared. When all the images are aligned, the printer 112 combines the images into a single image for output. After generating one image data using the RGB image file of each band, the image data may be converted into a format that can be used by the printer. However, only when the memory that can perform the processing in the native layer is available.

S1104で、プリンタ112は、上記結合した画像の印刷を実行する。 In S1104, the printer 112 prints the combined image.

なお、上記の例ではプリンタ112は全ての画像が揃うまでプリント動作を待機したが、逐次、分割された画像を受信する毎に印刷しても良い。印刷しながらコマンドとして送られる次の画像データを受信することにより、印刷終了までの時間を短縮することができる。また、上記の例では分割拡大した画像を一旦ファイルとして保存したが、保存せず外部デバイス(プリンタなど)へ逐次送信しても良い。こうすることで印刷終了までの時間短縮をしたり2次記憶装置へアクセスする事なく印刷することが可能になる。 In the above example, the printer 112 waits for the printing operation until all the images are aligned, but the printer 112 may print each time it receives the divided images. By receiving the next image data sent as a command while printing, the time until the end of printing can be shortened. Further, in the above example, the divided and enlarged image is temporarily saved as a file, but it may be sequentially transmitted to an external device (printer or the like) without saving. By doing so, it becomes possible to shorten the time until the end of printing and to print without accessing the secondary storage device.

従って以上説明した実施形態によれば、ハイブリッドアプリケーションにおいてスクリプト層ではメモリ不足が生じ、画像データの拡大処理が行えない環境においても、画像データの分割処理により拡大可能をとすることができる。これにより、高品位な画像をプリントすることができる。 Therefore, according to the embodiment described above, even in an environment in which a memory shortage occurs in the script layer in the hybrid application and the image data cannot be enlarged, the image data can be enlarged by the image data division process. This makes it possible to print a high-quality image.

[実施形態2]
ここでは、分割拡大(バンドレンダリング)を全てネイティブ層で行う例について説明する。この実施形態は前述の実施形態1と同じく図3のステップを実現するものであり、実施形態1と処理が重複する部分が多い。そのため、説明を簡潔にするため、実施形態1との重複部分についての説明は省略し、ここでは、この実施形態に特徴的な部分のみを説明する。
[Embodiment 2]
Here, an example in which division enlargement (band rendering) is performed entirely in the native layer will be described. This embodiment realizes the step of FIG. 3 as in the above-described first embodiment, and there are many parts where the processing overlaps with that of the first embodiment. Therefore, for the sake of brevity, the description of the overlapping portion with the first embodiment will be omitted, and only the portion characteristic of this embodiment will be described here.

この実施形態の特徴的な部分は、図3におけるS27のレンダリングのみである。実施形態1ではレンダリングの多くをスクリプト層217とスクリプト層217から依頼されたOS層219において処理したが、この実施形態では、レンダリングをネイティブ層218が担う構成とし、高速な処理を実現している。 The only characteristic part of this embodiment is the rendering of S27 in FIG. In the first embodiment, most of the rendering is processed by the script layer 217 and the OS layer 219 requested by the script layer 217, but in this embodiment, the rendering is handled by the native layer 218, and high-speed processing is realized. ..

図16は実施形態2に従うレンダリング処理を示すフローチャートである。なお、図16において、実施形態1において図10で説明したのと同じステップには同じステップ参照番号を付し、その説明は省略する。図16において、S1001、S1003、S1004AはCPU100がスクリプト層217のプログラムを実行する処理であり、S1002とS1008はCPU100がOS層219で実行する処理である。また、S1005A、S1006A、S1006BはCPU100がネイティブ層218のプログラムを実行する処理である。 FIG. 16 is a flowchart showing a rendering process according to the second embodiment. In FIG. 16, the same steps as described in FIG. 10 in the first embodiment are designated by the same step reference numbers, and the description thereof will be omitted. In FIG. 16, S1001, S1003, and S1004A are processes in which the CPU 100 executes the program of the script layer 217, and S1002 and S1008 are processes executed by the CPU 100 in the OS layer 219. Further, S1005A, S1006A, and S1006B are processes in which the CPU 100 executes the program of the native layer 218.

S1001〜S1003の後、S1004ではCPU100はネイティブ層218に対してレンダリング依頼を行う。この際、スタンプなどベクターデータで画像を保持しているオブジェクトについてはスクリプト層217で拡大処理を行い、描画される。描画されたスタンプなどの画像データはBASE64形式でネイティブ層218へ渡され、ネイティブ層218でこれらはバイナリデータに変換される。この際、スタンプの描画は一つずつ実行されてネイティブ層218へ渡され、ネイティブ層218でこれをバイナリデータに変換し、その後に次のスタンプの描画へ移る。このようにして、文字列データとして保持する画像を1つだけにすることができる。 After S1001 to S1003, in S1004, the CPU 100 requests the native layer 218 for rendering. At this time, the object that holds the image in vector data such as a stamp is enlarged by the script layer 217 and drawn. Image data such as the drawn stamp is passed to the native layer 218 in the BASE64 format, and these are converted into binary data in the native layer 218. At this time, the drawing of the stamps is executed one by one and passed to the native layer 218, which converts this into binary data, and then moves on to the drawing of the next stamp. In this way, only one image can be retained as character string data.

上述のように画像データを文字列データで保持すると、バイナリデータと比べて、多くのメモリ容量を必要とする。そのため、以上のような処理によって使用メモリ容量を削減することができる。なお、ネイティブ層218は受け取った画像データを一旦、2次記憶装置へファイルとして保存し、使用するときにそのファイルをオープンして使用するなどしても良い。こうすることで一時的に使用するメモリ容量を削減できる。 Holding image data as character string data as described above requires a large amount of memory capacity as compared with binary data. Therefore, the memory capacity used can be reduced by the above processing. The native layer 218 may temporarily store the received image data as a file in the secondary storage device, and open the file when using the file. By doing so, the amount of memory used temporarily can be reduced.

また、ここではスクリプト層217からネイティブ層218へ各オブジェクト(写真画像やスタンプなど)の位置情報を送る。位置情報は各オブジェクトの相対的な位置とサイズ、前面背面の順序であり、UI表示されてる配置と同様のものである。その位置情報はネイティブ層218で解釈され、各オブジェクトの拡大後の位置とサイズが決定される。 Further, here, the position information of each object (photograph image, stamp, etc.) is sent from the script layer 217 to the native layer 218. The position information is the relative position and size of each object, and the order of front and back, which is similar to the arrangement displayed in the UI. The position information is interpreted by the native layer 218 to determine the expanded position and size of each object.

S1005Aでは出力画像の描画領域の容量を算出する。これは基本的に図10のS1004と同様の処理であるが、ここでは次の制約を設ける。 In S1005A, the capacity of the drawing area of the output image is calculated. This is basically the same process as S1004 in FIG. 10, but the following restrictions are provided here.

外部デバイスであるプリンタ112から受信したプリンタ情報には、実施形態1で説明したように、前述したXMLの5行目に<memory receive= 7680000 />という記載がある。これは、プリンタ112が一度に受信可能な最大データ量は7680000[Byte](=7,68[MB])であることを示す。従って、出力画像の描画領域の容量は、この数値以下にする必要がある。実際には、画像データ前後にヘッダやフッタを付加してプリンタ112へ送信するため、画像領域としてはその分少ない容量となる。なお、受信可能な最大データ量に限らず、プリンタがRGBに展開して保持可能な画像のサイズをプリンタから取得し、後述の描画領域の容量を決定しても良い。 As described in the first embodiment, the printer information received from the printer 112, which is an external device, has the description <memory receive = 7680000 /> on the fifth line of the above-mentioned XML. This indicates that the maximum amount of data that the printer 112 can receive at one time is 7680000 [Byte] (= 7,68 [MB]). Therefore, the capacity of the drawing area of the output image needs to be less than or equal to this value. In reality, since headers and footers are added before and after the image data and transmitted to the printer 112, the capacity of the image area is reduced accordingly. Not limited to the maximum amount of data that can be received, the size of the image that can be expanded and held by the printer in RGB may be acquired from the printer, and the capacity of the drawing area described later may be determined.

S1006Aでは、出力画像の描画領域を確保する。その描画領域はネイティブ層218が管理するメモリ領域にS1005Aで算出された容量だけ確保する。S1006Bではバンドレンダリングを実行する。その詳細は後述する。 In S1006A, a drawing area of the output image is secured. As the drawing area, only the capacity calculated by S1005A is secured in the memory area managed by the native layer 218. Band rendering is executed in S1006B. The details will be described later.

その後の処理は、図10を参照して実施形態1で説明した通りである。 Subsequent processing is as described in the first embodiment with reference to FIG.

図17は実施形態2に従うバンドレンダリング処理の詳細を示すフローチャートである。このバンドレンダリングはネイティブ層218で実行され、図17を図15と比較すると分かるように、実施形態1ではスクリプト層217で実行したのと同様な処理が実施形態2ではネイティブ層218で実行されている。従って、ここでは、実施形態2に特徴的な部分のみ説明する。 FIG. 17 is a flowchart showing details of the band rendering process according to the second embodiment. This band rendering is performed in the native layer 218, and as can be seen by comparing FIG. 17 with FIG. 15, the same processing performed in the script layer 217 in the first embodiment is executed in the native layer 218 in the second embodiment. There is. Therefore, here, only the part characteristic of the second embodiment will be described.

S1701ではS1501と同様、分割数を算出する。この分割数は出力画像の描画領域のサイズによって定められる。そのサイズは外部デバイスであるプリンタ112から受信したプリンタ情報に含まれる値に基づいて決定しているため、分割数も外部デバイスから受信した(又は、指定された/指示された)値に基づいて定めていると言える。 In S1701, the number of divisions is calculated in the same manner as in S1501. The number of divisions is determined by the size of the drawing area of the output image. Since the size is determined based on the value contained in the printer information received from the printer 112 which is an external device, the number of divisions is also based on the value received (or specified / instructed) from the external device. It can be said that it has been decided.

S1702では拡大率と各画像位置を決定する。ここではファイルから開いた写真画像のサイズを外部デバイスへの入力のサイズへ変換する率を算出する。その算出には上述した位置情報を用いる。尚、拡大率と表現しているが、倍率が1を下回り、縮小になる場合もある。位置は、分割拡大後の位置を変数iと上記位置情報により求める。写真画像以外のスタンプの画像データの配置も前記位置情報から算出する。スタンプ画像はスクリプト層217で拡大処理がなされるので、ネイティブ層218で拡大する必要はない。 In S1702, the enlargement ratio and each image position are determined. Here, the rate of converting the size of the photographic image opened from the file to the size of the input to the external device is calculated. The above-mentioned position information is used for the calculation. Although it is expressed as an enlargement ratio, the magnification may be less than 1 and the reduction may occur. As for the position, the position after the division and expansion is obtained from the variable i and the above position information. The arrangement of image data of stamps other than the photographic image is also calculated from the position information. Since the stamp image is enlarged in the script layer 217, it is not necessary to enlarge it in the native layer 218.

S1703はS1503と同様、分割数でのループ処理を開始する。 Similar to S1503, S1703 starts loop processing with the number of divisions.

S1704では、決定した拡大率と位置の情報に基づいて出力画像の描画領域へ画像データを拡大しながら展開配置し、前面背面の順序に従って合成する。この際、スタンプも同様に配置、合成されるが拡大の必要はない。 In S1704, the image data is expanded and arranged in the drawing area of the output image while being enlarged based on the determined enlargement ratio and position information, and the images are combined according to the order of the front and back surfaces. At this time, the stamps are arranged and combined in the same manner, but there is no need to enlarge them.

S1705では、出力画像の描画領域へ出力された分割拡大画像を随時、外部デバイス(プリンタ112)へ送信する。この際、送信データのヘッダには画像データのサイズを付加する。その送信は外部デバイス通信部221を介し、外部デバイスが対応しているプロトコルに従う。プリンタ112はその分割画像を受け取ると、随時印刷を行う。ネイティブ層218では次の分割画像の送信をする際、プリンタ112へ次の分割画像の受信が可能かどうかの問い合わせを行う。プリンタ112はその問い合わせに応答して次の分割画像を受信可能か否かをネイティブ層に通知する。以上のようにして、随時分割画像の送信、受信、印刷が実行される。 In S1705, the divided and enlarged image output to the drawing area of the output image is transmitted to the external device (printer 112) at any time. At this time, the size of the image data is added to the header of the transmission data. The transmission follows the protocol supported by the external device via the external device communication unit 221. When the printer 112 receives the divided image, it prints at any time. When transmitting the next divided image, the native layer 218 inquires the printer 112 whether or not the next divided image can be received. In response to the inquiry, the printer 112 notifies the native layer whether or not the next divided image can be received. As described above, the divided image is transmitted, received, and printed at any time.

S1706では分割数分のバンドレンダリングが全て終了したかをどうかを調べる。ここで、未終了であれば、処理はS1704へ戻り、全て終了であればバンドレンダリング処理を終了する。 In S1706, it is checked whether or not all the band renderings for the number of divisions are completed. Here, if it is not finished, the process returns to S1704, and if all is finished, the band rendering process is finished.

従って以上説明した実施形態に従えば、外部デバイスが受信可能なデータ量を受信し、その量も考慮して、出力画像の描画領域サイズを算出してこれをメモリに確保するので、メモリ不足を発生させないようしつつ画像データの拡大処理を実行することができる。また、外部デバイスでのメモリオーバフローも防止することが可能となる。 Therefore, according to the above-described embodiment, the amount of data that can be received by the external device is received, the drawing area size of the output image is calculated in consideration of the amount, and this is secured in the memory. It is possible to execute the enlargement processing of the image data while preventing the occurrence. In addition, it is possible to prevent memory overflow in an external device.

また、この実施形態に従えば、ネイティブ層で拡大処理を実行するので、スクリプト層で写真画像を拡大するよりも高速に画像の拡大処理を実行でき、処理時間を短縮することができる。 Further, according to this embodiment, since the enlargement processing is executed in the native layer, the image enlargement processing can be executed at a higher speed than the enlargement processing of the photographic image in the script layer, and the processing time can be shortened.

なお、本願ではネイティブ層にてプリンタ用のコマンドを送信しているが、OS層で送信しても良い。 In this application, the command for the printer is transmitted in the native layer, but it may be transmitted in the OS layer.

[さらに別の実施形態]
また、図1で示した情報処理装置の例は、携帯可能なモバイルコンピュータ(スマートフォンやタブレット端末)を想定したハードウェアとなっているが、本発明はそれに限定されない。例えば、据え置き型のパーソナルコンピュータ、サーバ、ゲーム機、デジタルカメラ等のハードウェア上においても、同様の構成を実現することは可能である。
[Another Embodiment]
Further, the example of the information processing device shown in FIG. 1 is hardware assuming a portable mobile computer (smartphone or tablet terminal), but the present invention is not limited thereto. For example, it is possible to realize the same configuration on hardware such as a stationary personal computer, a server, a game machine, and a digital camera.

加えて、上記の実施形態では外部デバイスとしてプリンタの例を説明したが、本発明はこれに制限されるものではない。例えば、外部デバイスとして、他のスマートフォンやタブレット端末、PCやサーバ、ゲーム機なども対象となる。 In addition, although the example of the printer as an external device has been described in the above embodiment, the present invention is not limited thereto. For example, as an external device, other smartphones, tablet terminals, PCs, servers, game machines, and the like are also targeted.

さらに加えて、上記実施形態では、コンテンツ(写真画像やスタンプ画像)の描画として、JavaScriptのCanvas機能で例に挙げて説明しているが、コンテンツの描画は、これに限定されるものではない。例えば、SVG(Scalable Vector Graphics)を利用して、コンテンツを描画することも可能である。 Furthermore, in the above embodiment, as the drawing of the content (photographic image or stamp image), the drawing of the content is described by giving an example by the Cambas function of Javascript, but the drawing of the content is not limited to this. For example, it is also possible to draw the content by using SVG (Scalable Vector Graphics).

また、以上説明した実施形態では、デバイス内の画像フォルダから画像を1枚選択した例について説明したが、本発明はこれに限定されるものではない。例えば、データの絶対パスを指定する、画像の入っているフォルダごと指定する、デバイスのカメラ機能を利用しその場で画像を撮影するなどにより画像が選択されても良い。また、データの取得先についても、インターネット上の画像を選択する、脱着可能な記憶媒体内の画像を選択する、外部のデバイスと通信で画像を取得する、などが挙げられる。 Further, in the embodiment described above, an example in which one image is selected from the image folder in the device has been described, but the present invention is not limited to this. For example, an image may be selected by specifying an absolute path of data, specifying each folder containing an image, or taking an image on the spot using the camera function of the device. Further, as the data acquisition destination, selection of an image on the Internet, selection of an image in a removable storage medium, acquisition of an image by communication with an external device, and the like can be mentioned.

加えて、上記実施形態のプリンタは、インクジェットプリンタ、レーザープリンタ、昇華型プリンタ、ドットインパクトプリンタ等を利用することができる。これらには、プリンタ機能、スキャナ機能等を有する、単一機能ではない、いわゆる、複合機(マルチファンクションプリンタ)の場合もある。 In addition, as the printer of the above embodiment, an inkjet printer, a laser printer, a sublimation printer, a dot impact printer and the like can be used. These may be so-called multifunction printers, which have a printer function, a scanner function, and the like and are not a single function.

尚、以上の実施形態の機能は以下の構成によっても実現することができる。つまり、本実施形態の処理を行うためのプログラムコードをシステムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)がプログラムコードを実行することによっても達成される。この場合、記憶媒体から読み出されたプログラムコード自体が上述した実施形態の機能を実現することとなり、またそのプログラムコードを記憶した記憶媒体も本実施形態の機能を実現することになる。 The functions of the above embodiments can also be realized by the following configurations. That is, it is also achieved by supplying the program code for performing the processing of the present embodiment to the system or device, and executing the program code by the computer (or CPU or MPU) of the system or device. In this case, the program code itself read from the storage medium realizes the function of the above-described embodiment, and the storage medium storing the program code also realizes the function of the present embodiment.

また、本実施形態の機能を実現するためのプログラムコードを、1つのコンピュータ(CPU、MPU)で実行する場合であってもよいし、複数のコンピュータが協働することによって実行する場合であってもよい。さらに、プログラムコードをコンピュータが実行する場合であってもよいし、プログラムコードの機能を実現するための回路等のハードウェアを設けてもよい。またはプログラムコードの一部をハードウェアで実現し、残りの部分をコンピュータが実行する場合であってもよい。 Further, the program code for realizing the function of the present embodiment may be executed by one computer (CPU, MPU), or may be executed by a plurality of computers collaborating with each other. May be good. Further, the program code may be executed by a computer, or hardware such as a circuit for realizing the function of the program code may be provided. Alternatively, a part of the program code may be implemented by hardware and the rest may be executed by a computer.

201:画像取得部、202:画像読込部、203:データ変換部 201: Image acquisition unit, 202: Image reading unit, 203: Data conversion unit

Claims (31)

プロセッサで翻訳され実行されるための命令セットが記述されている第1のプログラム層と、前記プロセッサ以外で予め翻訳された命令セットが記述されている第2のプログラム層とを含むハイブリッドアプリケーションプログラムを、前記プロセッサで実行する情報処理装置であって、
画像データに対して分割処理と拡大処理を実行する分割拡大手段と、
前記分割拡大手段による分割処理と拡大処理とにより得られた複数の画像データを用いて外部デバイスに対する出力処理を実行する出力手段とを有し、
前記第1のプログラム層の命令セットは、HTML、CSS、JavaScriptのいずれかを含み、
前記第1のプログラム層の前記分割拡大手段は、Web描画言語を用いて画像データの位置情報と画像データのサイズ情報を設定し、前記位置情報および前記サイズ情報に基づいて画像データに対して分割処理と拡大処理を実行することを特徴とする情報処理装置。
A hybrid application program including a first program layer in which an instruction set to be translated and executed by a processor is described, and a second program layer in which an instruction set pre-translated other than the processor is described. , An information processing device executed by the processor.
A division / enlargement means that executes division processing and enlargement processing on image data,
It has an output means for executing an output process for an external device using a plurality of image data obtained by the division process and the enlargement process by the division / enlargement means.
The instruction set of the first program layer includes any of HTML, CSS, and Javascript.
The division / enlargement means of the first program layer sets position information of image data and size information of image data using a Web drawing language, and divides the image data based on the position information and the size information. An information processing device characterized by performing processing and enlargement processing.
前記出力手段は、前記複数の画像データに基づいて1つの拡大画像データを生成し、前記1つの拡大画像データに基づく印刷データを前記外部デバイスに送信することを特徴とする請求項1に記載の情報処理装置。 The first aspect of claim 1, wherein the output means generates one magnified image data based on the plurality of image data, and transmits print data based on the one magnified image data to the external device. Information processing device. 前記出力手段は、前記複数の画像データを順次、前記外部デバイスに送信することを特徴とする請求項1に記載の情報処理装置。 The information processing device according to claim 1, wherein the output means sequentially transmits the plurality of image data to the external device. 前記画像データの描画結果を表示部に表示させる表示手段をさらに有し、
前記表示手段は、前記第1のプログラム層に含まれることを特徴とする請求項1乃至3のいずれか1項に記載の情報処理装置。
Further have a display means Ru is displayed on the display unit the drawing result of the image data,
The display means, the information processing apparatus according to any one of claims 1 to 3, wherein Rukoto included in the first program layer.
前記分割拡大手段により得られた前記複数の画像データがハードディスクまたはフラッシュメモリに記憶されることを特徴とする請求項1乃至4のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 4, wherein the plurality of image data obtained by the division / enlargement means are stored in a hard disk or a flash memory. 前記画像データに付加される付加画像は、前記第1のプログラム層により拡大されることを特徴とする請求項1乃至5のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 5, wherein the additional image added to the image data is enlarged by the first program layer. 前記分割拡大手段は、
前記外部デバイスとしてのプリンタの解像度に基づいて、画像の拡大率を決定する第1の決定手段と、
前記プリンタが備えるメモリの利用可能な容量と前記情報処理装置の記憶手段に確保が可能な容量とに基づいて、前記画像の分割数を決定する第2の決定手段とを含むことを特徴とする請求項1乃至6のいずれか1項に記載の情報処理装置。
The division / enlargement means
A first determining means for determining the magnification of an image based on the resolution of the printer as the external device, and
It is characterized by including a second determining means for determining the number of divisions of the image based on the available capacity of the memory included in the printer and the capacity that can be secured in the storage means of the information processing apparatus. The information processing device according to any one of claims 1 to 6.
前記第1のプログラム層では画像データをテキストデータとして扱い、
前記第2のプログラム層では前記画像データをバイナリデータとして扱うことを特徴とする請求項1乃至7のいずれか1項に記載の情報処理装置。
The first program layer treats image data as text data and treats it as text data.
The information processing apparatus according to any one of claims 1 to 7, wherein the second program layer handles the image data as binary data.
前記画像データに対する描画処理は、Canvas又はScalable Vector Graphics(SVG)を用いることを特徴とする請求項1乃至8のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 8, wherein the drawing process for the image data uses Cambas or Scalable Vector Graphics (SVG). ユーザから前記画像データに対する画像処理の指示を受け付ける受付手段と、
前記受付手段により受け付けた画像処理の指示に従って画像処理を行う画像処理手段とをさらに有し、
前記受付手段は、前記第1のプログラム層に含まれ、
前記画像処理手段は、前記第2のプログラム層に含まれることを特徴とする請求項1乃至9のいずれか1項に記載の情報処理装置。
A receiving means for receiving an image processing instruction for the image data from the user,
Further have a image processing means for performing image processing according to an instruction of image processing is accepted by the accepting means,
The receiving means is included in the first program layer, and is included in the first program layer.
Wherein the image processing means, the information processing apparatus according to any one of claims 1 to 9, wherein Rukoto included in the second program layer.
前記画像処理手段による画像処理によりベクターデータにより表現される画像が元の画像に対して付加されることを特徴とする請求項10に記載の情報処理装置。 The information processing apparatus according to claim 10, wherein an image represented by vector data is added to the original image by image processing by the image processing means. 前記Web描画言語は、HTMLとSVGのいずれかを含むことを特徴とする請求項1乃至11のいずれか1項に記載の情報処理装置。 The information processing device according to any one of claims 1 to 11, wherein the Web drawing language includes either HTML or SVG. ユーザの指示に基づいてインジケータを表示する表示制御手段をさらに有し、
前記分割拡大手段による分割処理と拡大処理とにより得られた特定された分割数分の画像データが生成された後、前記表示制御手段は、前記インジケータを表示画面から消去させることを特徴とする請求項1乃至12のいずれか1項に記載の情報処理装置。
Further having a display control means for displaying an indicator based on a user's instruction,
A claim characterized in that, after the image data for the specified number of divisions obtained by the division processing and the enlargement processing by the division / enlargement means is generated, the display control means erases the indicator from the display screen. Item 2. The information processing apparatus according to any one of Items 1 to 12.
描画領域の第1サイズを特定する第1特定手段と、
拡大後の画像のサイズであり、前記第1サイズより大きい第2サイズを特定する第2特定手段と、
前記第1サイズと前記第2サイズに基づいて分割数を決定する決定手段と、をさらに有し、
前記決定手段により決定された分割数の画像データが得られるまで、前記分割拡大手段による分割処理と拡大処理が実行されることを特徴とする請求項1乃至13のいずれか1項に記載の情報処理装置。
The first specifying means for specifying the first size of the drawing area and
A second specifying means for specifying a second size that is the size of the enlarged image and is larger than the first size, and
Further, it has a determination means for determining the number of divisions based on the first size and the second size.
The information according to any one of claims 1 to 13, wherein the division process and the enlargement process are executed by the division / enlargement means until the image data of the number of divisions determined by the determination means is obtained. Processing equipment.
前記分割拡大手段は、前記画像データの位置情報に基づいて画像データを移動した後、前記サイズ情報に基づいて拡大処理を行うことにより、前記分割処理と前記拡大処理が実行されることを特徴とする請求項14に記載の情報処理装置。 The division / enlargement means is characterized in that the division processing and the enlargement processing are executed by moving the image data based on the position information of the image data and then performing the enlargement processing based on the size information. The information processing apparatus according to claim 14. プロセッサで翻訳され実行されるための命令セットが記述されている第1のプログラム層と、前記プロセッサ以外で予め翻訳された命令セットが記述されている第2のプログラム層とを含むハイブリッドアプリケーションプログラムを、前記プロセッサで実行する情報処理装置の処理方法であって、
前記第1のプログラム層において画像データに対して分割処理と拡大処理を実行し、
前記分割処理と前記拡大処理とにより得られた複数の画像データを用いて外部デバイスに対する出力処理を実行し、
前記第1のプログラム層の命令セットは、HTML、CSS、JavaScriptのいずれかを含み、
Web描画言語を用いて画像データの位置情報と画像データのサイズ情報を設定し、前記位置情報および前記サイズ情報に基づいて画像データに対して前記分割処理と前記拡大処理を実行することを特徴とする処理方法。
A hybrid application program including a first program layer in which an instruction set to be translated and executed by a processor is described, and a second program layer in which an instruction set pre-translated other than the processor is described. , A processing method of an information processing device executed by the processor.
In the first program layer, the image data is divided and enlarged , and the image data is divided and enlarged.
Output processing to an external device is executed using the plurality of image data obtained by the division processing and the enlargement processing.
The instruction set of the first program layer includes any of HTML, CSS, and Javascript.
The feature is that the position information of the image data and the size information of the image data are set by using the Web drawing language, and the division process and the enlargement process are executed on the image data based on the position information and the size information. Processing method to do.
ウェブ標準言語で記述された第1のプログラム層と、ウェブ標準言語とは異なるプログラム言語で記述された第2のプログラム層とを含むハイブリッドプログラムを実行するコンピュータを、画像データに対して分割処理と拡大処理を実行する分割拡大手段と、前記分割拡大手段による分割処理と拡大処理とにより得られた複数の画像データを用いて外部デバイスに対する出力処理を実行する出力手段として機能させ、
前記第1のプログラム層の命令セットは、HTML、CSS、JavaScriptのいずれかを含み、
前記第1のプログラム層の前記分割拡大手段は、Web描画言語を用いて画像データの位置情報と画像データのサイズ情報を設定し、前記位置情報および前記サイズ情報に基づいて画像データに対して前記分割処理と前記拡大処理を実行することを特徴とする前記コンピュータが読み取り可能なプログラム。
A computer that executes a hybrid program including a first program layer written in a web standard language and a second program layer written in a programming language different from the web standard language is divided into image data. It functions as an output means for executing an output process to an external device using the division / enlargement means for executing the enlargement processing and the plurality of image data obtained by the division processing and the enlargement processing by the division / enlargement means.
The instruction set of the first program layer includes any of HTML, CSS, and Javascript.
The division / enlargement means of the first program layer sets position information of image data and size information of image data using a Web drawing language, and the image data is described based on the position information and the size information. A computer-readable program comprising performing a division process and an enlargement process.
前記出力手段は、前記複数の画像データに基づいて1つの拡大画像データを生成し、前記1つの拡大画像データに基づく印刷データを前記外部デバイスに送信することを特徴とする請求項17に記載のプログラム。 17. The output means according to claim 17, wherein the output means generates one magnified image data based on the plurality of image data, and transmits the print data based on the one magnified image data to the external device. program. 前記出力手段は、前記複数の画像データを順次、前記外部デバイスに送信することを特徴とする請求項17に記載のプログラム。 The program according to claim 17, wherein the output means sequentially transmits the plurality of image data to the external device. 前記画像データの描画結果を表示部に表示させる表示手段として前記コンピュータをさらに機能させ
前記表示手段は、前記第1のプログラム層に含まれることを特徴とする請求項17乃至19のいずれか1項に記載のプログラム。
Further it makes the computer function as display means Ru is displayed on the display unit the drawing result of the image data,
The program according to any one of claims 17 to 19 , wherein the display means is included in the first program layer .
前記分割拡大手段により得られた前記複数の画像データはハードディスクまたはフラッシュメモリに記憶されることを特徴とする請求項17乃至20のいずれか1項に記載のプログラム。 The program according to any one of claims 17 to 20, wherein the plurality of image data obtained by the division / enlargement means is stored in a hard disk or a flash memory. 前記画像データに付加される付加画像は、前記第1のプログラム層により拡大されることを特徴とする請求項17乃至21のいずれか1項に記載のプログラム。 The program according to any one of claims 17 to 21, wherein the additional image added to the image data is enlarged by the first program layer. 前記外部デバイスとしてのプリンタの解像度に基づいて、画像の拡大率を決定する第1の決定手段と、
前記プリンタが備えるメモリの利用可能な容量と前記コンピュータの記憶手段に確保が可能な容量とに基づいて、前記画像の分割数を決定する第2の決定手段として前記コンピュータをさらに機能させることを特徴とする請求項17乃至22のいずれか1項に記載のプログラム。
A first determining means for determining the magnification of an image based on the resolution of the printer as the external device, and
A feature of further functioning the computer as a second determining means for determining the number of divisions of the image based on the available capacity of the memory included in the printer and the capacity that can be secured by the storage means of the computer. The program according to any one of claims 17 to 22.
前記第1のプログラム層では画像データをテキストデータとして扱い、
前記第2のプログラム層では前記画像データをバイナリデータとして扱うことを特徴とする請求項17乃至23のいずれか1項に記載のプログラム。
The first program layer treats image data as text data and treats it as text data.
The program according to any one of claims 17 to 23, wherein the second program layer treats the image data as binary data.
前記画像データに対する描画処理は、Canvas又はScalable Vector Graphics(SVG)を用いることを特徴とする請求項17乃至24のいずれか1項に記載のプログラム。 The program according to any one of claims 17 to 24, wherein the drawing process for the image data uses Canvas or Scalable Vector Graphics (SVG). ユーザから前記画像データに対する画像処理の指示を受け付ける受付手段と、
前記受付手段により受け付けた画像処理の指示に従って画像処理を行う画像処理手段として前記コンピュータをさらに機能させ
前記受付手段は、前記第1のプログラム層に含まれ、
前記画像処理手段は、前記第2のプログラム層に含まれることを特徴とする請求項17乃至25のいずれか1項に記載のプログラム。
A receiving means for receiving an image processing instruction for the image data from the user,
The computer is further made to function as an image processing means that performs image processing according to the image processing instruction received by the receiving means .
The receiving means is included in the first program layer, and is included in the first program layer.
Wherein the image processing means, the program according to any one of claims 17 to 25, characterized in Rukoto included in the second program layer.
前記画像処理手段による画像処理によりベクターデータにより表現される画像が元の画像に対して付加されることを特徴とする請求項26に記載のプログラム。 The program according to claim 26, wherein an image represented by vector data is added to the original image by image processing by the image processing means. 前記Web描画言語は、HTMLとSVGのいずれかを含むことを特徴とする請求項17乃至27のいずれか1項に記載のプログラム。 The program according to any one of claims 17 to 27, wherein the Web drawing language includes either HTML or SVG. 前記コンピュータをさらにユーザの指示に基づいてインジケータを表示する表示制御手段として機能させ、
前記分割拡大手段による分割処理と拡大処理とにより得られた特定された分割数分の画像データが生成された後、前記表示制御手段は、前記インジケータを表示画面から消去させることを特徴とする請求項17乃至28のいずれか1項に記載のプログラム。
The computer is further made to function as a display control means for displaying an indicator based on a user's instruction.
After the image data for the specified number of divisions obtained by the division processing and the enlargement processing by the division / enlargement means is generated, the display control means causes the indicator to be erased from the display screen. Item 10. The program according to any one of Items 17 to 28.
前記コンピュータをさらに、
描画領域の第1サイズを特定する第1特定手段と、
拡大後の画像のサイズであり、前記第1サイズより大きい第2サイズを特定する第2特定手段と、
前記第1サイズと前記第2サイズに基づいて分割数を決定する決定手段と、して機能させ、
前記決定手段により決定された分割数の画像データが得られるまで、前記分割拡大手段による分割処理と拡大処理が実行されることを特徴とする請求項17乃至29のいずれか1項に記載のプログラム。
The computer further
The first specifying means for specifying the first size of the drawing area and
A second specifying means for specifying a second size that is the size of the enlarged image and is larger than the first size, and
It functions as a determining means for determining the number of divisions based on the first size and the second size.
The program according to any one of claims 17 to 29, wherein the division process and the enlargement process are executed by the division / enlargement means until the image data of the number of divisions determined by the determination means is obtained. ..
前記分割拡大手段は、前記画像データの位置情報に基づいて画像データを移動した後、前記サイズ情報に基づいて拡大処理を行うことにより、前記分割処理と前記拡大処理が実行されることを特徴とする請求項30に記載のプログラム。 The division / enlargement means is characterized in that the division processing and the enlargement processing are executed by moving the image data based on the position information of the image data and then performing the enlargement processing based on the size information. 30. The program according to claim 30.
JP2018126338A 2018-07-02 2018-07-02 Information processing equipment, processing methods, and programs Active JP6757368B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018126338A JP6757368B2 (en) 2018-07-02 2018-07-02 Information processing equipment, processing methods, and programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018126338A JP6757368B2 (en) 2018-07-02 2018-07-02 Information processing equipment, processing methods, and programs

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014135179A Division JP6463914B2 (en) 2014-06-30 2014-06-30 Information processing apparatus, processing method, and program

Publications (2)

Publication Number Publication Date
JP2018186537A JP2018186537A (en) 2018-11-22
JP6757368B2 true JP6757368B2 (en) 2020-09-16

Family

ID=64355170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018126338A Active JP6757368B2 (en) 2018-07-02 2018-07-02 Information processing equipment, processing methods, and programs

Country Status (1)

Country Link
JP (1) JP6757368B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007058783A (en) * 2005-08-26 2007-03-08 Canon Inc Information processing apparatus and information processing method
JP4222401B2 (en) * 2006-09-29 2009-02-12 ブラザー工業株式会社 Rasterizing apparatus, program and method
JP4717915B2 (en) * 2008-09-29 2011-07-06 キヤノン株式会社 Broadcast receiving apparatus and method for controlling broadcast receiving apparatus
JP2011107378A (en) * 2009-11-17 2011-06-02 Canon Inc Apparatus and method for processing information
JP2012108825A (en) * 2010-11-19 2012-06-07 Canon Inc Information processing device, information processing method and program
JP5673177B2 (en) * 2011-02-10 2015-02-18 セイコーエプソン株式会社 Network system, network system printing control method, and client terminal
JP5857443B2 (en) * 2011-05-12 2016-02-10 ソニー株式会社 Content sharing system

Also Published As

Publication number Publication date
JP2018186537A (en) 2018-11-22

Similar Documents

Publication Publication Date Title
US10296267B2 (en) Information processing apparatus, information processing method, and storage medium
JP6463914B2 (en) Information processing apparatus, processing method, and program
US9471284B2 (en) Apparatus, method, and non-transitory computer-readable storage medium
JP5901704B2 (en) Information processing apparatus, information processing method, and program
JP6363888B2 (en) Information processing apparatus and program
JP6478487B2 (en) Information processing apparatus, information processing method, and program
US10075620B2 (en) Information processing apparatus, control method for information processing apparatus, and non-transitory computer-readable storage medium
JP6381319B2 (en) Information processing apparatus, processing method, and program
JP6138088B2 (en) Information processing apparatus, control method, and software program
US9465571B2 (en) Apparatus, method, and non-transitory computer-readable storage medium
JP6360370B2 (en) Information processing apparatus, information processing method, and program
US10228890B2 (en) Apparatus, method, and non-transitory computer-readable storage medium
US10013221B2 (en) Information processing apparatus that generates print data using an application with two program layers, method of controlling the same, and non-transitory computer-readable medium
JP6786342B2 (en) Information processing equipment, information processing methods and programs
JP6757368B2 (en) Information processing equipment, processing methods, and programs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180702

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190829

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190906

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191105

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200327

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200526

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200828

R151 Written notification of patent or utility model registration

Ref document number: 6757368

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151