JP3000800B2 - Dot matrix printer - Google Patents
Dot matrix printerInfo
- Publication number
- JP3000800B2 JP3000800B2 JP4267545A JP26754592A JP3000800B2 JP 3000800 B2 JP3000800 B2 JP 3000800B2 JP 4267545 A JP4267545 A JP 4267545A JP 26754592 A JP26754592 A JP 26754592A JP 3000800 B2 JP3000800 B2 JP 3000800B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- compression
- compressed
- null
- bitmap
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 239000011159 matrix material Substances 0.000 title claims description 9
- 238000007906 compression Methods 0.000 claims description 100
- 230000006835 compression Effects 0.000 claims description 98
- 238000000034 method Methods 0.000 claims description 18
- 230000006837 decompression Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 8
- 238000007405 data analysis Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000012447 hatching Effects 0.000 description 1
Landscapes
- Record Information Processing For Printing (AREA)
- Storing Facsimile Image Data (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Dot-Matrix Printers And Others (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、ユーザが任意に作成し
た文字や図形のビットマップデータを格納し、ホスト装
置からのコード信号により読み出しを行うドットマトリ
ックス型プリンタに関わり、より詳細には上記データの
登録および読み出し技術に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a dot matrix type printer which stores bitmap data of characters and figures arbitrarily created by a user and reads out the data by a code signal from a host device. The present invention relates to data registration and reading techniques.
【0002】[0002]
【従来の技術】プリンタのROM内に文字セットとして
予め格納されている図形や文字以外のパターンを印刷さ
せる場合には、個々のユーザが必要なパターンをビット
マップデータにより作成し、これをプリンタのメモリ装
置に外字データとして登録することが要求される。2. Description of the Related Art When printing a pattern other than a figure or a character stored in a ROM of a printer as a character set in advance, an individual user creates a necessary pattern from bitmap data, and writes this pattern into the printer. It is required to register as external character data in the memory device.
【0003】ところで、このような外字データの登録
は、通常プリンタに内蔵されているバッファなどを構成
しているメモリ装置の一部を割当てることにより行われ
ているが、登録される可能性のある最大サイズのデータ
量に対応した容量を確保しておく必要がある。Incidentally, such registration of external character data is normally performed by allocating a part of a memory device constituting a buffer or the like built in a printer, but there is a possibility that the character data is registered. It is necessary to secure a capacity corresponding to the data size of the maximum size.
【0004】[0004]
【発明が解決しようとする課題】しかしながら、外字の
必要性の度合いはユーザにより区々であり、ユーザによ
っては外字の必要性があまりなく、その場合には外字デ
ータ登録用にとってあるメモリ装置の一部が無駄になっ
てしまうという問題がある。However, the degree of necessity of external characters varies depending on the user, and there is little need for external characters for some users. In this case, one of the memory devices for registering external character data is used. There is a problem that parts are wasted.
【0005】もとより、外字パターンを構成するビット
マップデータを圧縮することにより、データの記憶に必
要なメモリの容量を減少させる手法は、プリンタ内蔵文
字パターン等でメーカ側では利用されているが、これに
は専門的な知識が必要となるため、ただちにユーザによ
る外字データの登録に適用することはできない。A method of compressing bitmap data constituting an external character pattern to reduce the amount of memory required for storing data is used on a maker side for a printer built-in character pattern and the like. Requires specialized knowledge and cannot be immediately applied to user registration of external character data.
【0006】本発明は、このような問題に鑑みてなされ
たものであって、その目的とするところは、ユーザが作
成した外字データをユーザに圧縮操作を強いることな
く、圧縮データに変換してから登録することができ、合
せてメモリを有効に活用できるドットマトリックス型プ
リンタを提供することにある。The present invention has been made in view of such a problem, and an object thereof is to convert external character data created by a user into compressed data without forcing the user to perform a compression operation. It is an object of the present invention to provide a dot matrix type printer which can be registered from the Internet and can effectively utilize the memory.
【0007】[0007]
【課題を解決するための手段】本発明は、ビットマップ
データを複数の方法でそれぞれ圧縮する圧縮手段と、前
記圧縮手段からの複数の圧縮方法による圧縮データを受
けて、最もデータ量が少なくなる圧縮方法による圧縮デ
ータを選択する選択手段と、前記選択手段により選択さ
れた圧縮データを格納する記憶手段と、前記記憶手段か
ら圧縮データを読み出してビットマップデータに復元す
る復元手段とを備えたドットマトリックス型プリンタを
提供する。SUMMARY OF THE INVENTION The present invention provides a compression means for compressing bitmap data by a plurality of methods, respectively, and receiving the compressed data from the compression means by a plurality of compression methods to minimize the data amount. A dot comprising: a selection unit that selects compressed data by a compression method; a storage unit that stores the compressed data selected by the selection unit; and a restoration unit that reads out the compressed data from the storage unit and restores the data to bitmap data. Provide a matrix type printer.
【0008】[0008]
【作用】ビットマップデータが複数の方法で圧縮され
る。これら複数方法の圧縮によりそれぞれ生成されたデ
ータのデータ量が比較され、最もデータ量が少なくなる
圧縮方法による圧縮データが選択されて記憶手段に格納
される。それにより、ユーザが作成した外字パターンデ
ータを、最もデータ量が少なくなる圧縮形態で自動的に
記憶手段に格納できるので、プリンタメモリを有効に活
用できる。The bitmap data is compressed by a plurality of methods. The data amounts of the data respectively generated by the compression by the plurality of methods are compared, and the compressed data by the compression method with the smallest data amount is selected and stored in the storage means. Thus, the external character pattern data created by the user can be automatically stored in the storage unit in a compressed form that minimizes the data amount, so that the printer memory can be effectively used.
【0009】[0009]
【実施例】図1は本発明の一実施例の構成を示すブロッ
ク図であり、1はマイクロコンピュータにより構成され
た制御装置で、インタフェース2を介してホスト装置か
らの信号、例えば外字データや制御コマンドを受取るよ
うになっている。制御装置1にはプリンタとしての機能
を制御するための制御プログラムを格納したメモリ4
や、デフォルトとして用意される文字やパターンのビッ
トマップデータを格納するためのROMや作業RAMを
含む記憶装置5が接続されている。さらに制御装置1に
はインタフェース6を介してビットマップデータを印字
ヘッド8に出力するドライバ7が接続されている。FIG. 1 is a block diagram showing the configuration of one embodiment of the present invention. Reference numeral 1 denotes a control device constituted by a microcomputer, and signals from a host device via an interface 2, such as external character data and control signals. To receive commands. The control device 1 has a memory 4 storing a control program for controlling a function as a printer.
Also, a storage device 5 including a ROM and a working RAM for storing bitmap data of characters and patterns prepared as defaults is connected. Further, a driver 7 for outputting bitmap data to the print head 8 is connected to the control device 1 via the interface 6.
【0010】図2は、上述の制御装置1を構成している
マイクロコンピュータが果たすべき機能を示すブロック
図である。データ解析部10はホスト装置から入力され
る信号を解析し、外字データ、メモリのアドレス信号、
メモリの選択および制御信号等を出力する。FIG. 2 is a block diagram showing functions to be performed by a microcomputer constituting the control device 1 described above. The data analysis unit 10 analyzes a signal input from the host device, and outputs external character data, a memory address signal,
It outputs memory selection and control signals.
【0011】データ解析部10から出力されたアドレス
信号はRAM17および予めデフォルトのフォントを登
録してあるROM16にアドレス指定のために与えら
れ、また、データ解析部10からの選択信号及び制御信
号は、ROM16およびRAM17の選択と書込み/読
み出し動作の制御を行うために、ROM16およびRA
M17に与えられる。The address signal output from the data analyzer 10 is given to the RAM 17 and the ROM 16 in which a default font is registered in advance for address designation. The selection signal and the control signal from the data analyzer 10 are: In order to select the ROM 16 and the RAM 17 and control the write / read operation, the ROM 16 and the RA
M17.
【0012】データ解析部10から出力される外字デー
タは、ビットマップデータ作成部11に入力される。こ
のビットマップデータ作成部11はバッファメモリを有
し、外字データに従うビットマップデータを作成してバ
ッファメモリのX−Y座標エリア上に展開する。ビット
マップデータ作成部11のバッファメモリに展開されて
いるビットマップデータはヌル列除去部12により読み
出される。ヌル列除去部12は、このビットマップデー
タ(例えば図4)中で、印字ヘッド8のドット形成素子
(例えば、印字ピン)の配列方向(図4の縦方向)に一
列に連続して並ぶデータ群(以下、データ列という)の
全データがドット非形成(つまり、ヌル(null))
を示すデータ(以下、ヌルデータという)であるか否か
をチェックし、全データがヌルデータであるデータ列
(以下、ヌル列という)が存在する場合にはこれを削除
する(これをプレ圧縮処理という)。そして、このヌル
列除去部12から出力されるプレ圧縮処理後のビットマ
ップデータは、複数種類の圧縮モードを備えた圧縮部1
3に入力される。この圧縮部13は複数の圧縮モードで
それぞれプレ圧縮後のビットマップデータを圧縮する。
各圧縮モードにより圧縮されたビットマップデータ(以
下、圧縮データという)は、圧縮されないプレ圧縮後の
ビットマップデータ(以下、非圧縮データという)と共
に比較部14に送られ、ここで各圧縮データおよび非圧
縮データのデータ量が比較されて、データ量が最も少な
くなる圧縮データ又は非圧縮データが選択される。そし
て、この比較部14により選択されたデータは登録部1
5に渡されて、後述するハーフ情報、左側スペース情
報、右側スペース情報、圧縮モード情報とともにRAM
17に書き込まれる。The external character data output from the data analyzer 10 is input to a bitmap data generator 11. The bitmap data creation unit 11 has a buffer memory, creates bitmap data according to external character data, and develops the bitmap data on the XY coordinate area of the buffer memory. The bitmap data developed in the buffer memory of the bitmap data creation unit 11 is read by the null string removal unit 12. The null column removing unit 12 includes, in the bitmap data (for example, FIG. 4), data that are continuously arranged in a line in the arrangement direction (vertical direction in FIG. 4) of the dot forming elements (for example, print pins) of the print head 8. All data of a group (hereinafter referred to as a data string) is dot-free (that is, null).
(Hereinafter referred to as null data), and if there is a data string in which all data is null data (hereinafter referred to as null string), this is deleted (this is referred to as pre-compression processing). ). The bitmap data after the pre-compression processing output from the null string removing unit 12 is used for the compression unit 1 having a plurality of compression modes.
3 is input. The compression unit 13 compresses the bitmap data after the pre-compression in a plurality of compression modes.
Bitmap data compressed in each compression mode (hereinafter, referred to as compressed data) is sent to the comparing unit 14 together with uncompressed pre-compressed bitmap data (hereinafter, referred to as uncompressed data). The data amount of the uncompressed data is compared, and the compressed data or the uncompressed data having the smallest data amount is selected. The data selected by the comparison unit 14 is stored in the registration unit 1
5 together with half information, left space information, right space information and compression mode information to be described later.
17 is written.
【0013】ROM16又はRAM17から読み出され
たデータは、圧縮形態判定部18に入力され、ここでそ
のデータがどの圧縮モードで圧縮されたか又は圧縮され
ないかが識別され、この圧縮形態判定部18は、上記識
別結果を対応する圧縮復元部19内のいずれかの復元モ
ジュール19a〜19dに、ROM16又はRAM17
から読出されたデータを与える。圧縮復元部19は、R
AM17からのデータに対しては、ハーフ情報、左側ス
ペース情報、右側スペース情報、圧縮モード情報等のデ
ータに基づいて圧縮データをプレ圧縮後のビットマップ
データに復元する。そして、この圧縮復元部19から出
力されたビットマップデータはヌル列復元部20に入力
され、ここでヌル列除去部12において除去されたヌル
列が追加されて元のビットマップデータに復元され、そ
してインタフェース6へ送られて印字が行われる。The data read from the ROM 16 or the RAM 17 is input to a compression mode determination unit 18 where it is identified which compression mode the data is compressed in or not, and the compression mode determination unit 18 The ROM 16 or the RAM 17 stores the identification result in one of the decompression modules 19a to 19d in the corresponding compression decompression unit 19.
Gives the data read from The compression / decompression unit 19 calculates R
For the data from the AM 17, the compressed data is restored to bitmap data after pre-compression based on data such as half information, left space information, right space information, and compression mode information. Then, the bitmap data output from the compression / decompression unit 19 is input to a null sequence decompression unit 20, where the null sequence removed by the null sequence removal unit 12 is added and restored to the original bitmap data. Then, it is sent to the interface 6 and printing is performed.
【0014】このような構成において、ホスト装置から
外字登録の要求があった場合、データ解析部10におい
てそのことが認識され、前記選択信号によってRAM1
7がイネーブルにされ、そして、ホスト装置からの外字
データが前述したように最適の形態で圧縮されて圧縮後
のデータがRAM17にデータとして与えられ、同時に
アドレス信号によりRAM17にアドレス指定がなさ
れ、かつ制御信号によりRAM17が書き込み動作させ
られ、それによりRAM17に外字の圧縮データおよび
前述した付随する情報が登録される。この場合におい
て、外字データに対してなされる処理の詳細は以下の通
りである。In such a configuration, when a request for registration of an external character is received from the host device, the data analysis unit 10 recognizes the request, and the RAM 1 is received by the selection signal.
7 is enabled, the external character data from the host device is compressed in the optimum form as described above, and the compressed data is provided to the RAM 17 as data, and at the same time, the address is specified in the RAM 17 by an address signal, and The control signal causes the RAM 17 to perform a write operation, whereby the compressed data of the external character and the above-described accompanying information are registered in the RAM 17. In this case, the details of the processing performed on the external character data are as follows.
【0015】まず、作成部11において、ホスト装置か
ら入力された外字データがドットパターンを表したビッ
トマップデータに変換される。続いてこのビットマップ
データはヌル列除去部12に送られ、ここでヌル列の除
去(プレ圧縮処理)が行われる。その動作は次のような
ものである。ビットマップデータの左端からヌル列が連
続する数を数え、その列の数をもって左側ヌル情報と
し、その列の数だけ左端から連続するヌル列を削除す
る。次いで、ハーフ情報として、残りのビットマップデ
ータの全体に亘って1列おきにヌル列が存在するか否か
をチェックし、1列おきにヌル列が存在しない場合には
ハーフ有りフラッグをOFF、また1列おきにヌル列が
存在するときはハーフ有りフラッグをONとする。次い
で、右端からヌル列が連続する数を数え、その列の数を
もって右ヌル情報とし、その列の数だけ右端から連続す
るヌル列を削除する。そして、ハーフ有りフラッグがO
Nの場合、つまり1列おきにヌル列が存在する場合には
この1列おきのヌル列を削除する。ハーフ有りフラッグ
がOFFの場合には、更なるヌル列の削除は行わない。
このようなプレ圧縮処理が終了した段階で、ビットマッ
プデータのバイト数を計算する。First, the creation unit 11 converts the external character data input from the host device into bitmap data representing a dot pattern. Subsequently, the bitmap data is sent to the null string removing unit 12, where the null string is removed (pre-compression processing). The operation is as follows. The number of consecutive null columns from the left end of the bitmap data is counted, the number of the columns is used as left-side null information, and null columns that are consecutive from the left end by the number of columns are deleted. Next, as half information, it is checked whether or not there is a null column every other column throughout the remaining bitmap data. If there is no null column every other column, the half flag is turned off. If a null row exists every other row, the half-present flag is turned ON. Next, the number of consecutive null columns from the right end is counted, the number of the columns is used as right null information, and null columns consecutive from the right end are deleted by the number of columns. And the flag with half is O
In the case of N, that is, when there is a null column every other column, the null column every other column is deleted. When the flag with half is OFF, no further null row is deleted.
When the pre-compression process is completed, the number of bytes of the bitmap data is calculated.
【0016】続いて、圧縮部13においてプレ圧縮処理
後のビットマップデータの更なる圧縮が行われる。この
実施例では3つの圧縮モードを挙げるが、それぞれの動
作は次の通りである。Subsequently, the compression unit 13 further compresses the bitmap data after the pre-compression processing. In this embodiment, three compression modes will be described. The operation of each mode is as follows.
【0017】第1の圧縮部(第1圧縮モード)13a
は、プレ圧縮後のビットマップデータ全体を見たときに
そのパターンが縦の中心線に対して左右対称であるか否
かをチェックし、対称である場合には中心線でデータを
左右に分割して、中心線から一方側のデータだけを残
す。First compression section (first compression mode) 13a
Checks whether the pattern is symmetrical with respect to the vertical center line when looking at the entire bitmap data after pre-compression, and if so, splits the data to the left and right at the center line Then, only data on one side from the center line is left.
【0018】第2の圧縮部(第2圧縮モード)13b
は、左右隣接するデータバイト(データ列内で1バイト
を構成するデータ群で、例えば図4ではデータ列の上半
分および下半分がそれぞれデータバイトである)同士で
排他的論理和を演算してその同一性をチェックする。左
右隣接するデータバイトが同一である場合には一方(例
えば右側)のデータバイトを削除し、異なる場合には両
方のバイトを残す。Second compression section (second compression mode) 13b
Is an exclusive-OR operation between adjacent left and right data bytes (a data group constituting one byte in the data string, for example, in FIG. 4, the upper half and the lower half of the data string are respectively data bytes). Check its identity. If the left and right adjacent data bytes are the same, one (eg, right) data byte is deleted, and if different, both bytes are left.
【0019】第3の圧縮部(第3圧縮モード)13c
は、対称性や隣接するデータバイトの同一性の判断を行
うことなく、ヌルのデータだけからなるデータバイト
(以下、ヌルバイトという)があるか否かを判断し、あ
る場合にはそのヌルバイトを削除し、それ以外のデータ
は残す。Third compression section (third compression mode) 13c
Determines whether there is a data byte consisting of only null data (hereinafter referred to as null byte) without determining the symmetry or the identity of adjacent data bytes, and deletes the null byte if there is one And keep other data.
【0020】このような圧縮を行った後、それぞれの圧
縮モードによる圧縮データのデータ量が計算され、比較
部14において、圧縮を施さない場合も含めて各圧縮デ
ータのデータ量が比較され、そして、一番データ量が少
ない圧縮モードが最適な圧縮モードと判断される。そし
て、この最適モードで圧縮された圧縮データはこれに付
随するハーフ情報、左側ヌル情報、右側ヌル情報および
圧縮モード情報等と共に登録部15に送られてRAM1
7に登録される。After performing such compression, the data amount of the compressed data in each compression mode is calculated, and the comparison unit 14 compares the data amount of each compressed data including the case where no compression is performed, and , The compression mode having the least amount of data is determined to be the optimal compression mode. The compressed data compressed in the optimal mode is sent to the registration unit 15 together with the accompanying half information, left null information, right null information, compression mode information, etc.
7 is registered.
【0021】図3は、RAM17内の1つの外字に割当
てられたメモリ領域の構造を示す。サブアドレス0番に
はハーフ情報、1番に左側ヌル情報、2番に右側ヌル情
報、3番に圧縮モード情報が格納される。サブアドレス
4番からm番までの領域には、削除バイト情報が格納さ
れる。削除バイト情報とは、最適圧縮モードによって削
除されたデータバイトのアドレスを示すもので、このメ
モリ領域の各ビットがビットマップデータ内での各バイ
トアドレスに対応しており、削除されたバイトのアドレ
スに対応するビットにデータ“1”が書き込まれる。サ
ブアドレスm+1番からn番までの領域には圧縮データ
が格納される。FIG. 3 shows the structure of a memory area assigned to one external character in the RAM 17. The sub address 0 stores half information, the left null information, the right null information, the compression mode information, and the compression mode information. Deleted byte information is stored in the areas from the sub-addresses 4 to m. The deleted byte information indicates the address of the data byte deleted by the optimal compression mode. Each bit of this memory area corresponds to each byte address in the bitmap data, and the address of the deleted byte Is written to the bit corresponding to. Compressed data is stored in the subaddresses m + 1 to n.
【0022】このような順序で登録された外字を印字す
る場合には、まずホスト装置からの外字印字要求を受け
たデータ解析部10が選択信号、アドレス信号及び制御
信号をRAM17に与え、そこに登録されている外字の
圧縮データ、およびそれに付随するハーフ情報、左側ヌ
ル情報、右側ヌル情報および圧縮モード情報等の情報が
読み出され、圧縮形態判定部18に送られる。圧縮形態
判定部18では送られてきた情報を受けて、最適圧縮モ
ードに対応する復元モジュールに外字データを送る。つ
まり、第1の圧縮モードで圧縮された場合には第1圧縮
復元部19aに、第2の圧縮モードで圧縮された場合に
は第2圧縮復元部19bにというように外字データを送
る。そして、この復元部19により復元が成された後、
復元されたデータはヌル列復元部20に送られ、ここで
ハーフ情報、左側ヌル情報および右側ヌル情報に基づい
てヌル列の復元が行われ、もとのビットマップデータが
再現され、これが印字される。When printing external characters registered in such an order, first, the data analysis unit 10 which has received a request for external character printing from the host device supplies a selection signal, an address signal, and a control signal to the RAM 17, and the RAM 17 receives the request signal. The registered external character compressed data and the associated half information, left null information, right null information, compression mode information, and other information are read and sent to the compression mode determination unit 18. Upon receiving the transmitted information, the compression mode determination unit 18 transmits the external character data to the decompression module corresponding to the optimal compression mode. That is, external character data is sent to the first compression / decompression unit 19a when compressed in the first compression mode and to the second compression / decompression unit 19b when compressed in the second compression mode. After the restoration is performed by the restoration unit 19,
The restored data is sent to the null string restoring unit 20, where the null string is restored based on the half information, left null information and right null information, and the original bitmap data is reproduced and printed. You.
【0023】以上の動作を図4のビットマップデータを
例として用い具体的に説明する。The above operation will be specifically described using the bit map data of FIG. 4 as an example.
【0024】圧縮操作の前にヌル列の除去(プレ圧縮)
を行うが、この動作の流れは図5に示してある。まず左
側ヌル列数がチェックされるが、今の場合「A」および
「B」の列が左側ヌル列であるので、この列数2が左側
ヌル情報として登録され、この2列は削除される。次に
右側から順番に1列おきにヌル列が存在するか否かがチ
ェックされるが、今の場合1列おきに「d」、「b」、
・・・、「F」、「D」というヌル列が存在するのでハ
ーフ有りフラッグはONとなる。次いで右端のヌル列
「e」、「d」が検出され、この列数2を右ヌル情報と
して登録するとともに、この2列のヌル列を削除する。
さらにハーフ有りフラッグがONとなっているので、1
列おきに存在するヌル列を削除する。このような手順に
より全てのヌル列が削除され、図6に示すようなビット
マップデータが得られる。このビットマップデータでは
1データ列の半分が1バイトに相当するので、このビッ
トマップデータのデータ量は28バイトとなる。ここ
で、上側のデータバイトは偶数のバイトアドレスが与え
られ、下側のデータバイトには奇数のバイトアドレスが
与えられる。Eliminating null strings before compression (pre-compression)
The flow of this operation is shown in FIG. First, the number of null columns on the left side is checked. In this case, since the columns “A” and “B” are null columns on the left side, this column number 2 is registered as null information on the left side, and these two columns are deleted. . Next, it is checked whether there is a null column every other column in order from the right side. In this case, “d”, “b”,
.., "F" and "D" are present, so the half-present flag is ON. Next, the rightmost null strings “e” and “d” are detected, and the number of columns 2 is registered as right null information, and the two null strings are deleted.
Furthermore, since the flag with half is ON, 1
Remove null columns that exist every other column. By such a procedure, all null strings are deleted, and bitmap data as shown in FIG. 6 is obtained. In this bitmap data, since half of one data string corresponds to one byte, the data amount of this bitmap data is 28 bytes. Here, the upper data byte is given an even byte address, and the lower data byte is given an odd byte address.
【0025】続いてこの図6のデータが圧縮部13にお
いて圧縮される。最初に第1の圧縮モードについて説明
する。この動作の流れは図7のフローチャートに示して
ある。また、圧縮の様子を図8に示す。まずパターン全
体を見て、中心線に対して左右対称か否かがチェックさ
れ、左右対称の場合にはビットマップデータは左右に2
分され、左右対称であることを示す対称フラッグがセッ
トされる。そして一方の側(例えば左側)のデータだけ
を取出し、データ量を算出する。左右対称でない場合に
はこの圧縮モードは圧縮をしない。図8のハッチング部
が圧縮によって削除されるデータバイトである。この場
合は圧縮前のデータ量が28バイトであったから、圧縮
後はその半分の14バイトである。Subsequently, the data shown in FIG. First, the first compression mode will be described. The flow of this operation is shown in the flowchart of FIG. FIG. 8 shows the state of compression. First, the entire pattern is checked to determine whether it is symmetric with respect to the center line.
And a symmetric flag indicating that it is symmetric is set. Then, only the data on one side (for example, the left side) is extracted, and the data amount is calculated. If not symmetric, this compression mode does not compress. The hatched portion in FIG. 8 is a data byte deleted by compression. In this case, since the data amount before compression was 28 bytes, it is 14 bytes which is half of the data amount after compression.
【0026】次に第2の圧縮モードについて説明する。
この動作の流れは図9のフローチャートに示してある。
また、圧縮の様子を図10に示す。まず左右隣接する2
つのデータバイトを比べそれらが同一であるか否かをチ
ェックする。同一である場合には一方のデータバイトを
削除し、同一でない場合にはそのままで、それぞれ次の
列に進みまた隣あった2つのデータバイトを比べる。こ
れをすべての隣あったデータバイトの組について行う。
今の場合、図10において左側から見ていくと、アドレ
ス0,2,4,6,8番のバイトはそれぞれ隣同士同一
ではないのでそのままである。そして、アドレス8番と
10番が同一であるので10番バイトを削除し、次に8
番と12番を比べると同一ではないのでそのままにして
おく。そして次に12番と14番を比べると、これらは
同一なので14番バイトを削除する。この動作を続けて
いった結果、図10にハッチングで示されるバイトが削
除される。この場合の圧縮後のデータ量はもとのデータ
量から6バイト分減っているので22バイトである。Next, the second compression mode will be described.
The flow of this operation is shown in the flowchart of FIG.
FIG. 10 shows the state of compression. First of all, 2
Compare two data bytes and check if they are identical. If they are the same, one data byte is deleted. If they are not the same, the process proceeds to the next column and the two adjacent data bytes are compared. This is done for all adjacent sets of data bytes.
In this case, when viewed from the left side in FIG. 10, the bytes at addresses 0, 2, 4, 6, and 8 are not identical because their neighbors are not the same. Then, since the addresses 8 and 10 are the same, the 10th byte is deleted.
When the numbers are compared with the twelfth, they are not the same, so they are left as they are. Then, comparing the twelfth and the fourteenth, since they are the same, the fourteenth byte is deleted. As a result of continuing this operation, the bytes indicated by hatching in FIG. 10 are deleted. In this case, the data amount after compression is 22 bytes since it is reduced by 6 bytes from the original data amount.
【0027】次に第3の圧縮を説明する。この動作の流
れは図11のフローチャートに示してあるように、バイ
トの全ビットがスペースである場合にそのバイトを削除
するもので、すべてのバイトについてこれを行なう。今
の場合には、図12において全ビットがスペースなのは
アドレス7番と21番のバイトだけなので、この2バイ
トが削除される。圧縮後のデータ量は圧縮前のデータ量
から2バイト減っただけなので26バイトとなる。Next, the third compression will be described. As shown in the flowchart of FIG. 11, this operation flow deletes the byte when all the bits of the byte are spaces, and performs this for all the bytes. In this case, in FIG. 12, all the bits are spaces only in the 7th and 21st bytes of the address, so these 2 bytes are deleted. The data amount after compression is 26 bytes since only the data amount before compression is reduced by 2 bytes.
【0028】以上説明した第1、第2および第3圧縮モ
ードを行った後のデータ量および無圧縮のデータのデー
タ量を比較してみると、第1圧縮モードによるものが最
も少ないのでこのモードにより圧縮されたデータがRA
M17に登録されることになる。When comparing the data amount after performing the first, second and third compression modes described above and the data amount of uncompressed data, since the data amount in the first compression mode is the smallest, this mode is used. Is compressed by RA
It will be registered in M17.
【0029】なお、この実施例においては3種類の圧縮
方法の中から最適な圧縮方法を選択するようにしている
が、他の圧縮方法、例えば1バイト隔てたデータバイト
同士のパターンの同一性を判定したり、3バイト以上に
亘って同一パターンが連続する場合には先頭のバイトと
同一パターンのバイト数とを圧縮データとするような圧
縮方法も適宜採用することができる。In this embodiment, the optimum compression method is selected from the three types of compression methods. However, other compression methods, for example, the pattern similarity between data bytes separated by one byte are determined. If the same pattern continues over 3 bytes or more, a compression method that uses the first byte and the number of bytes of the same pattern as compressed data can be appropriately adopted.
【0030】[0030]
【発明の効果】以上説明したように、本発明によれば、
通常の外字作成と同様の手順によりビットマップデータ
を作成するだけで、自動的に最適な圧縮形態で圧縮され
てからメモリに登録されるので、メモリの容量を有効に
使うことができる。As described above, according to the present invention,
Just by creating bitmap data in the same procedure as that for creating an external character, the data is automatically compressed in an optimal compression form and registered in the memory, so that the memory capacity can be used effectively.
【図1】本発明に係わる一実施例の概略的な全体構成を
示すブロック図FIG. 1 is a block diagram showing a schematic overall configuration of an embodiment according to the present invention.
【図2】同実施例の制御装置の機能を示すブロック図FIG. 2 is a block diagram showing functions of the control device of the embodiment.
【図3】同実施例の外字が登録されるRAMのエリアの
構造を示す図FIG. 3 is a diagram showing a structure of an area of a RAM in which external characters are registered according to the embodiment;
【図4】同実施例の動作説明に用いたビットマップデー
タの例を示す図FIG. 4 is a view showing an example of bitmap data used for explaining the operation of the embodiment;
【図5】同実施例のプレ圧縮の工程を示すフローチャー
トFIG. 5 is a flowchart showing a pre-compression step of the embodiment.
【図6】同実施例によるプレ圧縮後のビットマップデー
タの例を示す図FIG. 6 is a diagram showing an example of bitmap data after pre-compression according to the embodiment.
【図7】同実施例の第1圧縮モードの工程を示すフロー
チャートFIG. 7 is a flowchart showing steps in a first compression mode of the embodiment.
【図8】同実施例による第1圧縮の様子を示す図FIG. 8 is a view showing a state of a first compression according to the embodiment;
【図9】同実施例の第2圧縮モードの工程を示すフロー
チャートFIG. 9 is a flowchart showing steps in a second compression mode according to the embodiment.
【図10】同実施例による第2圧縮の様子を示す図FIG. 10 is a diagram showing a state of a second compression according to the embodiment.
【図11】同実施例の第3圧縮モードの工程を示すフロ
ーチャートFIG. 11 is a flowchart showing steps of a third compression mode of the embodiment.
【図12】同実施例による第3圧縮の様子を示す図FIG. 12 is a diagram showing a state of a third compression according to the embodiment.
10 データ解析部 11 ビットマップ作成部 12 ヌル列除去部 13 圧縮部 14 比較部 15 登録部 16 ROM 17 RAM 18 圧縮形態判定部 19 圧縮復元部 20 ヌル列復元部 DESCRIPTION OF SYMBOLS 10 Data analysis part 11 Bit map preparation part 12 Null string removal part 13 Compression part 14 Comparison part 15 Registration part 16 ROM 17 RAM 18 Compression form determination part 19 Compression restoration part 20 Null string restoration part
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) B41J 5/44 B41J 2/485 B41J 5/30 G06F 3/12 H04N 1/21 H04N 1/411 ──────────────────────────────────────────────────の Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) B41J 5/44 B41J 2/485 B41J 5/30 G06F 3/12 H04N 1/21 H04N 1/411
Claims (3)
外字のビットマップデータが入力され、前記外字のビッ
トマップデータから所定条件を満たすヌルデータを除去
して、プレ圧縮ビットマップデータを生成するプレ圧縮
手段と、 前記プレ圧縮ビットマップデータを受けて、このプレ圧
縮ビットマップデータを複数の圧縮方法で圧縮して圧縮
データを生成するメイン圧縮手段であって、 前記プレ圧縮ビットマップデータ全体を見たときにその
パターンが縦 の中心線に対して左右対称であるか否かを
チェックし、対象である場合 には前記中心線で前記プレ
圧縮ビットマップデータを左右に分割して、 前記中心線から一方側のデータだけを残した圧縮データ
を生成する、第 1圧縮手段と、 前記プレ圧縮ビットマップデータの左右隣接するデータ
列の同一性を チェックし、前記左右隣接するデータ列が
同一である場合には、一方の データ列だけを残した圧縮
データを生成する、第2圧縮手段と、 を少なくとも有するメイン圧縮手段と、 前記メイン圧縮手段からの複数の圧縮方法による圧縮デ
ータを受けて、最もデータ量が少なくなる圧縮方法によ
る圧縮データを選択する選択手段と、 前記選択手段により選択された圧縮データを格納する記
憶手段と、前記記憶手段に格納された外字の圧縮データを印字する
要求があった場合に、 前記記憶手段から圧縮データを読
み出してビットマップデータに復元する復元手段とを備
えたドットマトリックス型プリンタ。1. When a request for registering an external character is made,
The external character bitmap data is input, and the external character bitmap data is input.
Null data that satisfies specified conditions is removed from map data
Pre-compression to generate pre-compression bitmap data
And means, receiving said pre-compressed bit map data, the pre-pressure
Compresses compressed bitmap data using multiple compression methods
Main compression means for generating data, wherein when the entire pre-compressed bitmap data is viewed,
Whether the pattern is symmetrical about the vertical centerline
Check, and if it is the target,
Compressed data obtained by dividing the compressed bitmap data to the left and right, leaving only data on one side from the center line
Generating a, a first compression means, the data for the left and right adjacent said pre-compressed bit map data
Check the identity of the columns and check that the adjacent left and right data columns
If they are the same, compression leaving only one data string
A main compression unit having at least a second compression unit for generating data, and receiving compressed data from the main compression unit by a plurality of compression methods, and selecting compressed data by a compression method that minimizes the data amount. Selecting means, storing means for storing the compressed data selected by the selecting means, and printing the compressed data of the external character stored in the storing means
A dot matrix type printer comprising: a decompression means for reading out compressed data from the storage means and decompressing it into bitmap data when requested .
ンタにおいて、前記メイン圧縮手段は、前記プレ圧縮ビットマップデー
タを受けて、このプレ圧縮ビットマップデータにヌルの
データがあるか否かをチェックし、前記ヌルのデータが
ある場合には、そのヌルのデータのみを削除した圧縮デ
ータを生成する、第3メイン圧縮手段をさらに有するド
ットマトリックス型プリンタ。 2. The dot matrix type printer according to claim 1, wherein said main compression means includes a pre-compression bitmap data.
The pre-compressed bitmap data
Check if there is data, and if the null data is
In some cases, compressed data from which only null data has been deleted
And a third main compression means for generating data.
Matrix printer.
ンタにおいて、前記プレ圧縮手段は、 前記外字のビットマップデータにおける左端から連続す
るヌルのデータ列と右端から連続するヌルのデータ列と
を削除し、 この削除後のビットマップデータに1列おきにヌルのデ
ータ列が存在する場合には、この1列おきのヌルのデー
タ列を削除する、 ドットマトリックス型プリンタ。 3. The dot matrix type printer according to claim 1, wherein said pre-compression means is configured to continuously execute the character from the left end in the bitmap data of the external character.
Null data sequence and null data sequence that continues from the right end
And delete null data every other column in the deleted bitmap data.
If there is a data column, this alternate null data
Dot matrix printer that deletes data rows .
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4267545A JP3000800B2 (en) | 1992-10-06 | 1992-10-06 | Dot matrix printer |
| US07/985,969 US5903715A (en) | 1991-12-06 | 1992-12-04 | Dot matrix printer having reduced bit map data storage |
| DE69219444T DE69219444T2 (en) | 1991-12-06 | 1992-12-07 | Dot matrix printer and method for storing and retrieving bit map data |
| SG1996004724A SG48979A1 (en) | 1991-12-06 | 1992-12-07 | Dot matrix printer and method for storing and retrieving bit map data |
| EP92120834A EP0545447B1 (en) | 1991-12-06 | 1992-12-07 | Dot matrix printer and method for storing and retrieving bit map data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4267545A JP3000800B2 (en) | 1992-10-06 | 1992-10-06 | Dot matrix printer |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH06115181A JPH06115181A (en) | 1994-04-26 |
| JP3000800B2 true JP3000800B2 (en) | 2000-01-17 |
Family
ID=17446309
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4267545A Expired - Fee Related JP3000800B2 (en) | 1991-12-06 | 1992-10-06 | Dot matrix printer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3000800B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2814970B2 (en) * | 1995-11-29 | 1998-10-27 | 日本電気株式会社 | Printer system |
-
1992
- 1992-10-06 JP JP4267545A patent/JP3000800B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH06115181A (en) | 1994-04-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0434345B2 (en) | ||
| JPH02228879A (en) | Method of compacting data | |
| US5903715A (en) | Dot matrix printer having reduced bit map data storage | |
| JP3000800B2 (en) | Dot matrix printer | |
| JP3854790B2 (en) | Image processing apparatus and method, and storage medium | |
| JP3031391B2 (en) | Printer | |
| JPH0983809A (en) | Color image signal compression method, image encoding / decoding device, and image processing system | |
| JPH08223428A (en) | Image data compressor and image data expander | |
| JPH0644013A (en) | Print data compression method | |
| JP2001169120A5 (en) | ||
| JP3116732B2 (en) | Lossless bitmap image compression method and method | |
| JPH09294210A (en) | Image processing apparatus and image processing method | |
| JP2958138B2 (en) | Image processing device | |
| JP4058157B2 (en) | Image processing method, image forming apparatus, and recording medium | |
| JP3053196B2 (en) | Image data raster converter | |
| JPH0640121A (en) | Printer | |
| JP3221493B2 (en) | Dot character font compression / decompression methods and their control devices | |
| JP3475180B2 (en) | Printer | |
| JPH09138677A (en) | Character data storage device and character output device | |
| JPH0197663A (en) | Compression of font data | |
| JP3280171B2 (en) | Output device for compressing and holding data and data compression control method | |
| JPH0348924A (en) | printing device | |
| JPS60245088A (en) | Character recognition correction method | |
| JPH02287494A (en) | Character information compressing method | |
| JPH0415832A (en) | Fault processing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071112 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081112 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091112 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091112 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101112 Year of fee payment: 11 |
|
| LAPS | Cancellation because of no payment of annual fees |