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

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

Info

Publication number
JP6051652B2
JP6051652B2 JP2012163650A JP2012163650A JP6051652B2 JP 6051652 B2 JP6051652 B2 JP 6051652B2 JP 2012163650 A JP2012163650 A JP 2012163650A JP 2012163650 A JP2012163650 A JP 2012163650A JP 6051652 B2 JP6051652 B2 JP 6051652B2
Authority
JP
Japan
Prior art keywords
image
layout
image data
area
print
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
JP2012163650A
Other languages
Japanese (ja)
Other versions
JP2014027335A (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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2012163650A priority Critical patent/JP6051652B2/en
Publication of JP2014027335A publication Critical patent/JP2014027335A/en
Application granted granted Critical
Publication of JP6051652B2 publication Critical patent/JP6051652B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Editing Of Facsimile Originals (AREA)

Description

本発明は、画像処理装置、画像処理プログラム、および画像処理方法に関する。   The present invention relates to an image processing apparatus, an image processing program, and an image processing method.

特許文献1には、表データに基づく表を用紙に印刷する表出力装置において、表が用紙の印刷領域より大きく当該印刷領域からはみ出してしまう場合に、用紙に印刷の余地があれば、はみ出しの起こる箇所まで印刷が進むと自動的に折り返し、はみ出し以降の内容の印刷を続けて行い、当該余地がなければ、はみ出し以降の内容を別の用紙に印刷する技術が開示されている。特許文献1の表出力装置によれば、状況に応じて折り返し印刷を行うことによって用紙の無駄を抑制できる。   In Patent Document 1, in a table output device that prints a table based on table data on a sheet, if the table is larger than the print area of the sheet and protrudes from the print area, if there is room for printing on the sheet, A technique is disclosed that automatically wraps when printing progresses to a place where it occurs, continuously prints the contents after the protrusion, and prints the contents after the protrusion on another sheet if there is no room for the above. According to the front output device of Patent Document 1, it is possible to suppress paper waste by performing return printing according to the situation.

特開平9−69089号公報JP-A-9-69089

しかしながら、特許文献1の表出力装置では、表を印刷する際の用紙向きは、ユーザが設定した印刷条件に従い決定される。そのため、用紙向きを変更すれば、印刷対象の用紙を折り返すことなく1枚の用紙に印刷できるにもかかわらず、当該表が折り返して印刷される虞がある。例えば、用紙向きを変更すれば、表が印刷領域からはみ出さずに印刷できるだけの余地(余白)があったとしても、印刷条件に従う用紙向きに対し、表が印刷領域からはみ出すと判断された場合には、折り返し印刷が行われてしまう。かかる場合、無用な折り返しが行われることになるため、印刷のレイアウトとして好ましくない。   However, in the table output device of Patent Document 1, the paper orientation when printing a table is determined according to the printing conditions set by the user. For this reason, if the paper orientation is changed, the table may be folded and printed even though the paper to be printed can be printed on one sheet without being folded. For example, if the paper orientation is changed, even if there is room (margin) that can be printed without the table protruding from the printing area, it is determined that the table will protrude from the printing area with respect to the paper orientation according to the printing conditions. In some cases, return printing is performed. In such a case, unnecessary folding is performed, which is not preferable as a printing layout.

また、用紙向きを変更すれば、印刷対象の表を1枚の用紙に印刷できるにもかかわらず、当該表が異なる用紙に分割されて印刷される虞がある。例えば、用紙向きを変更すれば、折り返し印刷ができるだけの余白があったとしても、印刷条件に従う用紙向きでは当該余地がないと判断された場合には、はみ出し以降の内容が別の用紙に印刷されてしまう。かかる場合、異なる用紙に表が分割されて印刷されるので、印刷のレイアウトとして好ましくない。また、かかる場合、用紙が無駄に使用される。   If the paper orientation is changed, the table to be printed can be printed on one sheet, but the table may be divided and printed on different sheets. For example, if the paper orientation is changed, even if there is enough margin for wrapping printing, if it is determined that there is no room in the paper orientation according to the printing conditions, the content after the overhang is printed on another paper. End up. In such a case, the table is divided and printed on different sheets, which is not preferable as a printing layout. In such a case, the paper is wasted.

このように、特許文献1の表出力装置で表データに基づく表を印刷した場合、当該表が視認性の良い好適なレイアウトで必ず印刷されるとは限らないため、ユーザの利便性が悪い。また、印刷条件によっては用紙の無駄も生じ得る。なお、このような問題は、表データに基づく表を印刷する場合に限らず、例えば、ファクシミリ受信した長尺画像に基づく画像データを印刷する場合など、印刷対象の画像が用紙の印刷領域に収まらない場合にも同様の問題が生じ得る。   As described above, when a table based on the table data is printed by the table output device of Patent Document 1, the table is not always printed with a suitable layout having good visibility, so that user convenience is poor. Also, depending on printing conditions, paper can be wasted. Note that such a problem is not limited to printing a table based on the table data. For example, when printing image data based on a long image received by facsimile, the image to be printed does not fit in the print area of the paper. A similar problem can occur if not.

本発明は、上述した事情を鑑みてなされたものであり、印刷対象の画像を、用紙を無駄に使用することなく、かつ、好適なレイアウトで印刷できる画像処理装置、画像処理プログラム、および画像処理方法を提供することを目的とする。   The present invention has been made in view of the above-described circumstances, and an image processing apparatus, an image processing program, and an image processing capable of printing an image to be printed with a suitable layout without wastefully using paper. It aims to provide a method.

この目的を達成するために、本発明の画像処理装置は、画像データを取得する画像取得手段と、用紙の向きと、前記画像取得手段により取得された画像データに基づく画像の特定領域を長手方向の所定位置で折り返すことにより複数に分割した分割画像の前記用紙に対する配置と、に応じた複数種類のレイアウト各々について、各レイアウトにおける印刷領域のアスペクト比を取得するアスペクト比取得手段と、前記アスペクト比取得手段により取得されたアスペクト比のうち、前記特定領域のアスペクト比に最も近似するアスペクト比に対応する1のレイアウトを選定するレイアウト選定手段と、前記レイアウト選定手段により選定されたレイアウトに従って、前記画像取得手段により取得された画像データに基づく画像から、前記分割画像を生成する分割手段と、前記レイアウト選定手段により選定されたレイアウトに従って、前記分割手段により生成された前記分割画像を配置させた画像データを、レイアウト画像データとして生成する画像生成手段と、前記画像生成手段により生成されたレイアウト画像データ、または、当該レイアウト画像データに基づく印刷データを、印刷部に送信する印刷制御手段と、前記画像取得手段により取得された画像データが、マトリクス状に配置される複数のマス目から構成された表形式のデータに基づき生成された画像データである場合に、当該画像データに基づく画像から、当該画像の端側に位置する空白状態のマス目から構成される非重要領域を除く重要領域を、前記特定領域として抽出する抽出手段とを備えている。
In order to achieve this object, an image processing apparatus according to the present invention includes an image acquisition unit that acquires image data, a paper orientation, and a specific region of an image based on the image data acquired by the image acquisition unit in the longitudinal direction. Aspect ratio acquisition means for acquiring an aspect ratio of a print area in each layout for each of a plurality of types of layouts according to the arrangement of the divided image divided into a plurality of parts by folding back at a predetermined position, and the aspect ratio Of the aspect ratios acquired by the acquisition means, the layout selection means for selecting one layout corresponding to the aspect ratio closest to the aspect ratio of the specific area, and the image according to the layout selected by the layout selection means From the image based on the image data acquired by the acquisition means, the divided image Division means for generating image data, image generation means for generating, as layout image data, image data in which the divided images generated by the division means are arranged in accordance with the layout selected by the layout selection means, and the image generation A plurality of print control means for transmitting layout image data generated by the means or print data based on the layout image data to a printing unit, and image data acquired by the image acquisition means arranged in a matrix In the case of image data generated based on tabular data composed of square cells, non-important composed of blank cells located on the edge side of the image from the image based on the image data Extracting means for extracting an important area excluding the area as the specific area .

なお、本発明は、画像処理装置を制御する制御装置、画像処理システム、画像処理方法、画像処理プログラムを記録する記録媒体等の種々の態様で構成することができる。   The present invention can be configured in various modes such as a control device that controls an image processing device, an image processing system, an image processing method, and a recording medium that records an image processing program.

請求項1記載の画像処理装置によれば、複数種類のレイアウトのうち、画像取得手段により取得された画像データに基づく画像の特定領域に最も近似した形状の印刷領域を有するレイアウトが選定される。そして、特定領域に最も近似した形状の印刷領域を有するレイアウトに従って、画像取得手段により取得された画像データに基づく画像からの分割画像の生成と、当該分割画像を配置された画像データ(レイアウト画像データ)の生成とが行われるので、画像取得手段により取得された画像データに基づく画像を選定されたレイアウトの印刷領域に印刷した場合に、余白をできるだけ小さくでき、無駄に改ページされた印刷結果が出力されることを防止できる。従って、そのままでは1枚の用紙に収まらない表や長尺画像などを印刷する場合に、用紙を無駄に使用することなく、かつ、視認性の良い好適なレイアウトで印刷することができる。なお、請求項1において「特定領域」とは、画像取得手段により取得された画像データに基づく画像全体の領域であっても、一部の領域であってもよい。また、画像取得手段により取得された画像データが、マトリクス状に配置される複数のマス目から構成された表形式のデータに基づき生成された画像データである場合に、当該画像データに基づく画像から、当該画像の端側に位置する空白状態のマス目から構成される非重要領域を除く重要領域が、特定領域として抽出手段により抽出される。これにより、複数種類のレイアウトのうち、当該重要領域に最も近似した形状の印刷領域を有するレイアウトが選定される。よって、重要領域をできるだけ大きく配置させて印刷することができるため、視認性を向上させることができる。
According to the image processing apparatus of the first aspect, a layout having a print area having a shape closest to the specific area of the image based on the image data acquired by the image acquisition means is selected from a plurality of types of layouts. Then, according to a layout having a print area having a shape closest to the specific area, generation of a divided image from the image based on the image data acquired by the image acquisition unit, and image data (layout image data) in which the divided image is arranged Therefore, when an image based on the image data acquired by the image acquisition means is printed in the print area of the selected layout, the margin can be made as small as possible, and the print result in which page breaks are wasted It can prevent being output. Therefore, when printing a table or a long image that does not fit on a single sheet as it is, printing can be performed with a suitable layout with good visibility without wasteful use of the sheet. In addition, the “specific area” in claim 1 may be an entire area of the image based on the image data acquired by the image acquisition means or a partial area. In addition, when the image data acquired by the image acquisition unit is image data generated based on tabular data composed of a plurality of cells arranged in a matrix, the image data is acquired from the image based on the image data. The important area excluding the non-important area composed of the blank cells located on the end side of the image is extracted as the specific area by the extraction unit. As a result, a layout having a print area having a shape closest to the important area is selected from the plurality of types of layouts. Therefore, the important area can be arranged as large as possible for printing, so that visibility can be improved.

請求項2記載の画像処理装置によれば、請求項1が奏する効果に加え、次の効果を奏する。アスペクト比取得手段により取得されるアスペクト比は、1種類以上のサイズの用紙の縦および横の各向きについて、用紙の長手方向に沿った分割線によって複数に等分割された1以上のレイアウト、および、用紙の短手方向に沿った分割線によって複数に等分割された1以上のレイアウトの各々における印刷領域のアスペクト比である。よって、ユーザが設定した用紙向きにかかわらず、印刷対象となる画像を最適な視認性で印刷できるレイアウトを選定できる。   According to the image processing apparatus of claim 2, in addition to the effect of claim 1, the following effect is obtained. The aspect ratio acquired by the aspect ratio acquisition means is one or more layouts that are equally divided into a plurality of dividing lines along the longitudinal direction of the sheet for each of the vertical and horizontal directions of one or more types of paper, and The aspect ratio of the print area in each of one or more layouts equally divided into a plurality of lines along the transverse direction of the paper. Therefore, it is possible to select a layout that can print an image to be printed with optimum visibility regardless of the paper orientation set by the user.

請求項3記載の画像処理装置によれば、請求項2が奏する効果に加え、次の効果を奏する。各レイアウトの印刷領域は、分割線によって分割された用紙の分割領域を、当該分割線と直交する辺を互いに接触させて並べて形成された矩形の領域であるので、各レイアウトにおける印刷領域のアスペクト比と、画像取得手段により取得された画像データに基づく画像の特定領域のアスペクト比との比較を行い易い。   According to the image processing apparatus of claim 3, in addition to the effect of claim 2, the following effect is obtained. The print area of each layout is a rectangular area formed by arranging the divided areas of the paper divided by the dividing lines so that the sides perpendicular to the dividing lines are in contact with each other, so the aspect ratio of the printed area in each layout And the aspect ratio of the specific area of the image based on the image data acquired by the image acquisition means can be easily compared.

請求項4記載の画像処理装置によれば、請求項1から3のいずれかが奏する効果に加え、次の効果を奏する。各レイアウトに対応する印刷領域のアスペクト比は、用紙サイズ取得手段により取得した用紙サイズ情報が示す用紙の長辺および短辺の長さに基づいて算出することによって取得される。よって、各種サイズの用紙について、印刷に最適なレイアウトを選定できる。   According to the image processing apparatus of the fourth aspect, in addition to the effect produced by any one of the first to third aspects, the following effect is obtained. The aspect ratio of the print area corresponding to each layout is acquired by calculating based on the lengths of the long side and the short side of the paper indicated by the paper size information acquired by the paper size acquisition unit. Therefore, an optimal layout for printing can be selected for various sizes of paper.

請求項記載の画像処理装置によれば、請求項1から4のいずれかが奏する効果に加え、次の効果を奏する。画像取得手段により取得された画像データに基づく画像に含まれる非空白状態のマス目のうち、所定位置のマス目と、当該所定位置のマス目から最も遠くに位置するマス目とから形成される矩形領域が、重要領域として抽出される。よって、非空白状態のマス目に挟まれて空白状態のマス目があっても、その空白状態のマス目は重要領域として取り扱われ、空白状態のマス目によって非空白状態のマス目が分断されて別々の重要領域と判断されることを防止できる。
According to the image processing apparatus of the fifth aspect , in addition to the effect produced by any one of the first to fourth aspects , the following effect is produced. Of the cells in the non-blank state included in the image based on the image data acquired by the image acquisition means, the cell is formed from a cell at a predetermined position and a cell positioned farthest from the cell at the predetermined position. A rectangular area is extracted as an important area. Therefore, even if there is a blank cell sandwiched between non-blank cells, the blank cell is treated as an important area, and the non-blank cell is divided by the blank cell. Can be prevented from being determined as separate important areas.

請求項記載の画像処理装置によれば、請求項1から5のいずれかが奏する効果に加え、次の効果を奏する。選定されたレイアウトにおける印刷領域のうち、分割画像が配置される領域以外の余白領域がある場合、当該余白領域に非重要領域の少なくとも一部が配置されたレイアウト画像データが生成される。よって、重要領域をできるだけ大きく配置させつつ、余白領域に少なくとも一部が配置された非重要領域(空白状態のマス目)を印刷結果において利用し得る。
According to the image processing apparatus of the sixth aspect , in addition to the effect produced by any one of the first to fifth aspects , the following effect is produced. If there is a blank area other than the area where the divided image is arranged in the print area in the selected layout, layout image data in which at least a part of the non-important area is arranged in the blank area is generated. Therefore, it is possible to use a non-important area (blank cell) in which at least a part is arranged in the blank area in the printing result while arranging the important area as large as possible.

請求項記載の画像処理装置によれば、請求項1からのいずれかが奏する効果に加え、次の効果を奏する。画像取得手段により取得された画像データに基づく画像における特定領域が、選定されたレイアウトにおける印刷領域に収まる最大サイズとなるように拡大または縮小されるので、特定領域の内容の視認性に優れる印刷結果を得ることができる。
According to the image processing device of the seventh aspect , in addition to the effect produced by any one of the first to sixth aspects, the following effect is produced. Since the specific area in the image based on the image data acquired by the image acquisition means is enlarged or reduced to the maximum size that can fit in the print area in the selected layout, the print result with excellent visibility of the contents of the specific area Can be obtained.

請求項記載の画像処理装置によれば、請求項が奏する効果に加え、次の効果を奏する。特定領域の長手方向の長さに対する、選定されたレイアウトの印刷領域における長手方向の長さの比率と、特定領域の短手方向の長さに対する、選定されたレイアウトの印刷領域における短手方向の長さの比率とのうち、小さい比率を拡大率として、特定領域が拡大または縮小される。よって、特定領域を、選定されたレイアウトにおける印刷領域に収まる最大サイズとなるように拡大または縮小できるので、特定領域の内容の視認性に優れる印刷結果を得ることができる。
According to the image processing apparatus of claim 8 , in addition to the effect of claim 7 , the following effect is obtained. The ratio of the longitudinal length in the print area of the selected layout to the length in the longitudinal direction of the specific area, and the short direction in the print area of the selected layout to the length in the short direction of the specific area. The specific area is enlarged or reduced by using a small ratio among the length ratios as an enlargement ratio. Therefore, the specific area can be enlarged or reduced so as to have the maximum size that can be accommodated in the print area in the selected layout, and a print result with excellent visibility of the contents of the specific area can be obtained.

請求項記載の画像処理プログラムによれば、請求項1記載の画像処理装置と同様の効果を奏する。請求項1記載の画像処理方法によれば、請求項1記載の画像処理装置と同様の効果を奏する。
According to the image processing program of the ninth aspect, the same effect as that of the image processing apparatus according to the first aspect is obtained. According to the image processing method of claim 1 0 wherein the same advantages as the image processing apparatus according to claim 1.

印刷制御アプリを搭載する携帯端末の構成を示すブロック図である。It is a block diagram which shows the structure of the portable terminal carrying a printing control application. レイアウト候補テーブルの内容の一例を示す模式図である。It is a schematic diagram which shows an example of the content of a layout candidate table. 折り返し印刷を行う場合のレイアウトの一例を示す模式図である。It is a schematic diagram which shows an example of the layout in the case of performing return printing. 本発明における第1実施形態の概略を模式的に説明する図である。It is a figure which illustrates typically the outline of 1st Embodiment in this invention. 折り返し印刷処理を示すフローチャートである。It is a flowchart which shows a return printing process. 最適レイアウト選択処理を示すフローチャートである。It is a flowchart which shows the optimal layout selection process. 本発明における第2実施形態の概略を模式的に説明する図である。It is a figure which illustrates the outline of 2nd Embodiment in this invention typically. 第2実施形態の折り返し印刷処理を示すフローチャートである。It is a flowchart which shows the return printing process of 2nd Embodiment.

以下、本発明の好ましい実施形態について、添付図面を参照して説明する。まず、図1〜図6を参照して、本発明の第1実施形態を説明する。図1は、本発明の画像処理プログラムである印刷制御アプリケーション(以下「印刷制御アプリ」と称す)14bを搭載する携帯端末10の構成を示すブロック図である。本実施形態の印刷制御アプリ14bは、印刷対象の画像を、印刷用紙を無駄に使用することなく、かつ、視認性の良い好適なレイアウトで印刷させるプログラムとして構成される。   Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings. First, a first embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing a configuration of a mobile terminal 10 equipped with a print control application (hereinafter referred to as “print control application”) 14b which is an image processing program of the present invention. The print control application 14b according to the present embodiment is configured as a program that prints an image to be printed in a suitable layout without wasteful use of printing paper and with good visibility.

携帯端末10は、例えば、スマートフォンや携帯電話などの携帯端末である。携帯端末10には、CPU11、ROM12、RAM13、フラッシュメモリ14、無線LAN送受信部15、操作キー16、タッチパネル17、LCD18、メモリカードインターフェイス(メモリカードI/F)19、音声入出力部21、電話網通信部22が設けられる。これらの各部は、バスライン23を介して互いに接続される。   The mobile terminal 10 is a mobile terminal such as a smartphone or a mobile phone. The mobile terminal 10 includes a CPU 11, a ROM 12, a RAM 13, a flash memory 14, a wireless LAN transmission / reception unit 15, operation keys 16, a touch panel 17, an LCD 18, a memory card interface (memory card I / F) 19, a voice input / output unit 21, a telephone. A network communication unit 22 is provided. These units are connected to each other via a bus line 23.

CPU11は、ROM12等に記憶される固定値やプログラム等に従って、バスライン23と接続された各部を制御する。ROM12は、書換不能な不揮発性のメモリである。RAM13は、書換可能な揮発性のメモリである。RAM13には、レイアウト候補テーブル13aが記憶される。レイアウト候補テーブル13aは、印刷対象の画像を印刷用紙に折り返して印刷を行う場合に使用可能な複数のレイアウトの各々について、各レイアウトの印刷領域の大きさが格納されたテーブルであり、後述する折り返し印刷処理(図5参照)が実行される毎に生成される。レイアウト候補テーブル13aの詳細については、図2を参照して後述する。   The CPU 11 controls each unit connected to the bus line 23 according to a fixed value, a program, or the like stored in the ROM 12 or the like. The ROM 12 is a non-rewritable nonvolatile memory. The RAM 13 is a rewritable volatile memory. The RAM 13 stores a layout candidate table 13a. The layout candidate table 13a is a table in which the size of the print area of each layout is stored for each of a plurality of layouts that can be used when printing an image to be printed on a print sheet. It is generated every time the printing process (see FIG. 5) is executed. Details of the layout candidate table 13a will be described later with reference to FIG.

フラッシュメモリ14は、書換可能な不揮発性のメモリである。フラッシュメモリ14には、オペレーティングシステム14a(以下、OS14a)、印刷制御アプリ14b、印刷設定14cが格納される。以降、アプリケーションやオペレーティングシステムなどのプログラムを実行するCPU11のことを、単にプログラム名で記載する場合もある。例えば「アプリケーション」という記載が「アプリケーションを実行するCPU11」を意味する場合もある。OS14aは、携帯端末10の標準機能を実現するための基本ソフトウェアであって、本実施形態では、アンドロイド(登録商標)OSである。   The flash memory 14 is a rewritable nonvolatile memory. The flash memory 14 stores an operating system 14a (hereinafter referred to as OS 14a), a print control application 14b, and a print setting 14c. Hereinafter, the CPU 11 that executes a program such as an application or an operating system may be simply described by a program name. For example, the description “application” may mean “CPU 11 that executes the application”. The OS 14a is basic software for realizing the standard functions of the mobile terminal 10, and is an Android (registered trademark) OS in this embodiment.

印刷制御アプリ14bは、プリンタや印刷機能を有する複合機などのデバイスのベンダによって提供されるアプリケーションであって、ユーザによって携帯端末10にインストールされ、携帯端末10からのデバイスの利用を可能とする。例えば、パーソナルコンピュータなどを経由せずに、携帯端末10から直接、プリンタ30による印刷を可能にする。本実施形態の印刷制御アプリ14bは、表形式のデータに基づく表、すなわち、マトリクス状に複数のマス目が配置された表を印刷する場合に、当該表を適切に折り返すことによって、印刷用紙を無駄に使用することなく、かつ、視認性の良いレイアウトでの印刷を可能にする。後述する図5及び図6のフローチャートに示す各処理は、印刷制御アプリ14bにより実行される。印刷設定14cは、印刷時における各種設定であり、A4やレターなど、印刷に使用する印刷用紙(記録用紙)のサイズや、印刷時における余白サイズや、ふちなし印刷か否かの設定などを含む。印刷設定14cは、ユーザによる所定操作に基づき変更可能である。   The print control application 14b is an application provided by a vendor of a device such as a printer or a multifunction device having a printing function, and is installed in the mobile terminal 10 by the user, and enables the use of the device from the mobile terminal 10. For example, printing by the printer 30 can be performed directly from the mobile terminal 10 without going through a personal computer or the like. When printing a table based on tabular data, that is, a table in which a plurality of grids are arranged in a matrix, the print control application 14b according to the present embodiment appropriately wraps the table to print paper. It enables printing with a layout with good visibility without wasteful use. Each process shown in the flowcharts of FIGS. 5 and 6 to be described later is executed by the print control application 14b. The print settings 14c are various settings at the time of printing, and include settings such as the size of printing paper (recording paper) used for printing, such as A4 and letter, the margin size at the time of printing, and borderless printing. . The print setting 14c can be changed based on a predetermined operation by the user.

操作キー16は、携帯端末10に指示などを入力するためのメカニカルキーであり、例えば、携帯端末10の筺体に設けられる。タッチパネル17は、LCD18に重ねて設けられ、携帯端末10に設定情報や指示を入力する。LCD18は、各種画面を表示する。メモリカードI/F19は、書換可能な不揮発性のメモリカード20が装着されるインターフェイスであり、メモリカード20に対するデータの書き込み又は読み出しを制御する。音声入出力部21は、マイクやスピーカ等で構成された音声入出力用デバイスである。電話網通信部22は、携帯電話網(図示せず)を介した通話を行うための回路である。   The operation key 16 is a mechanical key for inputting an instruction or the like to the mobile terminal 10, and is provided on the housing of the mobile terminal 10, for example. The touch panel 17 is provided over the LCD 18 and inputs setting information and instructions to the mobile terminal 10. The LCD 18 displays various screens. The memory card I / F 19 is an interface to which a rewritable nonvolatile memory card 20 is attached, and controls writing or reading of data with respect to the memory card 20. The voice input / output unit 21 is a voice input / output device including a microphone, a speaker, and the like. The telephone network communication unit 22 is a circuit for performing a call via a mobile phone network (not shown).

無線LAN送受信部15は、IEEE802.11b/gの規格に準拠した無線LANにより、中継装置であるアクセスポイント(AP)50を介して、携帯端末10とプリンタ30とを通信可能にWi−Fi(登録商標)接続する。また、無線LAN送受信部15は、AP50を介して、携帯端末10と、インターネット800上のサーバ100とを通信可能に接続する。   The wireless LAN transmission / reception unit 15 is configured to be able to communicate between the mobile terminal 10 and the printer 30 via an access point (AP) 50 serving as a relay device by a wireless LAN compliant with the IEEE 802.11b / g standard. Registered trademark). In addition, the wireless LAN transmission / reception unit 15 connects the mobile terminal 10 and the server 100 on the Internet 800 through the AP 50 so as to communicate with each other.

AP50は、Wi−Fi(登録商標)端末間の通信を中継する中継装置である。また、AP50は、ブロードバンドルーター機能を有し、インターネット800に接続できる。プリンタ30は、携帯端末10などから受信した印刷データに基づく印刷を印刷用紙に行う印刷装置である。   The AP 50 is a relay device that relays communication between Wi-Fi (registered trademark) terminals. The AP 50 has a broadband router function and can be connected to the Internet 800. The printer 30 is a printing device that performs printing on printing paper based on print data received from the mobile terminal 10 or the like.

サーバ100は、携帯端末10からアップロードされる表形式のデータを、所定形式の画像データに変換して、携帯端末10に返却するサービスを提供する。サーバ100は、単独のサーバから構成されるものであってもよいし、機能に応じて設けられた複数のサーバからなるシステムとして構成されるものであってもよい。サーバ100において変換対象となる表形式のデータとしては、表計算ソフトであるExcel(登録商標)により作成されたデータ(以下「エクセルデータ」と称す)などを例示できる。また、サーバ100において変換によって得られる画像データとしては、JPEG、PNG、GIF、BMPなどの各種形式の画像データを例示できる。本実施形態では、サーバ100は、表形式のデータをJPEG形式の画像データに変換するものとする。   The server 100 provides a service for converting tabular data uploaded from the mobile terminal 10 into image data of a predetermined format and returning it to the mobile terminal 10. The server 100 may be configured from a single server, or may be configured as a system including a plurality of servers provided according to functions. Examples of tabular data to be converted in the server 100 include data created by Excel (registered trademark) which is spreadsheet software (hereinafter referred to as “Excel data”). Examples of the image data obtained by conversion in the server 100 include image data in various formats such as JPEG, PNG, GIF, and BMP. In the present embodiment, it is assumed that the server 100 converts tabular data into JPEG image data.

図2は、レイアウト候補テーブル13aの内容の一例を示す模式図である。レイアウト候補テーブル13aは、レイアウトの候補番号iに対し、候補番号iが示すレイアウトにおける印刷領域の横の長さX(mm)および縦の長さY(mm)が格納される。候補番号iによって特定されるレイアウトは、印刷時における印刷用紙の向きと、当該印刷用紙を分割する分割線の数と、当該分割線の向きとに応じて規定される。本実施形態では、図2に示すように、印刷用紙の向きが縦または横であり、分割線の数が0又は1本であり、分割線の向きが縦または横である場合の組み合わせに応じた6種類のレイアウトが使用可能である。これら6種類のレイアウトのそれぞれに対し、異なる候補番号iが対応付けられる。図2に示す例では、6種類の各レイアウトに対し、1から6までの候補番号iのいずれかが対応付けられている。本実施形態では、レイアウト候補テーブル13aは、折り返し印刷処理(図5参照)が実行される毎に生成される。具体的に、各レイアウトにおける印刷領域の横の長さXおよび縦の長さYが、印刷設定14cとして記憶されている印刷用紙のサイズに基づき算出され、各レイアウトに対する候補番号iに対応づけて格納される。なお、図2に示すレイアウト候補テーブル13aに格納されるXおよびYの値は、印刷用紙のサイズをA4サイズとし、ふちなし印刷を行うものとして算出された値である。   FIG. 2 is a schematic diagram showing an example of the contents of the layout candidate table 13a. The layout candidate table 13a stores the horizontal length X (mm) and the vertical length Y (mm) of the print area in the layout indicated by the candidate number i for the layout candidate number i. The layout specified by the candidate number i is defined according to the orientation of the printing paper at the time of printing, the number of dividing lines that divide the printing paper, and the orientation of the dividing lines. In the present embodiment, as shown in FIG. 2, depending on the combination when the orientation of the printing paper is vertical or horizontal, the number of dividing lines is 0 or 1, and the direction of the dividing lines is vertical or horizontal. Six different layouts can be used. A different candidate number i is associated with each of these six types of layouts. In the example shown in FIG. 2, one of candidate numbers i from 1 to 6 is associated with each of the six types of layouts. In the present embodiment, the layout candidate table 13a is generated every time the return printing process (see FIG. 5) is executed. Specifically, the horizontal length X and the vertical length Y of the print area in each layout are calculated based on the size of the print paper stored as the print setting 14c, and are associated with the candidate number i for each layout. Stored. Note that the values of X and Y stored in the layout candidate table 13a shown in FIG. 2 are values calculated to perform borderless printing with the printing paper size set to A4 size.

図3は、折り返し印刷を行う場合のレイアウトの一例を示す模式図である。図3では、図2に示すレイアウト候補テーブル13aの内容に則したレイアウトを例示する。つまり、ふちなし印刷時における各レイアウトを例示する。上述した通り、レイアウト候補テーブル13aには、印刷用紙の向きと、分割線の数と、分割線の向きとの組み合わせに応じて規定される6種類のレイアウトの各々を特定する候補番号iに対し、各レイアウトの印刷領域の大きさ、より詳細には、印刷領域の横の長さXおよび縦の長さYが格納される。   FIG. 3 is a schematic diagram illustrating an example of a layout when performing return printing. FIG. 3 illustrates a layout according to the contents of the layout candidate table 13a shown in FIG. That is, each layout at the time of borderless printing is illustrated. As described above, the layout candidate table 13a has a candidate number i for specifying each of the six types of layouts defined according to the combination of the orientation of the printing paper, the number of dividing lines, and the direction of the dividing lines. The size of the print area of each layout, more specifically, the horizontal length X and the vertical length Y of the print area are stored.

図3(a)は、各候補番号iに対するレイアウトを示す模式図である。候補番号1(i=1)のレイアウトは、印刷用紙Pの向きが縦向きであり、分割線が0であるレイアウト、すなわち、縦向きの印刷用紙Pに画像が折り返されることなく印刷されるレイアウトである。候補番号2(i=2)のレイアウトは、印刷用紙Pの向きが横向きであり、分割線が0であるレイアウト、すなわち、横向きの印刷用紙Pに画像が折り返されることなく印刷されるレイアウトである。   FIG. 3A is a schematic diagram showing a layout for each candidate number i. The layout of candidate number 1 (i = 1) is a layout in which the orientation of the printing paper P is vertical and the dividing line is 0, that is, a layout in which an image is printed without being folded on the printing paper P in the vertical orientation. It is. The layout of candidate number 2 (i = 2) is a layout in which the orientation of the print sheet P is landscape and the dividing line is 0, that is, a layout in which an image is printed without being folded on the landscape print sheet P. .

候補番号3(i=3)のレイアウトは、縦向きの印刷用紙Pを1本の縦向きの分割線Lによって2つの領域Q1、Q2に分割したレイアウトである。候補番号4(i=4)のレイアウトは、横向きの印刷用紙Pを1本の縦向きの分割線Lによって2つの領域Q1、Q2に分割したレイアウトである。候補番号5(i=5)のレイアウトは、縦向きの印刷用紙Pを1本の横向きの分割線Lによって2つの領域Q1、Q2に分割したレイアウトである。候補番号6(i=6)のレイアウトは、横向きの印刷用紙Pを1本の横向きの分割線Lによって2つの領域Q1、Q2に分割したレイアウトである。   The layout of candidate number 3 (i = 3) is a layout in which the vertically oriented printing paper P is divided into two regions Q1 and Q2 by one longitudinally dividing line L. The layout of candidate number 4 (i = 4) is a layout in which a horizontally oriented print paper P is divided into two regions Q1 and Q2 by one vertically oriented dividing line L. The layout of candidate number 5 (i = 5) is a layout in which a vertical print paper P is divided into two regions Q1 and Q2 by one horizontal division line L. The layout of candidate number 6 (i = 6) is a layout in which a landscape print sheet P is divided into two regions Q1 and Q2 by one landscape dividing line L.

図3(b)は、候補番号iのレイアウトにおける印刷領域iを示す模式図である。上述した通り、候補番号1のレイアウトは、縦向きの印刷用紙Pに画像が折り返されることなく印刷されるレイアウトである。よって、候補番号1のレイアウトにおける印刷領域1(i=1)は、縦向きの印刷用紙Pそのものに相当する。つまり、設定されている印刷用紙のサイズがA4サイズである場合、印刷領域1の横の長さXは210mmであり、縦の長さYは297mmである。また、候補番号2のレイアウトにおける印刷領域2(i=2)は、横向きの印刷用紙Pそのものに相当する。つまり、設定されている印刷用紙のサイズがA4サイズである場合、印刷領域1の横の長さXは297mmであり、縦の長さYは210mmである。   FIG. 3B is a schematic diagram showing the print area i in the layout of the candidate number i. As described above, the layout with the candidate number 1 is a layout in which an image is printed on the vertically oriented printing paper P without being folded. Therefore, the print area 1 (i = 1) in the layout of the candidate number 1 corresponds to the vertical print paper P itself. That is, when the set size of the printing paper is A4 size, the horizontal length X of the printing area 1 is 210 mm, and the vertical length Y is 297 mm. Further, the print area 2 (i = 2) in the layout of candidate number 2 corresponds to the horizontally oriented print paper P itself. That is, when the set size of the printing paper is A4 size, the horizontal length X of the printing area 1 is 297 mm, and the vertical length Y is 210 mm.

候補番号iのレイアウトが分割線によって分割されたレイアウトの場合、印刷領域iは、分割線による分割によって得られた各領域を、当該分割線に直交する辺を互いに接触させて並べて形成された矩形の領域とされる。よって、図3(b)に示すように、候補番号3〜6の各レイアウトに対する各印刷領域3〜6(i=3〜6)は、いずれも、領域Q1と領域Q2とを、当該分割線に直交する辺を互いに接触させて並べた矩形領域である。具体的に、縦方向の分割線Lにより分割されたレイアウトである候補番号3,4に対する各印刷領域3,4は、領域Q1と領域Q2とを縦方向に並べた矩形領域である。一方、横方向の分割線Lにより分割されたレイアウトである候補番号5,6に対する各印刷領域5,6は、領域Q1と領域Q2とを横方向に並べた矩形領域である。   When the layout of the candidate number i is a layout divided by dividing lines, the printing area i is a rectangle formed by arranging the areas obtained by dividing by the dividing lines with the sides orthogonal to the dividing lines in contact with each other. It is considered as an area. Therefore, as shown in FIG. 3B, each of the print areas 3 to 6 (i = 3 to 6) corresponding to the layouts with the candidate numbers 3 to 6 is divided into the dividing lines of the areas Q1 and Q2. This is a rectangular region in which sides orthogonal to each other are arranged in contact with each other. Specifically, the print areas 3 and 4 corresponding to the candidate numbers 3 and 4 which are layouts divided by the vertical dividing lines L are rectangular areas in which the areas Q1 and Q2 are arranged in the vertical direction. On the other hand, the print areas 5 and 6 corresponding to the candidate numbers 5 and 6 which are layouts divided by the horizontal dividing lines L are rectangular areas in which the areas Q1 and Q2 are arranged in the horizontal direction.

設定されている印刷用紙のサイズがA4サイズであり、ふちなし印刷を行う場合、印刷領域3(i=3)のサイズは、横の長さXが、105mm(=210mm/2)であり、縦の長さYが、594mm(=297mm×2)である。印刷領域4(i=4)のサイズは、横の長さXが、148.5mm(=297mm/2)であり、縦の長さYが、420mm(=210mm×2)である。印刷領域5(i=5)のサイズは、横の長さXが、420mm(=210mm×2)であり、縦の長さYが、148.5mm(=297mm/2)である。印刷領域6(i=6)のサイズは、横の長さXが、594mm(=297mm×2)であり、縦の長さYが、105mm(=210mm/2)である。   When the size of the set printing paper is A4 size and borderless printing is performed, the size of the printing area 3 (i = 3) is 105 mm (= 210 mm / 2) in the horizontal length X, The vertical length Y is 594 mm (= 297 mm × 2). As for the size of the print area 4 (i = 4), the horizontal length X is 148.5 mm (= 297 mm / 2), and the vertical length Y is 420 mm (= 210 mm × 2). As for the size of the printing area 5 (i = 5), the horizontal length X is 420 mm (= 210 mm × 2), and the vertical length Y is 148.5 mm (= 297 mm / 2). As for the size of the print region 6 (i = 6), the horizontal length X is 594 mm (= 297 mm × 2), and the vertical length Y is 105 mm (= 210 mm / 2).

図4は、本実施形態の概略を模式的に説明する図である。本実施形態の携帯端末10は、印刷制御アプリ14bを利用したエクセルデータの印刷指示が入力された場合に、指示対象のエクセルデータをサーバ100にアップロードし、サーバ100において当該エクセルデータから変換されたJPEG形式の画像データをダウンロードする。図4(a)は、携帯端末10がサーバ100からダウンロードした画像データに基づく印刷対象画像(以下「対象画像」と称す)Iの一例を示す模式図である。図4(a)に示す例において、対象画像Iにおける横の長さXaは12であり、縦の長さYaは2であるとする。   FIG. 4 is a diagram schematically illustrating the outline of the present embodiment. When a print instruction for Excel data using the print control application 14b is input, the mobile terminal 10 of the present embodiment uploads the Excel data to be directed to the server 100, and the server 100 converts the Excel data from the Excel data. Download image data in JPEG format. FIG. 4A is a schematic diagram illustrating an example of a print target image (hereinafter referred to as “target image”) I based on image data downloaded from the server 100 by the mobile terminal 10. In the example shown in FIG. 4A, it is assumed that the horizontal length Xa in the target image I is 12 and the vertical length Ya is 2.

対象画像Iを受信した携帯端末10は、各候補番号iについて、それぞれ、印刷領域iのアスペクト比と、対象画像Iのアスペクト比とを比較し、対象画像Iの大きさに最も近似するアスペクト比を有する印刷領域iのレイアウトを、最適レイアウトとして選択(選定)する。本実施形態では、比較に用いるアスペクト比を、横の長さに対する縦の長さの比(縦/横)とする。   The mobile terminal 10 that has received the target image I compares the aspect ratio of the print area i with the aspect ratio of the target image I for each candidate number i, and the aspect ratio that most closely approximates the size of the target image I. Is selected (selected) as the optimum layout. In this embodiment, the aspect ratio used for comparison is the ratio of the vertical length to the horizontal length (vertical / horizontal).

図4(b)は、対象画像Iのアスペクト比と、図2に示すレイアウト候補テーブル13aに格納される各候補番号i(i=1〜6)に対する各印刷領域iのアスペクト比との比較結果を示す表である。本実施形態では、各候補番号iについて、(印刷領域iの縦/横)に対する(対象画像の縦/横)の比と、(対象画像の縦/横)に対する(印刷領域iの縦/横)の比と算出し、1以下の値を、対象画像Iの大きさに対する近似率として採用する。そして、近似率が最も1に近い候補番号iに対するレイアウトを、最適レイアウトとして選択する。図4(b)に示す表によれば、近似率が0.94である候補番号6のレイアウト、すなわち、横向きの印刷用紙を1本の横向きの分割線によって2つに分割したレイアウトが最適レイアウトとして選択される。   FIG. 4B shows a comparison result between the aspect ratio of the target image I and the aspect ratio of each print area i for each candidate number i (i = 1 to 6) stored in the layout candidate table 13a shown in FIG. It is a table | surface which shows. In the present embodiment, for each candidate number i, the ratio of (vertical / horizontal of target image) to (vertical / horizontal of print area i) and (vertical / horizontal of print area i) to (vertical / horizontal of target image). ) And a value equal to or less than 1 is adopted as an approximation rate for the size of the target image I. Then, the layout for the candidate number i with the closest approximation rate is selected as the optimum layout. According to the table shown in FIG. 4B, the optimal layout is the layout of candidate number 6 with an approximation rate of 0.94, that is, a layout in which landscape printing paper is divided into two by one landscape dividing line. Selected as.

最適レイアウトが選択されると、対象画像Iは、当該最適レイアウトにおける印刷領域に収まるように拡大又は縮小される。具体的に、対象画像の横の長さXaに対する最適レイアウトの印刷領域の横の長さXの比(X/Xa)と、対象画像の縦の長さYaに対する最適レイアウトの印刷領域の縦の長さYの比(Y/Ya)とを比較し、小さい方の値を拡大率として決定する。そして、対象画像Iを決定された拡大率で拡大又は縮小する。なお、拡大率が1より大きい場合には、対象画像Iは拡大され、拡大率が1未満の場合には、対象画像Iは縮小される。   When the optimum layout is selected, the target image I is enlarged or reduced so as to fit in the print area in the optimum layout. Specifically, the ratio (X / Xa) of the horizontal length X of the print area of the optimal layout to the horizontal length Xa of the target image and the vertical length of the print area of the optimal layout with respect to the vertical length Ya of the target image. The ratio of the length Y (Y / Ya) is compared, and the smaller value is determined as the enlargement ratio. Then, the target image I is enlarged or reduced at the determined enlargement rate. When the enlargement ratio is greater than 1, the target image I is enlarged, and when the enlargement ratio is less than 1, the target image I is reduced.

図4(c)は、対象画像Iを、最適レイアウトとして選択された候補番号6のレイアウトに対して印刷した場合の印刷結果を示す模式図である。候補番号6のレイアウトは、図3(a)に示すように、横向きの印刷用紙Pを1本の横向きの分割線によって2つの領域Q1,Q2に分割したレイアウトである。対象画像Iは、領域Q1,Q2に分割されて印刷される。対象画像Iの大きさに対する近似率が1未満である場合、各領域Q1,Q2には、対象画像Iが印刷されない余白領域Rが形成される。対象画像Iの大きさに対する近似率が1である場合には、対象画像Iは、領域Q1と領域Q2とに丁度収まるため、余白領域Rは形成されない。なお、X/Xaの値およびY/Yaの値のうち、小さい方の値より小さい値を拡大率とした場合、印刷用紙Pに形成される余白は、下方の余白Rだけでなく、左右方向にも形成される。上述した通り、最適レイアウトは、対象画像Iの大きさに最も近似するアスペクト比を有する印刷領域iのレイアウトであるので、印刷結果において形成される余白領域Rの大きさは、他のレイアウトに比べて最も小さい。つまり、本実施形態の携帯端末10によれば、対象画像Iを最も無駄なく印刷用紙Pに印刷できる。また、対象画像Iが無用に折り返して印刷されたり、異なる印刷用紙に無駄に分割して印刷されたりしないレイアウトが、最適レイアウトとして選択されるので、対象画像Iを視認性の良い好適なレイアウトで印刷できる。   FIG. 4C is a schematic diagram showing a print result when the target image I is printed on the layout of candidate number 6 selected as the optimum layout. As shown in FIG. 3A, the layout of candidate number 6 is a layout in which the landscape printing paper P is divided into two regions Q1 and Q2 by one landscape dividing line. The target image I is divided into areas Q1 and Q2 and printed. When the approximation ratio with respect to the size of the target image I is less than 1, a blank area R where the target image I is not printed is formed in each of the areas Q1 and Q2. When the approximation ratio with respect to the size of the target image I is 1, the target image I just fits in the region Q1 and the region Q2, so the blank region R is not formed. In addition, when the value smaller than the smaller one of the X / Xa value and the Y / Ya value is used as the enlargement ratio, the margin formed on the printing paper P is not only the lower margin R but also the left-right direction. Also formed. As described above, since the optimal layout is the layout of the print area i having the aspect ratio that most closely approximates the size of the target image I, the size of the blank area R formed in the print result is larger than that of other layouts. Is the smallest. That is, according to the mobile terminal 10 of the present embodiment, the target image I can be printed on the printing paper P with the least waste. In addition, the layout in which the target image I is unnecessarily folded and printed or is not divided and printed on different printing papers is selected as the optimal layout, so that the target image I has a suitable layout with good visibility. Can print.

図5は、印刷制御アプリ14bに従ってCPU11が実行する折り返し印刷処理を示すフローチャートである。折り返し印刷処理は、選択されたエクセルデータの印刷指示をCPU11が受け付けた場合に開始される。まず、CPU11は、ステップS501(以下、ステップを省略)において、対象画像を取得する。具体的に、S501において、CPU11は、指示対象のエクセルデータを、無線LAN送受信部15からサーバ100にアップロードさせ、当該エクセルデータから変換された画像データを、対象画像として、無線LAN送受信部15に受信させることによって、対象画像を取得する。なお、対象画像の基となるエクセルデータは、RAM13、フラッシュメモリ14、またはメモリカード20のいずれに記憶されるものであってもよい。   FIG. 5 is a flowchart showing the return printing process executed by the CPU 11 in accordance with the print control application 14b. The return printing process is started when the CPU 11 receives an instruction to print the selected Excel data. First, in step S501 (hereinafter, step is omitted), the CPU 11 acquires a target image. Specifically, in S501, the CPU 11 causes the wireless LAN transmission / reception unit 15 to upload the instruction target Excel data to the server 100, and the image data converted from the Excel data is transmitted to the wireless LAN transmission / reception unit 15 as a target image. The target image is acquired by receiving. The Excel data that is the basis of the target image may be stored in any of the RAM 13, the flash memory 14, or the memory card 20.

次に、CPU11は、印刷設定14cから用紙サイズを取得し、レイアウト候補テーブル13aを生成する(S502)。S502の処理により、例えば、図2に示すようなレイアウトテーブル13aが生成される。次に、CPU11は、レイアウトテーブル13aを用いて、最適レイアウト選択処理を実行する(S503)。最適レイアウト選択処理(S503)は、対象画像に対する最適なレイアウトを選択する処理であり、その詳細については、図6を参照して後述する。最適レイアウト選択処理(S503)の実行後、対象画像の縦の長さに対する、選択された最適レイアウトの縦の長さの比(最適レイアウトの縦/対象画像の縦)が、対象画像の横の長さに対する、選択された最適レイアウトの横の長さの比(最適レイアウトの横/対象画像の横)より小さい場合(S504:Yes)、CPU11は、(最適レイアウトの縦/対象画像の縦)の値を拡大率とし(S505)、処理をS506に移行する。一方、(最適レイアウトの縦/対象画像の縦)が(最適レイアウトの横/対象画像の横)以上である場合(S504:No)、CPU11は、(最適レイアウトの横/対象画像の横)の値を拡大率とし(S511)、処理をS506に移行する。   Next, the CPU 11 acquires the paper size from the print setting 14c, and generates the layout candidate table 13a (S502). By the process of S502, for example, a layout table 13a as shown in FIG. 2 is generated. Next, the CPU 11 executes an optimum layout selection process using the layout table 13a (S503). The optimum layout selection process (S503) is a process for selecting an optimum layout for the target image, and details thereof will be described later with reference to FIG. After execution of the optimal layout selection process (S503), the ratio of the vertical length of the selected optimal layout to the vertical length of the target image (the vertical of the optimal layout / the vertical of the target image) is When the ratio of the horizontal length of the selected optimal layout to the length (the horizontal of the optimal layout / the horizontal of the target image) is smaller (S504: Yes), the CPU 11 (the vertical of the optimal layout / the vertical of the target image) Is set as an enlargement ratio (S505), and the process proceeds to S506. On the other hand, when (optimum layout length / target image height) is equal to or greater than (optimum layout width / target image width) (S504: No), the CPU 11 determines (optimum layout width / target image width). The value is set as an enlargement ratio (S511), and the process proceeds to S506.

S506において、CPU11は、S505又はS511において決定された拡大率に従って、対象画像を拡大又は縮小する。S506において、拡大率が1より大きい場合には、対象画像は拡大され、拡大率が1未満の場合には、対象画像は縮小される。上述したS504,S505,S511の処理によれば、(最適レイアウトの縦/対象画像の縦)の値と(最適レイアウトの横/対象画像の横)の値とのうち、小さい方の値が拡大率として採用されるので、対象画像は、選択された最適レイアウトにおける印刷領域に収まる最大サイズに拡大又は縮小される。   In step S506, the CPU 11 enlarges or reduces the target image according to the enlargement ratio determined in step S505 or S511. In S506, if the enlargement ratio is greater than 1, the target image is enlarged, and if the enlargement ratio is less than 1, the target image is reduced. According to the processing of S504, S505, and S511 described above, the smaller one of the (optimum layout portrait / target image portrait) value and (optimum layout landscape / target image width) value is enlarged. Since it is adopted as a rate, the target image is enlarged or reduced to the maximum size that can fit in the print area in the selected optimal layout.

次に、CPU11は、S506において拡大又は縮小された対象画像を、最適レイアウトに従い分割して分割画像を生成する(S507)。具体的に、拡大又は縮小された対象画像を、(最適レイアウトに対する分割線の数+1)に等分割した分割画像を生成する。なお、最適レイアウトが候補番号1又は2のレイアウトであり、分割線の数がゼロである場合には、拡大又は縮小された対象画像そのものが分割画像となる。   Next, the CPU 11 generates a divided image by dividing the target image enlarged or reduced in S506 according to the optimum layout (S507). Specifically, a divided image is generated by equally dividing the target image that has been enlarged or reduced into (number of dividing lines with respect to the optimal layout + 1). When the optimal layout is the layout of candidate number 1 or 2, and the number of dividing lines is zero, the enlarged or reduced target image itself is a divided image.

次に、CPU11は、最適レイアウトに従い、生成された分割画像を配置したレイアウト画像データを生成する(S508)。S508の処理により、例えば、図4(c)に示す印刷結果に対応する画像データが、レイアウト画像データとして生成される。次に、CPU11は、レイアウト画像データに基づいて印刷データを生成し(S509)、印刷データを、無線LAN送受信部15から、プリンタ30へ送信し(S510)、本処理を終了する。S509の処理の結果、レイアウト画像データに基づく画像が、印刷用紙に印刷される。つまり、対象画像が、選択された最適レイアウトで印刷される。   Next, the CPU 11 generates layout image data in which the generated divided images are arranged according to the optimal layout (S508). By the processing of S508, for example, image data corresponding to the print result shown in FIG. 4C is generated as layout image data. Next, the CPU 11 generates print data based on the layout image data (S509), transmits the print data from the wireless LAN transmission / reception unit 15 to the printer 30 (S510), and ends this processing. As a result of the processing in S509, an image based on the layout image data is printed on the printing paper. That is, the target image is printed with the selected optimum layout.

図6は、上述した最適レイアウト選択処理(S503)を示すフローチャートである。まず、CPU11は、最適近似率の値をゼロに初期化し(S601)、候補番号を示す変数iの値を1に初期化する(S602)。次に、CPU11は、現在の変数iの値がレイアウト候補数より大きいかを判断する(S603)。例えば、レイアウトテーブル13aとして、図2に示すレイアウトテーブルが採用されている場合、レイアウト候補数は6であるので、かかる場合には、S603において、CPU11は、変数iが6より大きいかを判断する。   FIG. 6 is a flowchart showing the optimum layout selection process (S503) described above. First, the CPU 11 initializes the value of the optimum approximation rate to zero (S601), and initializes the value of the variable i indicating the candidate number to 1 (S602). Next, the CPU 11 determines whether or not the current value of the variable i is larger than the number of layout candidates (S603). For example, when the layout table shown in FIG. 2 is adopted as the layout table 13a, the number of layout candidates is 6. In this case, the CPU 11 determines whether the variable i is larger than 6 in S603. .

S603において、変数iの値がレイアウト候補数以下であるとCPU11が判断した場合(S603:No)、CPU11は、対象画像の横の長さに対する縦の長さの比(対象画像の縦/横)が、現在の変数iが示す候補番号iのレイアウトにおける印刷領域iの横の長さに対する縦の長さの比(印刷領域iの縦/横)より小さいか否かを判断する(S604)。S604において、(対象画像の縦/横)が、(印刷領域iの縦/横)より小さい場合(S604:Yes)、CPU11は、近似率を「(対象画像の縦/横)/(印刷領域iの縦/横)」とし(S605)、処理をS606に移行する。一方、(対象画像の縦/横)が、(印刷領域iの縦/横)以上である場合(S604:No)、CPU11は、近似率を「(印刷領域iの縦/横)/(対象画像の縦/横)」とし(S610)、処理をS606に移行する。上述したS604,S605,S610の処理によれば、対象画像のアスペクト比である(対象画像の縦/横)の値と、印刷領域iのアスペクト比である(印刷領域iの縦/横)の値のうち、大きい方の値を分母とする比が近似値として設定される。つまり、S605又はS610において設定される近似値は、1以下の値である。   In S603, when the CPU 11 determines that the value of the variable i is equal to or less than the number of layout candidates (S603: No), the CPU 11 determines the ratio of the vertical length to the horizontal length of the target image (vertical / horizontal of the target image). ) Is smaller than the ratio of the vertical length to the horizontal length of the print area i in the layout of the candidate number i indicated by the current variable i (vertical / horizontal of the print area i) (S604). . In S604, when (vertical / horizontal of the target image) is smaller than (vertical / horizontal of the printing area i) (S604: Yes), the CPU 11 sets the approximation rate to “(vertical / horizontal of the target image) / (printing area). i vertical / horizontal) "(S605), and the process proceeds to S606. On the other hand, when (vertical / horizontal of the target image) is equal to or larger than (vertical / horizontal of the printing area i) (S604: No), the CPU 11 sets the approximation rate to "(vertical / horizontal of the printing area i) / (target Image Vertical / Horizontal) ”(S610), and the process proceeds to S606. According to the processing of S604, S605, and S610 described above, the value of the aspect ratio of the target image (vertical / horizontal of the target image) and the aspect ratio of the print area i (vertical / horizontal of the print area i) A ratio having a larger value among the values as a denominator is set as an approximate value. That is, the approximate value set in S605 or S610 is a value of 1 or less.

S606において、設定された近似率が、現在の最適近似率より大きい場合(S606:Yes)、CPU11は、S605又はS610において設定された近似率を最適近似率とし(S607)、現在の変数iが示す候補番号iのレイアウトを最適レイアウトとし(S608)、処理をS609に移行する。一方、設定された近似率が、現在の最適近似率以下である場合(S606:No)、CPU11は、処理をS609に移行する。   When the set approximation rate is larger than the current optimum approximation rate in S606 (S606: Yes), the CPU 11 sets the approximation rate set in S605 or S610 as the optimum approximation rate (S607), and the current variable i is The layout with the candidate number i shown is the optimum layout (S608), and the process proceeds to S609. On the other hand, when the set approximation rate is equal to or less than the current optimum approximation rate (S606: No), the CPU 11 shifts the process to S609.

CPU11は、変数iに1を加算し(S609)、処理をS603に移行する。S603において、変数iの値がレイアウト候補数より大きいとCPU11が判断した場合(S603:Yes)、全ての候補番号に対する処理が終了したので、かかる場合、CPU11は、本処理を終了する。上述したS606,S607,S608の処理によれば、最大近似率は、変数iの値が1から現在の値までの間に設定された近似率のうち、最も1に近い値である。よって、最適レイアウト選択処理(S503)によれば、使用可能な全てのレイアウトのうち、印刷領域のアスペクト比が対象画像のアスペクト比に最も近似するレイアウトが、最適レイアウトとして選択される。   The CPU 11 adds 1 to the variable i (S609), and the process proceeds to S603. In S603, when the CPU 11 determines that the value of the variable i is larger than the number of layout candidates (S603: Yes), the processing for all candidate numbers is completed. In this case, the CPU 11 ends this processing. According to the processing of S606, S607, and S608 described above, the maximum approximation rate is the closest value to 1 among the approximation rates set between the value of the variable i and the current value. Therefore, according to the optimal layout selection process (S503), the layout in which the aspect ratio of the print area is the closest to the aspect ratio of the target image is selected as the optimal layout among all the available layouts.

上記第1実施形態によれば、複数種類のレイアウトのうち、対象画像のアスペクト比に最も近似したアスペクト比のレイアウト、すなわち、対象画像の形状に最も近似した形状のレイアウトが、最適レイアウトとして選択される。よって、対象画像を印刷した場合に生じる余白をできるだけ小さくすることができるので、無駄に改ページされた印刷結果や、無駄に折り返された印刷結果が出力されることを防止できる。よって、そのままでは1枚の印刷用紙に収まらない表などの画像を印刷する場合に、用紙を無駄に使用することなく、かつ、好適なレイアウトで印刷できる。特に、(最適レイアウトの縦/対象画像の縦)の値と(最適レイアウトの横/対象画像の横)の値とのうち、小さい方の値が拡大率として決定されるので、対象画像を、選択された最適レイアウトにおける印刷領域に収まる最大サイズで印刷できる。よって、対象画像が最良な視認性で印刷された印刷結果を得ることができる。   According to the first embodiment, a layout having an aspect ratio that is the closest to the aspect ratio of the target image among a plurality of types of layouts, that is, a layout having a shape that is closest to the shape of the target image, is selected as the optimal layout. The Therefore, since the margin generated when the target image is printed can be made as small as possible, it is possible to prevent a print result that has been pagelessly turned or a print result that has been turned back unnecessarily. Therefore, when printing an image such as a table that does not fit on a single printing sheet as it is, printing can be performed with a suitable layout without wastefully using the sheet. In particular, the smaller one of the value of (vertical layout vertical / vertical image vertical) and (optimal layout horizontal / horizontal image) is determined as the enlargement ratio. It is possible to print at the maximum size that fits in the print area in the selected optimal layout. Therefore, it is possible to obtain a printing result in which the target image is printed with the best visibility.

また、印刷設定14cから取得した用紙サイズに基づき、レイアウト候補テーブル13aを生成するので、各種サイズの印刷用紙について、印刷に最適なレイアウトを選択させることができる。レイアウト候補テーブル13aには、例えば、図2に示すように、各サイズの印刷用紙の縦および横の各向きについて、印刷用紙の長手方向に沿った分割線によって複数に等分割された1以上のレイアウト、および、印刷用紙の短手方向に沿った分割線によって複数に等分割された1以上のレイアウトの各々における印刷領域のアスペクト比を算出可能な情報、具体的には、各印刷領域の横の長さ及び縦の長さが格納される。よって、ユーザが設定した用紙向きにかかわらず、印刷対象となる画像を最適な視認性で印刷できるレイアウトを選定できる。   In addition, since the layout candidate table 13a is generated based on the paper size acquired from the print setting 14c, it is possible to select an optimal layout for printing for various sizes of printing paper. In the layout candidate table 13a, for example, as shown in FIG. 2, one or more equally divided into a plurality of dividing lines along the longitudinal direction of the printing paper with respect to the vertical and horizontal orientations of the printing paper of each size. Information that can calculate the layout and the aspect ratio of the print area in each of one or more layouts equally divided by a dividing line along the short direction of the printing paper, specifically, the width of each print area And the vertical length are stored. Therefore, it is possible to select a layout that can print an image to be printed with optimum visibility regardless of the paper orientation set by the user.

次に、図7及び図8を参照して、本発明の第2実施形態について説明する。第1実施形態では、エクセルデータから変換された画像データに基づく対象画像の内容にかかわらず、対象画像の全領域を印刷用紙に印刷させる構成としたが、第2実施形態では、対象画像のうち重要な領域が最大の大きさで印刷できるように構成される。なお、第2実施形態において、上述した第1実施形態と同一の部分については、同一の符号を付し、その説明は省略する。   Next, a second embodiment of the present invention will be described with reference to FIGS. In the first embodiment, the entire area of the target image is printed on the printing paper regardless of the content of the target image based on the image data converted from the Excel data. In the second embodiment, the target image It is configured so that important areas can be printed at maximum size. Note that in the second embodiment, the same portions as those in the first embodiment described above are denoted by the same reference numerals, and description thereof is omitted.

図7は、第2実施形態の概略を模式的に説明する図である。図7(a)は、携帯端末10がサーバ100からダウンロードした、エクセルデータから変換された画像データに基づく対象画像I2の一例を示す模式図である。なお、対象画像I2に対応する画像データが、「マトリクス状に配置される複数のマス目から構成された表形式のデータに基づき生成された画像データ」の一例である。図7(a)に示す例において、対象画像I2は、マトリクス状に配置された複数のマス目(セル)のうち、最下行B1および最右列B2の各マス目が空白状態である表の画像である。本実施形態では、空白状態でないマス目のうち、最も左上に位置するマス目と、当該マス目から最も離れたマス目とにより形成される矩形領域を重要領域とし、その他の領域を非重要領域とする。なお、最も左上に位置するマス目から最も離れたマス目とは、空白状態でないマス目のうち、最も左上に位置するマス目における所定の頂点から、各マス目における前記所定の頂点までの直線距離が最長となるマス目である。つまり、対象画像が示す表のうち、端側に位置する空白状態のマス目(空欄のマス目)を非重要領域として取り扱う。   FIG. 7 is a diagram schematically illustrating the outline of the second embodiment. FIG. 7A is a schematic diagram illustrating an example of the target image I2 based on the image data converted from the Excel data downloaded from the server 100 by the mobile terminal 10. The image data corresponding to the target image I2 is an example of “image data generated based on tabular data composed of a plurality of cells arranged in a matrix”. In the example shown in FIG. 7A, the target image I2 is a table in which each cell in the bottom row B1 and the rightmost column B2 is blank among a plurality of cells (cells) arranged in a matrix. It is an image. In the present embodiment, among the cells that are not blank, the rectangular region formed by the cell located in the upper left corner and the cell farthest from the cell is an important region, and the other regions are non-important regions. And The cell farthest from the cell located at the upper left is a straight line from a predetermined vertex in the cell located at the upper left to the predetermined vertex in each cell among cells that are not blank. The grid with the longest distance. That is, in the table indicated by the target image, blank cells (blank cells) positioned on the end side are treated as non-important regions.

図7(b)は、図7(b)の対象画像I2における重要領域Aを示す模式図である。図7(b)に示すように、重要領域Aは、空白状態でないマス目のうち、最も左上に位置するマス目C1と、当該マス目C1から最も離れたマス目C2とにより形成される矩形領域である。なお、この重要領域Aの横の長さはXa2であり、縦の長さはYa2である。重要領域Aのアスペクト比と各レイアウトにおける印刷領域のアスペクト比とに基づいて最適レイアウトを選択するとともに、最適レイアウトの印刷領域の大きさに対する重要領域Aの大きさの比に基づき印刷時の拡大率を算出する。つまり、本実施形態では、重要領域が最大の大きさで印刷用紙に折り返し印刷できるような拡大率を算出する。   FIG. 7B is a schematic diagram showing the important area A in the target image I2 of FIG. As shown in FIG. 7B, the important area A is a rectangle formed by a cell C1 located at the upper left among the cells not in the blank state and a cell C2 farthest from the cell C1. It is an area. The horizontal length of the important area A is Xa2, and the vertical length is Ya2. The optimum layout is selected based on the aspect ratio of the important area A and the aspect ratio of the print area in each layout, and the enlargement ratio at the time of printing is based on the ratio of the size of the important area A to the size of the print area of the optimum layout. Is calculated. That is, in the present embodiment, the enlargement ratio is calculated so that the important area can be printed on the printing paper with the maximum size.

図7(c)は、対象画像I2を、重要領域Aに基づいて選択された最適レイアウトに対して印刷した場合の印刷結果を示す模式図である。この例では、候補番号6のレイアウトが選択されたものとする。対象画像I2は、上述した第1実施形態と同様(図4(c)参照)、横向きの印刷用紙Pにおける領域Q1,Q2にそれぞれ分割されて印刷される。しかし、本実施形態では、第1実施形態と異なり、重要領域Aの大きさに基づき算出された拡大率で、対象画像I2を拡大又は縮小するので、印刷結果には、非重要領域である最下行B1の罫線が印刷され、余白領域は形成されない。   FIG. 7C is a schematic diagram illustrating a printing result when the target image I2 is printed with respect to the optimum layout selected based on the important area A. In this example, it is assumed that the layout of candidate number 6 is selected. Similar to the first embodiment described above (see FIG. 4C), the target image I2 is divided into regions Q1 and Q2 on the horizontally oriented print paper P and printed. However, in the present embodiment, unlike the first embodiment, the target image I2 is enlarged or reduced at an enlargement rate calculated based on the size of the important area A. The ruled line in the lower row B1 is printed, and no margin area is formed.

図8は、第2実施形態の折り返し印刷処理を示すフローチャートである。第2実施形態の折り返し印刷処理もまた、上述した第1実施形態と同様、印刷制御アプリ14bに従ってCPU11が実行する処理であり、選択されたエクセルデータの印刷指示をCPU11が受け付けた場合に開始される。まず、CPU11は、上述した第1実施形態と同様に、対象画像を取得する(S501)。次に、CPU11は、取得した対象画像から、重要領域を抽出する(S801)。S801において、CPU11は、対象画像における空白状態でないマス目を画像解析によって検出し、空白状態でないマス目のうち、最も左上に位置するマス目と、当該マス目から最も離れたマス目とにより形成される矩形領域を重要領域として抽出する。   FIG. 8 is a flowchart showing the return printing process of the second embodiment. The return printing process of the second embodiment is also a process executed by the CPU 11 in accordance with the print control application 14b, similar to the first embodiment described above, and is started when the CPU 11 receives a print instruction for the selected Excel data. The First, the CPU 11 acquires a target image as in the first embodiment described above (S501). Next, the CPU 11 extracts an important area from the acquired target image (S801). In step S <b> 801, the CPU 11 detects a non-blank cell in the target image by image analysis, and forms the cell located in the upper left corner of the non-blank cell and the cell farthest from the cell. The rectangular area to be extracted is extracted as an important area.

次に、CPU11は、上述した第1実施形態と同様に、レイアウト候補テーブル13aを生成し(S502)、最適レイアウト選択処理を実行する(S503)。ただし、本実施形態では、第1実施形態の最適レイアウト選択処理(図6参照)のS604,S605,S610において、「対象画像の縦/横」に換えて「重要領域の縦/横」を使用する。   Next, as in the first embodiment described above, the CPU 11 generates a layout candidate table 13a (S502) and executes an optimum layout selection process (S503). However, in this embodiment, “vertical / horizontal of the important area” is used instead of “vertical / horizontal of the target image” in S604, S605, and S610 of the optimum layout selection process (see FIG. 6) of the first embodiment. To do.

最適レイアウト選択処理(S503)の実行後、重要領域の縦の長さに対する、選択された最適レイアウトの縦の長さの比(最適レイアウトの縦/重要領域の縦)が、重要領域の横の長さに対する、選択された最適レイアウトの横の長さの比(最適レイアウトの横/重要領域の横)より小さい場合(S802:Yes)、CPU11は、(最適レイアウトの縦/重要領域の縦)の値を拡大率とし(S803)、処理をS506に移行する。一方、(最適レイアウトの縦/重要領域の縦)が(最適レイアウトの横/重要領域の横)以上である場合(S802:No)、CPU11は、(最適レイアウトの横/重要領域の横)の値を拡大率とし(S804)、処理をS506に移行する。よって、S802,S803,S804の処理によれば、(最適レイアウトの縦/重要領域の縦)の値と(最適レイアウトの横/重要領域の横)の値とのうち、小さい方の値が拡大率として採用されるので、重要領域は、選択された最適レイアウトにおける印刷領域に収まる最大サイズに拡大又は縮小される。   After execution of the optimal layout selection process (S503), the ratio of the vertical length of the selected optimal layout to the vertical length of the important area (the vertical of the optimal layout / the vertical of the important area) is If the ratio is smaller than the ratio of the horizontal length of the selected optimal layout to the length (horizontal of the optimal layout / horizontal of the important area) (S802: Yes), the CPU 11 (vertical of the optimal layout / vertical of the important area) Is set as the enlargement ratio (S803), and the process proceeds to S506. On the other hand, when (the optimum layout length / important area length) is equal to or greater than (optimum layout width / important area width) (S802: No), the CPU 11 determines (optimum layout width / important area width). The value is set as an enlargement ratio (S804), and the process proceeds to S506. Therefore, according to the processing of S802, S803, and S804, the smaller one of the value of (vertical layout vertical / important region vertical) and (optimal layout horizontal / important region horizontal) is enlarged. Since it is adopted as a rate, the important area is enlarged or reduced to the maximum size that fits in the print area in the selected optimum layout.

次に、CPU11は、上述した第1実施形態と同様に、決定された拡大率に従って対象画像の拡大又は縮小を行い(S506)、拡大又は縮小された対象画像から、分割画像を生成する(S507)。S507によれば、対象画像から分割画像が生成されるので、分割画像には、非重要領域である最下行B1の少なくとも一部が含まれることになる。次に、CPU11は、上述した第1実施形態と同様に、レイアウト画像データを生成し(S508)、印刷データを生成し(S509)、生成した印刷データを、プリンタ30へ送信し(S510)、本処理を終了する。本実施形態では、S508の処理により、例えば、図7(c)に示す印刷結果に対応する画像に対応する画像データが、レイアウト画像データとして生成される。つまり、S507において生成される分割画像には、最下行B1の少なくとも一部が含まれているので、印刷結果には、非重要領域である最下行B1の罫線が印刷される。   Next, as in the first embodiment described above, the CPU 11 enlarges or reduces the target image according to the determined enlargement ratio (S506), and generates a divided image from the enlarged or reduced target image (S507). ). According to S507, since the divided image is generated from the target image, the divided image includes at least a part of the lowest row B1 that is the non-important region. Next, as in the first embodiment described above, the CPU 11 generates layout image data (S508), generates print data (S509), and transmits the generated print data to the printer 30 (S510). This process ends. In the present embodiment, for example, image data corresponding to an image corresponding to the print result illustrated in FIG. 7C is generated as layout image data by the processing of S508. That is, since the divided image generated in S507 includes at least a part of the lowermost row B1, the ruled line of the lowermost row B1, which is an unimportant area, is printed in the print result.

上記第2実施形態によれば、対象画像が、表形式のデータに基づき生成された画像データの画像である場合、当該対象画像のうち、端側にある空白状態のマス目(セル)から構成される非重要領域を除く重要領域を抽出し、当該重要領域のアスペクト比(縦/横)に基づいて最適レイアウトの選択を行う。よって、複数種類のレイアウトのうち、重要領域のアスペクト比に最も近似したアスペクト比のレイアウト、すなわち、重要領域の形状に最も近似した形状のレイアウトが、最適レイアウトとして選択されるので、重要領域を、無駄に改ページされたり、無駄に折り返されたりすることなく、好適なレイアウトで印刷できる。特に、(最適レイアウトの縦/重要領域の縦)の値と(最適レイアウトの横/重要領域の横)の値とのうち、小さい方の値が拡大率として決定されるので、重要領域は、選択された最適レイアウトにおける印刷領域に収まる最大サイズで印刷できる。従って、表における非空白状態の領域、すなわち、ユーザが内容を判読する必要のある重要な領域を、最も視認性の良い状態でユーザに判読させることができる。   According to the second embodiment, when the target image is an image of image data generated based on tabular data, the target image is composed of blank cells (cells) on the end side of the target image. The important areas excluding the non-important areas are extracted, and the optimum layout is selected based on the aspect ratio (vertical / horizontal) of the important areas. Therefore, the layout with the aspect ratio that most closely approximates the aspect ratio of the important area among the multiple types of layouts, that is, the layout with the shape that most closely approximates the shape of the important area, is selected as the optimum layout. It is possible to print with a suitable layout without useless page breaks or useless wrapping. In particular, since the smaller one of the value of (vertical layout vertical / important area vertical) and (optimal layout width / important area horizontal) is determined as the enlargement ratio, the important area is It is possible to print at the maximum size that fits in the print area in the selected optimal layout. Therefore, the non-blank area in the table, that is, the important area where the user needs to read the contents can be read by the user with the best visibility.

また、空白状態でないマス目のうち、最も左上に位置するマス目と、当該マス目から最も離れたマス目とにより形成される矩形領域を重要領域として抽出するので、非空白状態のマス目に挟まれて空白状態のマス目があっても、その空白状態のマス目によって非空白状態のマス目が分断されて別々の重要領域と判断されることを防止できる。また、S507において生成される分割画像からは、非重要領域である最下行B1の罫線が印刷される印刷結果が得られるので、重要領域をできるだけ大きく配置させつつ、重要領域以外の余白領域となるべき領域に非重要領域(空白状態のマス目)を配置させることができる。ユーザは、この空白状態のマス目を、例えば、印刷結果において手書きを行うためのマス目として利用できる。   In addition, a rectangular area formed by the square located in the upper left corner and the square farthest from the square is extracted as an important area among squares that are not blank. Even if there is a blank cell that is sandwiched, it is possible to prevent the non-blank cell from being divided by the blank cell and being determined as separate important areas. In addition, since the divided image generated in S507 provides a print result in which the ruled line of the bottom row B1, which is a non-important area, is printed, it becomes a blank area other than the important area while arranging the important area as large as possible. A non-important area (blank cell) can be arranged in the power area. The user can use this blank cell as, for example, a cell for handwriting in the print result.

上記実施形態において、携帯端末10が、画像処理装置の一例である。印刷制御アプリ14bが、画像処理プログラムの一例である。プリンタ30が、印刷部の一例である。CPU11が、コンピュータの一例である。印刷用紙Pが、用紙の一例である。分割線Lが、分割線の一例である。領域Q1,Q2が、分割領域の一例である。重要領域Aが、重要領域の一例である。最下行B1および最右列B2が、非重要領域の一例である。S501の処理を実行するCPU11が、画像取得手段、画像取得ステップの一例である。S502の処理を実行するCPU11が、アスペクト比取得手段、用紙サイズ取得手段、アスペクト比取得ステップの一例である。S604〜S608,S610の処理を実行するCPU11が、レイアウト選定手段、レイアウト選定ステップの一例である。S507の処理を実行するCPU11が、分割手段、分割ステップの一例である。S508の処理を実行するCPU11が、画像生成手段、画像生成ステップの一例である。S510の処理を実行するCPU11が、印刷制御手段、印刷制御ステップの一例である。S801の処理を実行するCPU11が、抽出手段、抽出ステップの一例である。S504,S505,S511またはS802,S803,S804の処理を実行するCPU11が、サイズ変更手段の一例である。
In the embodiment, the mobile terminal 10 is an example of an image processing device. The print control application 14b is an example of an image processing program. The printer 30 is an example of a printing unit. The CPU 11 is an example of a computer. The printing paper P is an example of paper. The dividing line L is an example of a dividing line. Regions Q1 and Q2 are examples of divided regions. The important area A is an example of the important area. The bottom row B1 and the rightmost column B2 are examples of non-important regions. CPU11 which performs the process of S501 is an example of an image acquisition means and an image acquisition step. The CPU 11 that executes the process of S502 is an example of an aspect ratio acquisition unit, a paper size acquisition unit, and an aspect ratio acquisition step. CPU11 which performs the process of S604-S608, S610 is an example of a layout selection means and a layout selection step. CPU11 which performs the process of S507 is an example of a division | segmentation means and a division | segmentation step. The CPU 11 that executes the process of S508 is an example of an image generation unit and an image generation step. The CPU 11 that executes the process of S510 is an example of a print control unit and a print control step. CPU11 which performs the process of S801 is an example of an extraction means and an extraction step . The CPU 11 that executes the processes of S504, S505, S511 or S802, S803, and S804 is an example of a size changing unit.

以上、実施形態に基づき本発明を説明したが、本発明は上述した実施形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲内で種々の改良変更が可能であることは容易に推察できるものである。   Although the present invention has been described based on the embodiments, the present invention is not limited to the above-described embodiments, and various improvements and modifications can be easily made without departing from the spirit of the present invention. Can be inferred.

例えば、上記各実施形態では、エクセルデータのような表形式のデータから変換された画像を対象画像として例示したが、1枚の印刷用紙に収まらない各種画像、例えば、ファクシミリ受信した画像が1枚の印刷用紙に収まらない長尺画像を対象画像として、本発明を適用させてもよい。   For example, in each of the above-described embodiments, an image converted from tabular data such as Excel data is exemplified as the target image. However, various images that do not fit on one print sheet, for example, one image received by facsimile. The present invention may be applied to a long image that does not fit on the print paper as a target image.

上記実施形態では、1の対象画像を1枚の印刷用紙に折り返して印刷することを例示したが、1の対象画像を2枚以上の印刷用紙に印刷する場合にも、本発明を同様に適用できる。例えば、ユーザが印刷枚数を指定している場合に、指定された枚数以下の印刷用紙のそれぞれについて、同じレイアウトで分割線によって分割された各領域を全て、分割線に沿う方向に互いに並べて形成された矩形領域を印刷領域とし、当該印刷領域のアスペクト比と、対象画像又は重要領域のアスペクト比とから近似率を算出すればよい。あるいは、対象画像又は重要領域のアスペクト比との近似率が最も1に近くなるような、印刷枚数およびレイアウトを探索し、該当する印刷枚数およびレイアウトを採用する構成としてもよい。このとき、最も1に近い近似率で同じ近似率となるレイアウトが複数あった場合、それら複数のレイアウトのうち、例えば、算出される拡大率が最も1に近いレイアウトを選択すれば、対象画像が印刷領域より大きい場合には、対象画像を最大の大きさで印刷できる。あるいは、最も1に近い近似率で同じ近似率となる複数のレイアウトのうち、算出される拡大率が最も1から離れたレイアウトを選択すれば、対象画像が印刷領域より小さい場合には、対象画像を最大の大きさで印刷できる。   In the above-described embodiment, it is exemplified that one target image is folded and printed on one print sheet. However, the present invention is similarly applied to a case where one target image is printed on two or more print sheets. it can. For example, when the user designates the number of prints, all the areas divided by the dividing lines with the same layout are formed side by side in the direction along the dividing lines for each of the printing sheets of the designated number or less. The approximate ratio may be calculated from the rectangular area as a print area and the aspect ratio of the print area and the aspect ratio of the target image or important area. Alternatively, a configuration may be adopted in which the number of printed sheets and the layout are searched so that the approximation ratio with the aspect ratio of the target image or important region is closest to 1, and the corresponding number of printed sheets and layout are adopted. At this time, if there are a plurality of layouts having the same approximation rate with an approximation rate closest to 1, if, for example, a layout with the calculated enlargement rate closest to 1 is selected, the target image is selected. If it is larger than the print area, the target image can be printed with the maximum size. Alternatively, if a layout with the calculated enlargement ratio farthest from 1 is selected from a plurality of layouts having the same approximation ratio at an approximation ratio closest to 1, if the target image is smaller than the print area, the target image Can be printed in the maximum size.

また、上記各実施形態では、使用可能なレイアウトとして、印刷用紙の向きが縦または横であり、分割線の数が0又は1本であり、分割線の向きが縦または横である場合の組み合わせに応じた6種類のレイアウトを例示したが、分割線の数を2本以上とすることによって、レイアウトの種類を増やすことは当然可能である。つまり、印刷用紙を縦又は横方向に2つ以上に平行に分割したレイアウトを採用してもよい。   In each of the above embodiments, the usable layouts are combinations in which the orientation of the printing paper is vertical or horizontal, the number of dividing lines is 0 or 1, and the direction of the dividing lines is vertical or horizontal. Although six types of layouts corresponding to the above are illustrated, it is naturally possible to increase the types of layouts by setting the number of dividing lines to two or more. That is, a layout in which the printing paper is divided into two or more in the vertical or horizontal direction may be adopted.

上記各実施形態では、折り返し印刷処理(図5,図8)を実行する毎に、レイアウト候補テーブル13aを生成する構成としたが、使用可能な全ての印刷用紙のサイズに対し、予め、レイアウト候補テーブル13aと同様のテーブルを予め準備しておき、折り返し印刷処理を実行する際に印刷設定14cとして設定されている印刷用紙のサイズに応じたテーブルを読み出す構成としてもよい。   In each of the embodiments described above, the layout candidate table 13a is generated every time the return printing process (FIGS. 5 and 8) is executed. However, the layout candidates are preliminarily set for all sizes of usable printing paper. A table similar to the table 13a may be prepared in advance, and a table corresponding to the size of the printing paper set as the print setting 14c may be read when the return printing process is executed.

上記各実施形態では、印刷制御アプリ14bが搭載される携帯端末10として、通話機能を有する携帯端末を例示したが、通話機能を有さないタブレットや、デジタルカメラなどの各種装置も本発明の携帯端末10の一例となり得る、また、タッチパネル17を有しておらず、メカニカルキーから操作を入力する装置についても、本発明を適用可能である。また、上記各実施形態では、OS14aがアンドロイド(登録商標)OSであるものとして説明したが、他のOSが搭載された携帯端末であっても本発明を適用可能である。   In each of the above embodiments, the mobile terminal 10 having the call function is illustrated as the mobile terminal 10 on which the print control application 14b is mounted. However, various devices such as a tablet and a digital camera that do not have the call function are also included in the present invention. The present invention can also be applied to an apparatus that can be an example of the terminal 10 and that does not have the touch panel 17 and inputs an operation from a mechanical key. In each of the above embodiments, the OS 14a is described as an Android (registered trademark) OS. However, the present invention can also be applied to a mobile terminal equipped with another OS.

上記各実施形態では、携帯端末10が印刷機能を有さず、サーバ100から取得した対象画像からレイアウト画像データを生成し、当該レイアウト画像データに基づく印刷データを、プリンタ30へ送信する構成としたが、印刷機能を実現する印刷部を有する複合機やプリンタなどの装置に、印刷制御アプリ14bに相当するプログラムを搭載し、印刷部を有する装置が、当該プログラムに従って、上述した折り返し印刷処理(図5,図8)や、最適レイアウト選択処理(図6)を実行する構成としてもよい。かかる場合、印刷部を有する装置は、サーバ100やメモリカードなどから取得した対象画像からレイアウト画像データを生成し、当該レイアウト画像データに基づく印刷データを、印刷部に送信して印刷させる。また、上記各実施形態では、携帯端末10は、レイアウト画像データに基づく印刷データをプリンタ30に送信する構成としたが、レイアウト画像データをプリンタ30に送信して、レイアウト画像データに基づく印刷をプリンタ30に実行させる構成としてもよい。   In each of the above embodiments, the mobile terminal 10 does not have a printing function, generates layout image data from the target image acquired from the server 100, and transmits the print data based on the layout image data to the printer 30. However, a device corresponding to the print control application 14b is installed in a device such as a multifunction machine or a printer having a printing unit that implements a printing function, and the device having the printing unit performs the above-described return printing process (see FIG. 5, FIG. 8) and an optimum layout selection process (FIG. 6) may be executed. In such a case, an apparatus having a printing unit generates layout image data from a target image acquired from the server 100 or a memory card, and transmits print data based on the layout image data to the printing unit for printing. In each of the above embodiments, the mobile terminal 10 is configured to transmit print data based on the layout image data to the printer 30. However, the mobile terminal 10 transmits the layout image data to the printer 30 and performs printing based on the layout image data. 30 may be executed.

あるいは、サーバ100に、印刷制御アプリ14bに相当するプログラムを搭載し、サーバ100が、携帯端末10からエクセルデータを受信した場合に、当該プログラムに従って、上述した折り返し印刷処理(図5,図8)や、最適レイアウト選択処理(図6)を実行する構成としてもよい。かかる場合、サーバ100は、携帯端末10から受信したエクセルデータを画像データに変換することによって対象画像を取得し、その対象画像からレイアウト画像データを生成し、当該レイアウト画像データ、または、当該レイアウト画像データに基づく印刷データを、プリンタ30に送信して対応する画像を印刷させる。なお、かかる場合、サーバ100を複数のサーバから構成し、エクセルデータを画像(対象画像)に変換する変換サーバと、当該変換サーバにより変換された対象画像からレイアウト画像データを生成するサーバとを異なるサーバとして構成することが好ましい。   Alternatively, when the server 100 is loaded with a program corresponding to the print control application 14b and the server 100 receives Excel data from the mobile terminal 10, the above-described return printing process (FIGS. 5 and 8) according to the program. Alternatively, the optimum layout selection process (FIG. 6) may be executed. In such a case, the server 100 acquires the target image by converting the Excel data received from the mobile terminal 10 into image data, generates layout image data from the target image, and generates the layout image data or the layout image. Print data based on the data is transmitted to the printer 30 to print the corresponding image. In such a case, the server 100 includes a plurality of servers, and a conversion server that converts Excel data into an image (target image) is different from a server that generates layout image data from the target image converted by the conversion server. It is preferable to configure as a server.

上記各実施形態では、ふちなし印刷時におけるレイアウトを例示して説明したが、余白が設定されている場合には、余白を除く領域を印刷領域として、当該印刷領域のアスペクト比と、対象画像や重要領域のアスペクト比とを比較すればよい。   In each of the above embodiments, the layout at the time of borderless printing has been described as an example. However, when a margin is set, the area excluding the margin is set as a print area, the aspect ratio of the print area, the target image, What is necessary is just to compare the aspect ratio of an important area | region.

上記各実施形態では、印刷領域、対象画像、および重要領域のアスペクト比として、各領域の「縦/横」を採用する構成としたが、各領域の「横/縦」をアスペクト比として採用する構成であってもよい。また、上記各実施形態では、(印刷領域iの縦/横)に対する(対象画像の縦/横)の比と、(対象画像の縦/横)に対する(印刷領域iの縦/横)の比と算出し、1以下の値を、対象画像Iの大きさに対する近似率として採用したが、1より大きい値を近似率として採用してもよい。かかる場合もまた、近似率が最も1に近い候補番号iに対するレイアウトを、最適レイアウトとして選択する。   In each of the above embodiments, the “vertical / horizontal” of each area is adopted as the aspect ratio of the print area, the target image, and the important area, but “horizontal / vertical” of each area is adopted as the aspect ratio. It may be a configuration. In each of the above embodiments, the ratio of (vertical / horizontal of the target image) to (vertical / horizontal of the printing area i) and the ratio of (vertical / horizontal of the printing area i) to (vertical / horizontal of the target image). The value of 1 or less is used as the approximation rate for the size of the target image I, but a value greater than 1 may be used as the approximation rate. Also in such a case, the layout for the candidate number i having the closest approximation rate is selected as the optimum layout.

上記第2実施形態では、S506において、拡大率に従って対象画像を拡大又は縮小する構成としたが、拡大又は縮小の対象を重要領域としてもよい。かかる場合、非重要領域を含まない重要領域のみの印刷結果を得ることができる。   In the second embodiment, in S506, the target image is enlarged or reduced according to the enlargement ratio. However, the enlargement or reduction target may be set as an important region. In such a case, it is possible to obtain a print result of only the important area not including the non-important area.

上記第2実施形態では、S801において、CPU11は、対象画像における空白状態でないマス目のうち、最も左上に位置するマス目と、当該マス目から最も離れたマス目とにより形成される矩形領域を重要領域として抽出する構成としたが、対象画像をLCD18に表示させ、ユーザに、タッチパネル17などを用いて重要領域を指定させる構成としてもよい。かかる場合、ユーザが所望の領域を重要領域とすることができる。また、対象画像を画像解析し、文字認識された項目の中に、他の項目に比べて比較的に重要度の低い、例えば「備考欄」などの所定の項目がある場合に、当該項目に対応するマス目を非重要領域として、対象画像から重要領域を抽出する構成としてもよい。   In the second embodiment, in step S <b> 801, the CPU 11 determines a rectangular area formed by a cell located in the upper left corner of a cell that is not blank in the target image and a cell farthest from the cell. Although it is configured to extract as the important region, the target image may be displayed on the LCD 18 and the user may designate the important region using the touch panel 17 or the like. In such a case, the user can set a desired area as an important area. In addition, when the target image is subjected to image analysis, and there is a predetermined item such as a “remarks column” that is relatively less important than the other items among the items that have been character-recognized, A configuration may be adopted in which the important area is extracted from the target image with the corresponding square as the non-important area.

上記実施形態では、表を示す対象画像を、表の罫線の位置を考慮することなく折り返す構成としたが、罫線の位置で折り返すようにレイアウト画像データを生成する構成としてもよい。例えば、折り返し印刷処理(図5,図8)のS507において、CPU11は、(最適レイアウトに対する分割線の数+1)に等分割するのではなく、罫線の位置で分割した分割画像を生成すればよい。ただし、分割画像の幅は、等分割した幅にできるだけ近似させることが好ましい。かかる場合には、各分割画像について、最適レイアウトにおける各領域に収まるような最大の拡大率を算出し、算出された拡大率に従って各分割画像を拡大又は縮小して、レイアウト画像データを生成するように構成すればよい。   In the above embodiment, the target image indicating the table is folded without considering the position of the ruled line in the table. However, the layout image data may be generated so as to be folded at the ruled line position. For example, in S507 of the return printing process (FIGS. 5 and 8), the CPU 11 may generate a divided image divided at the position of the ruled line instead of equally dividing (number of dividing lines with respect to the optimal layout + 1). . However, the width of the divided image is preferably approximated to the equally divided width as much as possible. In such a case, for each divided image, a maximum enlargement ratio that fits in each region in the optimum layout is calculated, and each divided image is enlarged or reduced according to the calculated enlargement ratio to generate layout image data. What is necessary is just to comprise.

上記実施形態では、表を示す対象画像を単純に折り返す構成としたが、折り返し毎に項目列や項目行を付ける構成としてもよい。かかる場合、例えば、折り返し印刷処理(図5,図8)において、CPU11は、S507において生成された各分割画像に項目列や項目行の画像を付し、S508においてレイアウトデータを生成する際に、CPU11は、項目列や項目行の画像を含む各分割画像をレイアウトの各領域に収まるように拡大又は縮小するように構成すればよい。   In the above-described embodiment, the target image indicating the table is simply folded, but an item string or item row may be added for each folding. In such a case, for example, in the return printing process (FIGS. 5 and 8), the CPU 11 attaches an image of an item string or item row to each divided image generated in S507, and generates layout data in S508. The CPU 11 may be configured to enlarge or reduce each divided image including the image of the item row and the item row so as to fit in each area of the layout.

10 携帯端末
14b 印刷制御アプリ
10 Mobile terminal 14b Print control application

Claims (10)

画像データを取得する画像取得手段と、
用紙の向きと、前記画像取得手段により取得された画像データに基づく画像の特定領域を長手方向の所定位置で折り返すことにより複数に分割した分割画像の前記用紙に対する配置と、に応じた複数種類のレイアウト各々について、各レイアウトにおける印刷領域のアスペクト比を取得するアスペクト比取得手段と、
前記アスペクト比取得手段により取得されたアスペクト比のうち、前記特定領域のアスペクト比に最も近似するアスペクト比に対応する1のレイアウトを選定するレイアウト選定手段と、
前記レイアウト選定手段により選定されたレイアウトに従って、前記画像取得手段により取得された画像データに基づく画像から、前記分割画像を生成する分割手段と、
前記レイアウト選定手段により選定されたレイアウトに従って、前記分割手段により生成された前記分割画像を配置させた画像データを、レイアウト画像データとして生成する画像生成手段と、
前記画像生成手段により生成されたレイアウト画像データ、または、当該レイアウト画像データに基づく印刷データを、印刷部に送信する印刷制御手段と、
前記画像取得手段により取得された画像データが、マトリクス状に配置される複数のマス目から構成された表形式のデータに基づき生成された画像データである場合に、当該画像データに基づく画像から、当該画像の端側に位置する空白状態のマス目から構成される非重要領域を除く重要領域を、前記特定領域として抽出する抽出手段と、
を備えていることを特徴とする画像処理装置。
Image acquisition means for acquiring image data;
A plurality of types according to the orientation of the paper and the arrangement of the divided image divided into a plurality of parts by folding back a specific area of the image based on the image data acquired by the image acquisition means at a predetermined position in the longitudinal direction. For each layout, aspect ratio acquisition means for acquiring the aspect ratio of the print area in each layout;
Layout selecting means for selecting one layout corresponding to an aspect ratio that most closely approximates the aspect ratio of the specific area among the aspect ratios acquired by the aspect ratio acquiring means;
Division means for generating the divided image from an image based on the image data acquired by the image acquisition means according to the layout selected by the layout selection means;
Image generation means for generating, as layout image data, image data in which the divided images generated by the dividing means are arranged in accordance with the layout selected by the layout selecting means;
Print control means for transmitting layout image data generated by the image generation means or print data based on the layout image data to a printing unit;
When the image data acquired by the image acquisition means is image data generated based on tabular data composed of a plurality of cells arranged in a matrix, from the image based on the image data, Extraction means for extracting an important region excluding a non-important region composed of blank cells located on the edge side of the image as the specific region;
An image processing apparatus comprising:
前記アスペクト比取得手段は、1種類以上のサイズの用紙の縦および横の各向きについて、用紙の長手方向に沿った分割線によって複数に等分割された1以上のレイアウト、および、用紙の短手方向に沿った分割線によって複数に等分割された1以上のレイアウトの各々における印刷領域のアスペクト比を取得することを特徴とする、請求項1記載の画像処理装置。   The aspect ratio acquisition means includes one or more layouts that are equally divided into a plurality of dividing lines along the longitudinal direction of the paper in the vertical and horizontal directions of one or more types of paper, and the short side of the paper The image processing apparatus according to claim 1, wherein an aspect ratio of a print area in each of one or more layouts equally divided into a plurality of division lines along a direction is acquired. 前記印刷領域は、前記分割線によって分割された用紙の分割領域を、当該分割線と直交する辺を互いに接触させて並べて形成された矩形の領域であることを特徴とする、請求項2記載の画像処理装置。   3. The print area according to claim 2, wherein the print area is a rectangular area formed by arranging the divided areas of the paper divided by the dividing lines so that the sides perpendicular to the dividing lines are in contact with each other. Image processing device. 用紙サイズ情報を取得する用紙サイズ取得手段、を備え、
前記アスペクト比取得手段は、前記各レイアウトに対応する印刷領域のアスペクト比を、前記用紙サイズ取得手段により取得した用紙サイズ情報が示す用紙の長辺および短辺の長さに基づいて算出することによって取得することを特徴とする、請求項1から3のいずれかに記載の画像処理装置。
Paper size acquisition means for acquiring paper size information,
The aspect ratio acquisition unit calculates the aspect ratio of the print area corresponding to each layout based on the lengths of the long side and the short side of the paper indicated by the paper size information acquired by the paper size acquisition unit. The image processing apparatus according to claim 1, wherein the image processing apparatus acquires the image processing apparatus.
前記抽出手段は、前記画像取得手段により取得された画像データに基づく画像に含まれる非空白状態のマス目のうち、所定位置のマス目と、当該所定位置のマス目から最も遠くに位置するマス目とから形成される矩形領域を、前記重要領域とすることを特徴とする、請求項1から4のいずれかに記載の画像処理装置。 The extraction unit includes a cell at a predetermined position and a cell located farthest from the cell at the predetermined position among non-blank cells included in the image based on the image data acquired by the image acquisition unit. The image processing apparatus according to claim 1, wherein a rectangular area formed from eyes is the important area. 前記画像生成手段は、前記選定されたレイアウトにおける印刷領域のうち、前記分割画像が配置される領域以外の余白領域がある場合、当該余白領域に前記非重要領域の少なくとも一部を配置させた前記レイアウト画像データを生成することを特徴とする、請求項1から5のいずれかに記載の画像処理装置。 When there is a margin area other than the area in which the divided image is arranged in the print area in the selected layout, the image generation unit is configured to arrange at least a part of the non-important area in the margin area. 6. The image processing apparatus according to claim 1 , wherein the image processing apparatus generates layout image data. 前記画像取得手段により取得された画像データに基づく画像における特定領域が、前記レイアウト選定手段により選定されたレイアウトにおける印刷領域に収まる最大サイズとなるように拡大または縮小するサイズ変更手段、を備え、
前記画像生成手段は、前記サイズ変更手段により拡大又は縮小された前記分割画像を配置させた画像データを、レイアウト画像データとして生成することを特徴とする、請求項1からのいずれかに記載の画像処理装置。
A size changing means for enlarging or reducing the specific area in the image based on the image data acquired by the image acquiring means so as to be the maximum size that fits in the print area in the layout selected by the layout selecting means,
The said image generation means produces | generates the image data which has arrange | positioned the said divided image expanded or reduced by the said size change means as layout image data, It is any one of Claim 1 to 6 characterized by the above-mentioned. Image processing device.
前記サイズ変更手段は、前記特定領域の長手方向の長さに対する、前記選定されたレイアウトの印刷領域における長手方向の長さの比率と、前記特定領域の短手方向の長さに対する、前記選定されたレイアウトの印刷領域における短手方向の長さの比率とのうち、小さい比率を拡大率として、前記特定領域を拡大または縮小することを特徴とする、請求項記載の画像処理装置。 The size changing means is the ratio of the length in the print area of the selected layout to the length in the longitudinal direction of the specific area and the length in the short direction of the specific area. The image processing apparatus according to claim 7 , wherein the specific area is enlarged or reduced by using a small ratio as an enlargement ratio among the ratios of the lengths in the short direction in the print area of the selected layout. 画像処理装置のコンピュータが実行可能な画像処理プログラムであって、
画像データを取得する画像取得手段と、
用紙の向きと、前記画像取得手段により取得された画像データに基づく画像の特定領域を長手方向の所定位置で折り返すことにより複数に分割した分割画像の前記用紙に対する配置と、に応じた複数種類のレイアウト各々について、各レイアウトにおける印刷領域のアスペクト比を取得するアスペクト比取得手段と
前記アスペクト比取得手段により取得されたアスペクト比のうち、前記特定領域のアスペクト比に最も近似するアスペクト比に対応する1のレイアウトを選定するレイアウト選定手段と、
前記レイアウト選定手段により選定されたレイアウトに従って、前記画像取得手段により取得された画像データに基づく画像から、前記分割画像を生成する分割手段と、
前記レイアウト選定手段により選定されたレイアウトに従って、前記分割手段により生成された前記分割画像を配置させた画像データを、レイアウト画像データとして生成する画像生成手段と、
前記画像生成手段により生成されたレイアウト画像データ、または、当該レイアウト画像データに基づく印刷データを、印刷部に送信する印刷制御手段と
前記画像取得手段により取得された画像データが、マトリクス状に配置される複数のマス目から構成された表形式のデータに基づき生成された画像データである場合に、当該画像データに基づく画像から、当該画像の端側に位置する空白状態のマス目から構成される非重要領域を除く重要領域を、前記特定領域として抽出する抽出手段として、
前記コンピュータを機能させることを特徴とする画像処理プログラム。
An image processing program executable by a computer of an image processing apparatus,
Image acquisition means for acquiring image data;
A plurality of types according to the orientation of the paper and the arrangement of the divided image divided into a plurality of parts by folding back a specific area of the image based on the image data acquired by the image acquisition means at a predetermined position in the longitudinal direction. For each layout, an aspect ratio acquisition unit that acquires an aspect ratio of a print area in each layout, and an aspect ratio that is closest to the aspect ratio of the specific region among the aspect ratios acquired by the aspect ratio acquisition unit 1 Layout selection means for selecting the layout of
Division means for generating the divided image from an image based on the image data acquired by the image acquisition means according to the layout selected by the layout selection means;
Image generation means for generating, as layout image data, image data in which the divided images generated by the dividing means are arranged in accordance with the layout selected by the layout selecting means;
Print control means for transmitting layout image data generated by the image generation means or print data based on the layout image data to a printing unit ;
When the image data acquired by the image acquisition means is image data generated based on tabular data composed of a plurality of cells arranged in a matrix, from the image based on the image data, important areas excluding the non-critical region consists grid blank state located at the end side of the image, and an extraction means for extracting, as the specific area,
An image processing program for causing the computer to function.
画像処理装置が行う画像処理方法であって、
画像データを取得する画像取得ステップと、
用紙の向きと、前記画像取得ステップにより取得された画像データに基づく画像の特定領域を長手方向の所定位置で折り返すことにより複数に分割した分割画像の前記用紙に対する配置と、に応じた複数種類のレイアウト各々について、各レイアウトにおける印刷領域のアスペクト比を取得するアスペクト比取得ステップと、
前記アスペクト比取得ステップにより取得されたアスペクト比のうち、前記特定領域のアスペクト比に最も近似するアスペクト比に対応する1のレイアウトを選定するレイアウト選定ステップと、
前記レイアウト選定ステップにより選定されたレイアウトに従って、前記画像取得ステップにより取得された画像データに基づく画像から、前記分割画像を生成する分割ステップと、
前記レイアウト選定ステップにより選定されたレイアウトに従って、前記分割ステップにより生成された前記分割画像を配置させた画像データを、レイアウト画像データとして生成する画像生成ステップと、
前記画像生成ステップにより生成されたレイアウト画像データ、または、当該レイアウト画像データに基づく印刷データを、印刷部に送信する印刷制御ステップと、
前記画像取得ステップにより取得された画像データが、マトリクス状に配置される複数のマス目から構成された表形式のデータに基づき生成された画像データである場合に、当該画像データに基づく画像から、当該画像の端側に位置する空白状態のマス目から構成される非重要領域を除く重要領域を、前記特定領域として抽出する抽出ステップと、
を含むことを特徴とする画像処理方法。
An image processing method performed by an image processing apparatus,
An image acquisition step for acquiring image data;
A plurality of types according to the orientation of the paper and the arrangement of the divided image divided into a plurality of parts by folding back a specific area of the image based on the image data acquired in the image acquisition step with respect to the longitudinal direction. For each layout, an aspect ratio acquisition step for acquiring the aspect ratio of the print area in each layout;
A layout selection step of selecting one layout corresponding to an aspect ratio that is most approximate to the aspect ratio of the specific region among the aspect ratios acquired by the aspect ratio acquisition step;
A division step of generating the divided image from an image based on the image data acquired by the image acquisition step according to the layout selected by the layout selection step;
In accordance with the layout selected in the layout selection step, an image generation step for generating image data in which the divided images generated in the division step are arranged as layout image data;
A print control step of transmitting layout image data generated by the image generation step or print data based on the layout image data to a printing unit;
When the image data acquired by the image acquisition step is image data generated based on tabular data composed of a plurality of cells arranged in a matrix, from the image based on the image data, An extraction step of extracting, as the specific region, an important region excluding a non-important region composed of blank cells located on the edge side of the image;
An image processing method comprising:
JP2012163650A 2012-07-24 2012-07-24 Image processing apparatus, image processing program, and image processing method Active JP6051652B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012163650A JP6051652B2 (en) 2012-07-24 2012-07-24 Image processing apparatus, image processing program, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012163650A JP6051652B2 (en) 2012-07-24 2012-07-24 Image processing apparatus, image processing program, and image processing method

Publications (2)

Publication Number Publication Date
JP2014027335A JP2014027335A (en) 2014-02-06
JP6051652B2 true JP6051652B2 (en) 2016-12-27

Family

ID=50200645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012163650A Active JP6051652B2 (en) 2012-07-24 2012-07-24 Image processing apparatus, image processing program, and image processing method

Country Status (1)

Country Link
JP (1) JP6051652B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108710476A (en) * 2018-05-31 2018-10-26 茂名市粤能电力股份有限公司 The data processing method and system of electrical form

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107206814B (en) * 2015-01-30 2019-02-12 京瓷办公信息系统株式会社 Image forming apparatus
JP6393371B2 (en) * 2017-06-08 2018-09-19 東芝テック株式会社 Registration processing device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0937060A (en) * 1995-07-14 1997-02-07 Fuji Xerox Co Ltd Image processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108710476A (en) * 2018-05-31 2018-10-26 茂名市粤能电力股份有限公司 The data processing method and system of electrical form

Also Published As

Publication number Publication date
JP2014027335A (en) 2014-02-06

Similar Documents

Publication Publication Date Title
JP5963431B2 (en) Image forming apparatus, image display method, and program
US20100231939A1 (en) Image forming apparatus, image forming method, and computer-readable storage medium
JP5949219B2 (en) Image processing system, image processing apparatus, image processing method, and image processing program
US8018618B2 (en) Information processing apparatus that outputs images having same size to single page of recording sheet and computer readable medium
JP6051652B2 (en) Image processing apparatus, image processing program, and image processing method
JP5803346B2 (en) Display device, portable terminal, display device control method and program
JP2019036891A (en) Image processing apparatus, control method thereof, and program
JP5408170B2 (en) Information processing program, information processing apparatus, and information processing method
JP6417134B2 (en) Image reading apparatus, program, image reading method, image reading system, and server system
JP7380169B2 (en) Control program, information processing device
JP6743447B2 (en) Server program, image generation device, and image data generation method
JP6016763B2 (en) Image forming apparatus
JP6624918B2 (en) Information processing apparatus, control method, and program
JP6809050B2 (en) Programs and mobile terminals
JP6809051B2 (en) Programs and mobile terminals
JP2005223833A (en) Multifunctional printer device and image printing program
JP6398945B2 (en) Information-added document generator, program
JP2024077795A (en) IMAGE PROCESSING APPARATUS, IMAGE FORMING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
JP2023019456A (en) Program, information processing apparatus, and control method
JP2017010474A (en) Image processing apparatus
US9001375B2 (en) Medium storing instructions for information processing apparatus and print control apparatus
JP5500340B2 (en) Image processing apparatus, image processing method, and image processing program
JP2014219733A (en) Printing system, information processor, and print control program
JP2024052206A (en) Information processing device, method, and program
JP2014127942A (en) Image editing device and image editing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150615

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160407

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160426

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160530

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161114

R150 Certificate of patent or registration of utility model

Ref document number: 6051652

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150