JPH10150549A - Image forming device and storage medium - Google Patents

Image forming device and storage medium

Info

Publication number
JPH10150549A
JPH10150549A JP8309476A JP30947696A JPH10150549A JP H10150549 A JPH10150549 A JP H10150549A JP 8309476 A JP8309476 A JP 8309476A JP 30947696 A JP30947696 A JP 30947696A JP H10150549 A JPH10150549 A JP H10150549A
Authority
JP
Japan
Prior art keywords
density
compressed
bit string
data
image data
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.)
Pending
Application number
JP8309476A
Other languages
Japanese (ja)
Inventor
Masatoshi Kadota
政敏 門田
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 JP8309476A priority Critical patent/JPH10150549A/en
Publication of JPH10150549A publication Critical patent/JPH10150549A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a simple image-forming device by which a compressed image with high image quality is generated at high speed. SOLUTION: A read pointer for a head address of an expansion buffer for interleave purpose and a write pointer for an address to store compressed image data after the interleaving are initialized (S6000), bit map data by 4-pixels consecutive in each adjacent line are read according to the read pointer, a reference address to access a conversion table based on the data and errors R0, R1 of adjacent pixels to the data having already been compressed is generated (S6040), and data are read from the conversion table based on the reference address). The compressed image data being part data of the read data are stored in the original expansion buffer according to the write pointer and the other part data are assigned to new errors R0, R1 (S6060), each pointer is updated, and the processing above is repeated until the entire interleaving (compression) of the expansion buffer is finished.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】TECHNICAL FIELD OF THE INVENTION

【0002】[0002]

【従来の技術】レーザプリンタ等の画像形成装置におい
て、出力画像を形成する処理を行う際にその処理に必要
なメモリが不足した場合、出力画像を表すメモリ上の画
像データの解像度を低下させたり、画像データを圧縮し
たりすることによって、画像データを格納するメモリエ
リアを少なくして、処理を続行させるために使用可能な
メモリに割り当てる処理が行われている。
2. Description of the Related Art In an image forming apparatus such as a laser printer, when a memory required for the processing for forming an output image is insufficient when the processing for forming the output image is insufficient, the resolution of image data on the memory representing the output image may be reduced. By compressing the image data, a memory area for storing the image data is reduced, and a process of allocating the memory to an available memory for continuing the process is performed.

【0003】[0003]

【発明が解決しようとする課題】この画像データの解像
度を低下させる方法としては、画像データの奇数位置あ
るいは偶数位置のいずれかを単純に間引く方法やマトリ
クス状のマスクを利用して間引く方法が一般的である。
これらの方式は簡易な処理であるため、処理が短時間で
済むという利点があるが、反面、元の画像データの並び
に規則性がある場合、間引き出力された画像の濃度状態
が元の画像が同一であるにもかかわらず、奇数位置から
印刷されるか偶数位置から印刷されるかと言うような出
力位置によって変化してしまうといった問題点が指摘さ
れている。
As a method of reducing the resolution of the image data, a method of simply thinning out either the odd position or the even position of the image data or a method of thinning using a matrix mask is generally used. It is a target.
These methods have the advantage that the processing can be completed in a short time because the processing is simple, but on the other hand, if the original image data has a regularity, the density state of the thinned-out output image is the original image. It has been pointed out that, despite the fact that they are the same, they vary depending on the output position, such as whether printing is performed from an odd position or from an even position.

【0004】また、例えば、特開平1―122267号
公報に開示されているような元の画像の所定領域の平均
濃度やその領域内での画素の配置状態の評価に基づい
て、間引き方(画像の圧縮方法)を変化させたりする手
法等も提案されている。これらの方法は、圧縮したり間
引いたりした後の画像の品位が向上する一方、ソフトウ
ェアで処理するには処理速度が遅くなったり、ハードウ
ェアで構成するには複雑な構成となってしまうため、コ
ストが高くなってしまう等の問題点がある。
[0004] Further, for example, a thinning method based on an average density of a predetermined area of an original image and an evaluation of an arrangement state of pixels in the area as disclosed in Japanese Patent Application Laid-Open No. 1-122267 are disclosed. Or a method of changing the compression method). While these methods improve the quality of the image after compression or thinning, the processing speed is slow for software processing, or it is complicated to configure with hardware, There are problems such as an increase in cost.

【0005】本発明は、このような従来の技術における
問題点を解決するためになされたのもであり、簡易であ
り、高速に高品位の圧縮画像を作成することを可能とす
る画像形成装置を提供することを目的とする。
The present invention has been made in order to solve such problems in the prior art, and provides an image forming apparatus which is simple and capable of creating a high-quality compressed image at high speed. The purpose is to do.

【0006】[0006]

【課題を解決するための手段】ここには、1つまたはそ
れ以上の発明が記載され、それぞれ以下に述べるような
構成および効果を有する。
SUMMARY OF THE INVENTION One or more inventions are described herein, each having the construction and advantages described below.

【0007】本発明の請求項1に記載の画像形成装置
は、パソコン等の上で動作するアプリケーションソフト
ウェアやイメージスキャナ、デジタルカメラ等の種々の
画像入力源から受信した画像データや、画像を言語(例
えば、実施の形態におけるPCL言語)で記述した言語
表現データを周知の方法により画素に変換して画像デー
タ化したものなどのような複数の画素からなる画像の濃
度を表す元画像データを画像記憶手段に記憶し、複数の
画素からなる圧縮領域を設定し、その圧縮領域を順次移
動させながら、その圧縮領域内の画素数よりも少ない画
素の濃度を表す圧縮画像データを作成し、その圧縮画像
データに基づいて画像を形成する画像形成装置であっ
て、圧縮領域(例えば、実施の形態における画素組)の
各画素に対応する画像データの濃度を前記画像記憶手段
から読み出して、それらの濃度を加算する領域濃度算出
手段と、圧縮領域に関して圧縮画像データとして出力さ
れる濃度と、前記領域濃度算出手段によって算出された
濃度との差に基づく誤差を算出する誤差算出手段と、前
記誤差算出手段により算出した誤差を圧縮領域に対応付
けて記憶する誤差記憶手段と、前記誤差記憶手段に記憶
された注目する圧縮領域に隣接する圧縮領域に対する誤
差と、前記領域濃度算出手段によって算出された濃度と
に基づいて、該注目する圧縮領域の評価濃度を算出する
評価濃度算出手段と、前記評価濃度算出手段によって算
出した評価濃度と所定の閾値と比較に基づいて、所定の
濃度を割り当てて圧縮画像データを生成する生成手段と
を備えたことを特徴とする。
[0007] The image forming apparatus according to the first aspect of the present invention uses an application software operating on a personal computer or the like, image data received from various image input sources such as an image scanner or a digital camera, or an image. For example, original image data representing the density of an image composed of a plurality of pixels, such as image data obtained by converting language expression data described in the PCL language according to the embodiment into pixels by a known method, is stored in an image storage unit. Means, sets a compressed area composed of a plurality of pixels, and sequentially moves the compressed area, creates compressed image data representing the density of pixels smaller than the number of pixels in the compressed area, and generates the compressed image. An image forming apparatus that forms an image based on data, wherein an image corresponding to each pixel of a compressed area (for example, a pixel group in the embodiment) Area density calculating means for reading the density of the data from the image storage means and adding those densities; a density output as compressed image data for the compressed area; and a density calculated by the area density calculating means. Error calculating means for calculating an error based on the difference, error storing means for storing the error calculated by the error calculating means in association with the compression area, and compression adjacent to the compression area of interest stored in the error storing means. Evaluation density calculation means for calculating an evaluation density of the noted compressed area based on an error for the area and the density calculated by the area density calculation means; and an evaluation density calculated by the evaluation density calculation means and a predetermined value. Generating means for generating compressed image data by assigning a predetermined density based on the threshold value and the comparison.

【0008】そして、画像記憶手段に記憶された画像デ
ータに対して複数の画素からなる圧縮領域設定して、そ
の圧縮領域を順次移動させながら、評価濃度算出手段に
より、注目する圧縮領域に隣接し既に処理済みの圧縮領
域に対する誤差を誤差記憶手段から読み出して、それぞ
れの誤差に対して所定の重み付けを行い、領域濃度算出
手段によって算出された濃度に対して所定の重み付けを
行ったものを加算して該圧縮領域の評価濃度を算出し、
生成手段によってこの評価濃度を所定の閾値と比較し
て、その大小により、この圧縮領域に対して所定の濃度
を割り当てることにより圧縮画像データを生成し、この
圧縮画像データとこの圧縮領域の元の濃度との差である
誤差を誤差算出手段により算出し、この誤差を圧縮領域
と対応付けて誤差記憶手段に記憶し、次の圧縮領域の処
理に使用できるようにする。
[0008] Then, a compression area consisting of a plurality of pixels is set for the image data stored in the image storage means, and while the compression area is sequentially moved, the evaluation density calculation means sets the compression area adjacent to the compression area of interest. The error for the compressed region that has already been processed is read from the error storage unit, a predetermined weight is applied to each error, and a value obtained by performing a predetermined weight on the density calculated by the region density calculation unit is added. Calculating the evaluation density of the compressed area,
The generating means compares the evaluation density with a predetermined threshold value, and assigns a predetermined density to the compression area according to the magnitude of the evaluation density to generate compressed image data, and generates the compressed image data and the original of the compression area. An error, which is a difference from the density, is calculated by the error calculating means, and this error is stored in the error storage means in association with the compression area, so that the error can be used for the processing of the next compression area.

【0009】これにより、圧縮領域毎に順次、簡単な演
算と記憶処理を行うだけで、元画像データから圧縮画像
データを作成し、画素数を低減するので、使用する画像
記憶手段の容量を少なくできる。
Thus, the compressed image data is created from the original image data and the number of pixels is reduced by simply performing a simple calculation and storage process for each compressed area, so that the capacity of the image storage means used is reduced. it can.

【0010】また、所定の閾値との比較に基づいて、新
たな濃度を割り当てる際に、割り当てる濃度を元の画像
データの濃度のレンジよりも小さくすることで、画像の
品位は多少低下するが、使用する画像記憶手段の容量を
少なくすることが可能になり、さらに使用メモリを低減
できる。
Further, when assigning a new density based on comparison with a predetermined threshold value, by making the assigned density smaller than the density range of the original image data, the quality of the image is slightly reduced. It is possible to reduce the capacity of the image storage means to be used, and it is possible to further reduce the memory used.

【0011】また、請求項2に記載の画像形成装置は、
上述の構成に加えて、生成手段によって得られた圧縮画
像データを順次前記画像記憶手段に記憶する圧縮画像登
録手段を備えたことを特徴とする。これは、上述のよう
に生成手段により算出した圧縮画像データを圧縮画像登
録手段によって、順次、画像記憶手段の元画像データに
対する上述の圧縮処理が済んだ領域に記憶するものであ
る。
Further, the image forming apparatus according to claim 2 is
In addition to the above configuration, the image processing apparatus further includes a compressed image registration unit that sequentially stores the compressed image data obtained by the generation unit in the image storage unit. In this method, the compressed image data calculated by the generating means is sequentially stored by the compressed image registration means in an area where the above-described compression processing has been performed on the original image data in the image storage means.

【0012】これにより、圧縮画像データは処理済みの
元画像データが記憶されていた画像記憶手段の領域に順
次格納されていくので、元画像データの格納領域とは別
の領域を圧縮画像データに割り当てる必要がなく、ま
た、圧縮処理が終了した時点で、不要になった(従っ
て、他の用途に使用できるように解放してもよい)領域
がまとまって得られるという効果がある。
As a result, the compressed image data is sequentially stored in the area of the image storage means in which the processed original image data is stored. Therefore, an area different from the storage area of the original image data is stored as the compressed image data. There is an effect that there is no need to allocate, and when the compression processing is completed, areas that are no longer needed (and thus may be released so that they can be used for other purposes) can be collectively obtained.

【0013】また、請求項3に記載の画像形成装置にお
いては、前述の画像の濃度が、複数の濃度レベルを有す
るものでなく、例えば、0と1といった2値しか持たな
いものであり、この場合、濃度が1ビットで表させるの
で、より簡易な演算で画素数の低減が可能になり、高速
な処理に適する。
Further, in the image forming apparatus according to the third aspect, the density of the image does not have a plurality of density levels, but has only two values, for example, 0 and 1. In this case, since the density is represented by one bit, the number of pixels can be reduced by a simpler operation, which is suitable for high-speed processing.

【0014】また、本発明の請求項4に記載の画像形成
装置は、前述と同様に複数の画素からなる画像の濃度を
表す元画像データを記憶する画像記憶手段に、複数の画
素からなる圧縮領域とその圧縮領域を少なくとも1つ内
包する評価領域(例えば、実施の形態におけるブロッ
ク)を設定し、その評価領域を順次移動させながら、前
記圧縮領域内の画素数よりも少ない画素の濃度を表す圧
縮画像データを作成し、前記圧縮画像データに基づいて
画像を形成する画像形成装置であって、評価領域の各画
素に対応する画像データの濃度に基づいて、評価ビット
列を作成する評価ビット列作成手段と、注目する評価領
域に対して評価領域の移動方向で隣接し合う圧縮領域に
対して出力される圧縮画像データとその圧縮領域の元画
像データの濃度の差に基づくそれぞれの誤差を誤差ビッ
ト列として作成する誤差ビット列作成手段と、前記評価
ビット作成手段により作成された評価ビット列と、前記
誤差ビット列作成手段により作成された誤差ビット列と
を合成してアドレスを表すアドレスビット列を作成する
アドレスビット列作成手段と、前記アドレスビット列作
成手段によって作成されたアドレスビット列に基づい
て、前記圧縮画像データを示す圧縮ビット列を出力する
変換手段とを備えたことを特徴とする。
In the image forming apparatus according to a fourth aspect of the present invention, the image storage means for storing the original image data representing the density of the image composed of a plurality of pixels is stored in the image storage means. An evaluation area (for example, a block in the embodiment) including at least one area and its compression area is set, and the density of pixels smaller than the number of pixels in the compression area is represented while sequentially moving the evaluation area. An image forming apparatus that creates compressed image data and forms an image based on the compressed image data, wherein an evaluation bit string creating unit creates an evaluation bit string based on the density of image data corresponding to each pixel in an evaluation area And the difference between the density of the compressed image data output to the compressed area adjacent to the evaluation area of interest in the moving direction of the evaluation area and the original image data of the compressed area An error bit string creating means for creating respective errors based on the error bit string, an evaluation bit string created by the evaluation bit creating means, and an error bit string created by the error bit string creating means, and an address bit string representing an address. , And conversion means for outputting a compressed bit string indicating the compressed image data based on the address bit string created by the address bit string creating means.

【0015】これにより、複数の画素からなる圧縮領域
を少なくとも1つ内包する評価領域を設定し、この評価
領域の画素の濃度を示す評価ビット列とこの評価領域の
前に処理を行った際に発生した誤差を示す誤差ビット列
とを作成し、これらのビット列を変換手段に対する入力
ビット列として与えるべく構成し、その結果得られたア
ドレスビット列を変換手段に入力する(アクセスする)
ことにより、変換手段から圧縮画像データを示す圧縮ビ
ット列を得るものである。
Thus, an evaluation area including at least one compression area including a plurality of pixels is set, and an evaluation bit string indicating the density of the pixels in the evaluation area and a processing performed before the evaluation area are performed. An error bit string indicating the error is generated, and these bit strings are configured to be provided as an input bit string to the conversion means, and the resulting address bit string is input (accessed) to the conversion means.
Thus, a compressed bit string indicating the compressed image data is obtained from the conversion means.

【0016】このため、圧縮領域に対する圧縮処理を変
換手段に入力するアドレスビット列のみのデータから実
施できるので、圧縮処理を一連の処理から分離し易くな
り、装置構成の簡易化ができる。
Therefore, since the compression processing for the compression area can be performed from only the data of the address bit string input to the conversion means, the compression processing can be easily separated from a series of processing, and the apparatus configuration can be simplified.

【0017】また、請求項5に記載の画像形成装置は、
請求項4に記載の画像形成装置において、変換手段によ
って得られた圧縮画像データを示す圧縮ビット列を順次
前記画像記憶手段に記憶する圧縮画像データ出力手段を
備えたことを特徴とする。
Further, the image forming apparatus according to claim 5 is
The image forming apparatus according to claim 4, further comprising a compressed image data output unit that sequentially stores a compressed bit string indicating the compressed image data obtained by the conversion unit in the image storage unit.

【0018】これは、上述のように変換手段により出力
された圧縮画像データを圧縮画像データ出力手段によっ
て、順次、画像記憶手段内の元画像データに対する上述
の圧縮処理が済んだ領域に記憶するものである。
In this method, the compressed image data output by the conversion means is sequentially stored by the compressed image data output means in an area in the image storage means where the above-described compression processing has been performed on the original image data. It is.

【0019】これにより、圧縮画像データは処理済みの
元画像データが記憶されていた画像記憶手段の領域に順
次格納されていくので、元画像データの格納領域とは別
の領域を圧縮画像データに割り当てる必要がなく、ま
た、圧縮処理が終了した時点で、不要になった(従っ
て、他の用途に使用できるように解放してもよい)領域
がまとまって得られるという効果がある。
Thus, the compressed image data is sequentially stored in the area of the image storage means in which the processed original image data is stored. Therefore, an area different from the storage area of the original image data is stored as the compressed image data. There is an effect that there is no need to allocate, and when the compression processing is completed, areas that are no longer needed (and thus may be released so that they can be used for other purposes) can be collectively obtained.

【0020】また、請求項6に記載の画像形成装置は、
請求項4あるいは請求項5のいずれかに記載の画像形成
装置において、前記評価領域は、連続する複数の圧縮領
域を内包し、前記変換手段は、前記アドレスビット列中
の誤差ビット列で表される誤差より第1濃度和を算出す
る第1ビット濃度算出手段と、前記アドレスビット列中
の評価ビット列の1つの圧縮領域に対応付けられたビッ
トより第2濃度和を算出する第2ビット濃度算出手段
と、前記第1濃度和と前記第2濃度和とに基づいて評価
濃度を算出し、所定の閾値と比較して、その比較結果に
よって圧縮画像データを作成する閾値手段と、評価領域
内の全ての圧縮領域について、前記閾値手段によって得
られた圧縮画像データと前記第2濃度和との差を新たな
誤差として新たな第1濃度和を求め、前記圧縮領域に隣
接する次の圧縮領域に対する第2濃度和を前記第2ビッ
ト濃度算出手段により求め、これら第1濃度和及び第2
濃度和を前記閾値手段に入力することを繰り返す制御手
段とを備えたことを特徴とする。
Further, the image forming apparatus according to claim 6 is
6. The image forming apparatus according to claim 4, wherein the evaluation area includes a plurality of continuous compression areas, and the conversion unit includes an error represented by an error bit string in the address bit string. A first bit density calculating means for calculating a first density sum, a second bit density calculating means for calculating a second density sum from bits associated with one compression area of the evaluation bit string in the address bit string, A threshold means for calculating an evaluation density based on the first density sum and the second density sum, comparing the evaluation density with a predetermined threshold, and creating compressed image data based on the comparison result; For a region, a new first density sum is obtained using a difference between the compressed image data obtained by the threshold means and the second density sum as a new error, and a next compressed region adjacent to the compressed region is obtained. Against calculated by said second density sum second bit density calculation means, these first density sum and the second
Control means for repeating input of the sum of densities to the threshold means.

【0021】そして、変換手段は、入力されたアドレス
ビット列のみから、そのアドレスビット列を構成する特
定のビット位置に応じて元の画像データの濃度に対応す
る情報を取り出しながら循環的に圧縮処理を繰り返し、
その圧縮結果である圧縮画像データとその時の誤差を出
力する。
The conversion means cyclically repeats the compression processing while taking out information corresponding to the density of the original image data from only the input address bit string according to a specific bit position constituting the address bit string. ,
The compressed image data as the compression result and the error at that time are output.

【0022】これにより、複数の圧縮領域に対する圧縮
処理(変換手段による変換処理)を変換手段に入力され
たアドレスビット列のみのデータから実施できる。この
ため、画像記憶手段を何度にも分けてアクセスする必要
が無く高速化が計られる。
Thus, compression processing (conversion processing by the conversion means) for a plurality of compression areas can be performed from data of only the address bit string input to the conversion means. Therefore, it is not necessary to divide and access the image storage means many times, and the speed is increased.

【0023】更に、請求項7に記載の画像形成装置は、
請求項6に記載の画像形成装置において、前記変換手段
は、前記閾値手段によって順次出力される前記圧縮画像
データをビット列化し、且つ、前記誤差を前記誤差ビッ
ト列作成手段で作成するビット列と同じ形式にビット列
化し出力することを特徴をする。
Further, the image forming apparatus according to claim 7 is
7. The image forming apparatus according to claim 6, wherein the conversion unit converts the compressed image data sequentially output by the threshold unit into a bit string, and the error has the same format as a bit string created by the error bit string creation unit. It is characterized in that it is output as a bit string.

【0024】これにより、圧縮画像データが評価領域単
位毎に出力されるので、画像記憶手段への書き込み処理
が一時期に集中的に実行でき、処理の効率が高まる。特
に、画像データが2値である場合には、この圧縮画像デ
ータを画像記憶手段に格納する処理を簡易化できる。ま
た、出力時の誤差を表すビット列を入力時と同じ形式と
することで、引き続く評価領域の処理への入力が容易に
なり、引き続く処理も含めて高速化できる。
Thus, the compressed image data is output for each evaluation area unit, so that the writing processing to the image storage means can be executed intensively at one time, and the processing efficiency is improved. In particular, when the image data is binary, the process of storing the compressed image data in the image storage unit can be simplified. Further, by making the bit string representing the error at the time of output the same as that at the time of input, input to the processing of the subsequent evaluation area becomes easy, and the speed can be increased including the subsequent processing.

【0025】また、請求項8に記載の画像形成装置は、
請求項4から請求項7のいずれかに記載の画像形成装置
において、前記変換手段が、アドレスビット列と、圧縮
ビット列と誤差ビット列とを合成したビット列と対応付
けて記憶する変換値記憶手段を備えたこと特徴とする。
Further, the image forming apparatus according to claim 8 is
8. The image forming apparatus according to claim 4, wherein the conversion unit includes a conversion value storage unit that stores the address bit sequence, the compression bit sequence, and the error bit sequence in association with a combined bit sequence. It is characterized.

【0026】評価領域で採りうる全ての画像データの組
み合わせと、その評価領域へ入力され得る全ての誤差に
ついての組み合わせに基づいてそれらの組み合わせを表
すアドレスビット列に対応付けて変換値を記憶しておく
ので、変換処理は極めて簡易である。このとき、全ての
組み合わせについて記憶するのでは無く、組み合わせが
発生する頻度が高いものを優先的に記憶することも可能
である。
Based on all combinations of image data that can be taken in the evaluation area and all combinations of errors that can be input to the evaluation area, conversion values are stored in association with address bit strings representing those combinations. Therefore, the conversion process is extremely simple. At this time, instead of storing all the combinations, it is also possible to preferentially store those having a high frequency of occurrence of the combinations.

【0027】なお、前述した画像形成装置の機能は、内
部に設けられたコンピュータシステムにて起動するプロ
グラムとして備えられる。このようなプログラムの場
合、例えば、フロッピーディスク、光磁気ディスク、C
D−ROM等の記憶媒体に記憶し、必要に応じてコンピ
ュータシステム内のメモリにロードして起動することに
より用いることができる。この他、ROMや不揮発性R
AM等を記憶媒体としてプログラムを記憶しておき、こ
のROMあるいは不揮発性RAMをコンピュータシステ
ムに組み込んで用いても良い。
The functions of the image forming apparatus described above are provided as a program that is activated by a computer system provided therein. In the case of such a program, for example, a floppy disk, a magneto-optical disk,
It can be used by storing it in a storage medium such as a D-ROM, loading it into a memory in a computer system as needed, and starting up. In addition, ROM and nonvolatile R
A program may be stored using an AM or the like as a storage medium, and the ROM or the nonvolatile RAM may be incorporated in a computer system and used.

【0028】[0028]

【発明の実施の形態】図1は、上述した発明のいくつか
が適用された、実施の形態としてのレーザプリンタ2お
よびホストコンピュータとしてのパソコン4を表し、レ
ーザプリンタ2とパソコン4とが接続された状態を示し
ている。図2はその概略ブロック図を示している。
FIG. 1 shows a laser printer 2 as an embodiment and a personal computer 4 as a host computer to which some of the above-mentioned inventions are applied. The laser printer 2 and the personal computer 4 are connected to each other. It shows the state where it was turned on. FIG. 2 shows a schematic block diagram thereof.

【0029】レーザプリンタ2とパソコン4とは、所定
の規格、ここでは,IEEE1284の規格に準拠した
パラレルインターフェース6、8を採用しており、その
インターフェース接続用のIEEE1284用ケーブル
10で接続されている。
The laser printer 2 and the personal computer 4 employ parallel interfaces 6 and 8 conforming to a predetermined standard, here, the IEEE 1284 standard, and are connected by an IEEE 1284 cable 10 for connecting the interface. .

【0030】レーザプリンタ2は、パラレルインターフ
ェース6の他に、プログラムにしたがって種々の制御を
実行するCPU12、種々の制御プログラムが格納され
たROM14、CPU12による演算の作業領域や演算
結果や各種設定状態を格納したり後述するパケット構造
体や展開バッファ等のメモリ領域を形成するRAM1
6、給紙センサ、排紙センサおよびトナー残量センサ、
その他のセンザ類18、レーザプリンタ2のメカニカル
な部分を駆動するためのメインモータなどのエンジン2
0、およびレーザプリンタ2に簡単な指示を押しボタン
スイッチ22aにて与えたり、所定の状態を表示するた
めの指示操作や状態をLEDランプ22bで表示する操
作部22を備えている。また、レーザプリンタ2の本体
2aの側面には電源スイッチ3が設けられている。
The laser printer 2 includes, in addition to the parallel interface 6, a CPU 12 for executing various controls in accordance with programs, a ROM 14 in which various control programs are stored, a work area for calculation by the CPU 12, a calculation result, and various setting states. RAM 1 for storing and forming a memory area such as a packet structure and a development buffer described later
6, paper feed sensor, paper discharge sensor and toner remaining amount sensor,
Other sensors 18 such as a main motor for driving mechanical parts of the laser printer 2 and other engines 2
0, and an operation unit 22 for giving simple instructions to the laser printer 2 with a push button switch 22a, and for displaying an instruction operation or state for displaying a predetermined state with an LED lamp 22b. A power switch 3 is provided on a side surface of the main body 2a of the laser printer 2.

【0031】更に、このROM14内には、隣接する2
ラインを1ラインに圧縮するための変換テーブルが記憶
されている。
Further, in the ROM 14, adjacent two
A conversion table for compressing a line into one line is stored.

【0032】この圧縮は、2本の隣接するラインのおの
おの1画素ずつを1つの組として、その組を新たな1画
素に圧縮するものであり、圧縮に際して、対象となる2
つの画素のみでなく、既に圧縮の対象となった隣接する
画素組で発生した誤差を考慮したものである。ここでい
う誤差とは、画素組の合計濃度と圧縮出力された画素の
濃度との差分のことを言う。本実施の形態のレーザプリ
ンタ2においては、誤差としては、過去の2組分を使用
する。
In this compression, each pixel of each of two adjacent lines is taken as one set, and the set is compressed to a new pixel.
This takes into account errors that occur not only in one pixel but also in an adjacent pixel group that has already been compressed. The error referred to here is a difference between the total density of the pixel set and the density of the compressed and output pixels. In the laser printer 2 of the present embodiment, the past two sets are used as errors.

【0033】図11は圧縮される対象となる画素データ
(元画像データ)と圧縮された画素データ(圧縮画像デ
ータ)の関係を示す説明図である。図中、A[i]とB
[i]は隣接する2つのラインのx方向の画素位置iで
の画素情報(濃度)を表し、R[i−1]、R[i−
2]はそれぞれ画素位置i−1、i−2での誤差を示
す。画素位置iでの圧縮後の画素出力F[i]は数1に
示すように補正された画素位置iでの補正入力Im
[i]を閾値dと比較することで求める。
FIG. 11 is an explanatory diagram showing the relationship between pixel data to be compressed (original image data) and compressed pixel data (compressed image data). In the figure, A [i] and B
[I] represents pixel information (density) at the pixel position i in the x direction of two adjacent lines, and R [i−1] and R [i−
2] indicate errors at pixel positions i-1 and i-2, respectively. The pixel output F [i] after compression at the pixel position i is the corrected input Im at the pixel position i corrected as shown in Expression 1.
It is obtained by comparing [i] with a threshold value d.

【0034】[0034]

【数1】 (Equation 1)

【0035】ここで、各係数は画素位置iに近いものほ
ど大きくなるようにするのが良い。すなわち、a≦b≦
cとするのがよい。
Here, it is preferable that each coefficient becomes larger as it is closer to the pixel position i. That is, a ≦ b ≦
It is good to be c.

【0036】また、現在の注目位置iでの画素出力がF
[i]となった場合、その画素位置での誤差R[i]は
数2のように求められる。
The pixel output at the current target position i is F
When [i] is reached, the error R [i] at that pixel position is obtained as in Equation 2.

【0037】[0037]

【数2】 (Equation 2)

【0038】本実施の形態のレーザプリンタ2において
は、この変換テーブルは、1度のテーブルに対するアク
セスで4画素位置分の圧縮画像データを出力するもので
あり、その入力情報と出力情報に関する説明図を図12
に示す。図中、黒枠で囲って示す8画素、すなわち、A
[0]〜A[3]とB[0]〜B[3]が処理の単位と
なるブロックである。
In the laser printer 2 according to the present embodiment, this conversion table outputs compressed image data corresponding to four pixel positions by accessing the table once, and is an explanatory diagram relating to input information and output information. Figure 12
Shown in In the figure, eight pixels surrounded by a black frame, that is, A
[0] to A [3] and B [0] to B [3] are blocks serving as processing units.

【0039】入力情報の1つであるR0とR1はそれぞ
れ次のブロックの最初の画素位置に対して1つ前と2つ
前の画素位置における誤差を表している。これらの値
は、1つ前のブロックでの変換テーブルからの出力値で
もある。A[0]〜A[3]は現在の注目位置iにおけ
るブロック内の偶数ライン(用紙の先頭ラインを0)で
の連続する4つの画素情報であり、B[0]〜B[3]
はそれに隣接する奇数ラインでA[0]〜A[3]にそ
れぞれ対応する位置の画素情報である。F[0]〜F
[3]は、この変換テーブルから出力される各画素位置
に対応する圧縮された画素情報である。これらの画素情
報としては、多値の濃度値であっても、2値の濃度値
(本実施の形態のレーザプリンタ2においては、ドット
のON/OFFの情報となる)であってもよい。多値の
濃度値である場合は、以下で説明するビット割付におい
て1画素に対して複数ビット割り付けることになる。
One of the input information, R0 and R1, respectively represents an error at a pixel position one before and two before the first pixel position of the next block. These values are also output values from the conversion table in the immediately preceding block. A [0] to A [3] are four pieces of continuous pixel information on even-numbered lines (the leading line of the sheet is 0) in the block at the current target position i, and B [0] to B [3].
Is pixel information at positions corresponding to A [0] to A [3] on odd lines adjacent thereto. F [0]-F
[3] is compressed pixel information corresponding to each pixel position output from the conversion table. The pixel information may be a multi-level density value or a binary density value (in the laser printer 2 according to the present embodiment, it is dot ON / OFF information). In the case of a multi-valued density value, a plurality of bits are allocated to one pixel in the bit allocation described below.

【0040】この変換テーブルは、以下に示す数3と数
4に基づいて、入力値R0、R1、A[0]〜A[3]
及びB[0]〜B[3]と、その入力値に基づいて予め
算出した出力値R0、R1及びF[0]〜F[3]とを
対応づけて記憶しているものである。
This conversion table has input values R0, R1, A [0] to A [3] based on the following equations (3) and (4).
And B [0] to B [3] and output values R0, R1 and F [0] to F [3] calculated in advance based on the input values are stored in association with each other.

【0041】[0041]

【数3】 (Equation 3)

【0042】[0042]

【数4】 (Equation 4)

【0043】さらに、図13に示すようにビット割付す
ることにより、上述の入力値を変換テーブルへのアドレ
スを与えるものに構成し、同様にビット割付された出力
値を読み出せるようになっている。つまり、入力として
は、前述のR0とR1に対して各2ビットずつ割り当
て、画素情報に各1ビットずつ、計8ビット割り当てて
あり、全部で12ビットを構成し、4096個の対応す
る出力値をアクセスできるようになっている。出力とし
ては、新しいR0とR1に対して各2ビットずつと変換
された画素出力として4画素に対して各1ビットずつの
4ビット、合わせて8ビット(1バイト)となり、この
変換テーブルの容量は4キロバイトとなっている。
Further, by assigning bits as shown in FIG. 13, the above-described input value is configured to give an address to the conversion table, and the output value similarly assigned bits can be read. . That is, as the input, two bits are assigned to each of the above-described R0 and R1, and one bit is assigned to the pixel information, that is, a total of eight bits are assigned. Can be accessed. As the output, the new R0 and R1 are converted into 2 bits each and the converted pixel output is 4 bits of 1 bit each for 4 pixels, that is, 8 bits (1 byte) in total. Is 4 kilobytes.

【0044】このように構成された圧縮用の変換テーブ
ルは、ROM14の所定アドレス領域に格納されてお
り、後述するようにメモリ不足となった時に適宜使用さ
れる。
The conversion table for compression configured as described above is stored in a predetermined address area of the ROM 14, and is used as needed when a memory shortage occurs as described later.

【0045】一方、パソコン4は、パラレルインターフ
ェース8の他に、プログラムにしたがって種々の制御を
実行するCPU24、種々の制御プログラムが格納され
たROM26、補助記憶装置30内の補助記憶媒体から
読み込まれたOS、アプリケーションソフトあるいはデ
バイスドライバーといったプログラム、データあるいは
CPU24による演算結果や各種設定状態を格納するR
AM28、フロッピーディスク、光磁気ディスクあるい
はCD−ROM等を補助用の記憶媒体として外部からプ
ログラムやデータを取り入れる補助記憶装置30、OS
特有のフォーマットで記憶された画像データをビットマ
ップデータに変換するグラフィックアクセラレータ3
1、演算結果、メニューあるいは印刷時のレーザプリン
タ2側のステータス等の表示を行うディスプレイ32、
ユーザーからの入力を受けるキーボード34、およびマ
ウインターフェース36を介してディスプレイ32上に
表示されているマウスカーソルを移動させ、かつ指示を
入力するためのマウス入力装置38から構成されてい
る。
On the other hand, in addition to the parallel interface 8, the personal computer 4 has a CPU 24 for executing various controls in accordance with programs, a ROM 26 in which various control programs are stored, and an auxiliary storage medium in an auxiliary storage device 30. An OS, application software or a device driver such as a device driver, data or an operation result by the CPU 24 or an R for storing various setting states.
AM28, a floppy disk, a magneto-optical disk, a CD-ROM or the like as an auxiliary storage medium, an auxiliary storage device 30 for taking in programs and data from the outside, an OS
Graphic accelerator 3 for converting image data stored in a specific format into bitmap data
1, a display 32 for displaying calculation results, menus, status of the laser printer 2 at the time of printing, and the like;
It comprises a keyboard 34 for receiving an input from a user, and a mouse input device 38 for moving a mouse cursor displayed on the display 32 via a mouse interface 36 and for inputting an instruction.

【0046】レーザプリンタ2は、本体2aの後部上方
に給紙部2bが設けられ、印刷時には給紙部2b内部の
記憶用紙が1枚ずつレーザプリンタ2内部の印刷部に送
られて、レーザビームにより形成された静電潜像に対し
てトナーによる画像が形成された転写ローラから、トナ
ー画像が記録用紙上に形成された後、加熱定着されて、
排紙トレイ2c上に排出される。
The laser printer 2 is provided with a paper feed unit 2b above the rear part of the main body 2a. At the time of printing, the storage paper inside the paper feed unit 2b is sent one by one to a print unit inside the laser printer 2, and a laser beam is sent. After the toner image is formed on the recording paper from the transfer roller on which the toner image is formed on the electrostatic latent image formed by
The paper is discharged onto the paper discharge tray 2c.

【0047】また、パソコン4は、補助記憶装置30か
ら読み込まれて、プログラムとして起動しているプリン
タドライバーにより、レーザプリンタ2との間で、IE
EE1284用ケーブル10のコントロールラインを介
して、シェイクハンド処理のためにストローブ信号やア
クノリッジ信号といったハンドシェイク信号を相互に交
換しつつ、パソコン4からはIEEE1284用のデー
タラインを介して、ページ記述言語による言語表現デー
タ、イメージデータおよびコマンドの伝送がなされ、そ
の結果に応じて、レーザプリンタ2は後述するプリンタ
処理を行ったり、レーザプリンタ2が双方向通信ができ
る場合はステータスデータをパソコン4側に送信する。
パソコン4側では、印刷時のレーザプリンタ2のステー
タスが得られれば、その状態をディスプレイ32のステ
ータス表示部32aに表示する。
The personal computer 4 is connected to the laser printer 2 by the printer driver read from the auxiliary storage device 30 and activated as a program.
The personal computer 4 exchanges handshake signals such as a strobe signal and an acknowledgment signal for a shake hand process through a control line of the cable for the IEEE1284, and a page description language from the personal computer 4 via a data line for the IEEE1284. The language expression data, the image data, and the command are transmitted. According to the result, the laser printer 2 performs printer processing to be described later, or transmits status data to the personal computer 4 when the laser printer 2 can perform bidirectional communication. I do.
When the status of the laser printer 2 at the time of printing is obtained, the personal computer 4 displays the status on the status display section 32a of the display 32.

【0048】図3に、パソコン4にて起動されるプリン
タドライバーのフローチャートを示す。本処理は、同じ
パソコン4において印刷要求があった場合に起動される
処理である。
FIG. 3 shows a flowchart of the printer driver started by the personal computer 4. This process is started when a print request is issued on the same personal computer 4.

【0049】まず、初期設定により、プリントデータの
送受信の準備を行った(S90)後、アプリケーション
から送信されてくるプリントデータを取得する(S10
0)。次にこのプリントデータが文字の種類と形状とを
表すフォントデータか否かが判定される(S110)。
もしフォントデータであるならば(S110で「YE
S」)、一時的にRAM28上の所定メモリ領域に記憶
される(S120)。
First, the print data transmission / reception is prepared by the initial setting (S90), and then the print data transmitted from the application is acquired (S10).
0). Next, it is determined whether or not the print data is font data representing the type and shape of the character (S110).
If it is font data ("YE" in S110)
S "), and is temporarily stored in a predetermined memory area on the RAM 28 (S120).

【0050】もし、プリントデータがフォントデータ以
外のデータであった場合(S110で「NO」)、例え
ば、ベクトルデータ、その他の図形データ、あるいは画
像等のイメージデータの場合には、ホストベースドフォ
ーマットのビットマップデータに変換されて保持される
(S130)。この変換は、パソコン4に備えられてい
るグラフィックアクセラレータ31にて高速に実行され
る。
If the print data is data other than font data ("NO" in S110), for example, if it is vector data, other graphic data, or image data such as an image, the host-based format is used. The data is converted into bitmap data and held (S130). This conversion is performed at high speed by the graphic accelerator 31 provided in the personal computer 4.

【0051】ステップS120またはステップS130
の処理が終了すると、次に、アプリケーションからのプ
リントデータが終了したか否かが判定される(S14
0)。終了していなければ(S140で「NO」)、終
了するまで前述したステップS100〜S130の処理
を繰り返し、フォントデータはフォントデータ用のメモ
リ領域に蓄積され、ホストベースドフォーマットのビッ
トマップデータはビットマップデータ用のメモリ領域に
蓄積される。
Step S120 or step S130
Is completed, it is determined whether or not the print data from the application has been completed (S14).
0). If the processing has not been completed ("NO" in S140), the processing in steps S100 to S130 described above is repeated until the processing is completed, the font data is stored in the font data memory area, and the bitmap data in the host-based format is stored in the bitmap. It is stored in the data memory area.

【0052】全てのプリントデータの処理が終了すれば
(S140で「YES])、次にビットマップデータが
蓄積されているか否かが判定される(S150)。ステ
ップS130の処理が行われていて、RAM28内の所
定のメモリ領域に、ビットマップメモリが蓄積されてい
れば(S150で「YES」)、蓄積されていたビット
マップデータが圧縮されて、レーザプリンタ2に出力さ
れる(S160)。すなわち、ここでのビットマップデ
ータは、プリントデータ内のバックグランドの内容を表
しているので、レーザプリンタ2にてRAM16内に下
地のビットマップを形成させるために、フォントデータ
よりも先に出力される。
When the processing of all the print data is completed ("YES" in S140), it is next determined whether or not bitmap data is stored (S150). If the bitmap memory is stored in a predetermined memory area in the RAM 28 ("YES" in S150), the stored bitmap data is compressed and output to the laser printer 2 (S160). That is, since the bitmap data here represents the contents of the background in the print data, the bitmap data is output before the font data in order for the laser printer 2 to form a base bitmap in the RAM 16. You.

【0053】なお、この圧縮は、従来、ホストベースド
タイプのプリンタに送信する際に行っていた圧縮と同じ
圧縮様式にて圧縮される。この圧縮様式をレーザプリン
タ2側に知らせるために、圧縮されたビットマップデー
タの先頭には、ホストベースドタイプの圧縮であること
を示すエスケープシーケンス「<Esc>HBP」が付
加される。
Note that this compression is performed in the same compression format as that conventionally performed when transmitting data to a host-based type printer. In order to inform the laser printer 2 of this compression mode, an escape sequence “<Esc> HBP” indicating a host-based type compression is added to the head of the compressed bitmap data.

【0054】次に、ステップS120にて一時的に保持
されていたフォントデータをページ記述言語の1つであ
るPCLフォーマットに変換して、レーザプリンタ2に
出力する(S170)。PCLフォーマットは、例え
ば、座標およびフォント形状を示すコード等から構成さ
れている。
Next, in step S120, the temporarily stored font data is converted into the PCL format, which is one of the page description languages, and output to the laser printer 2 (S170). The PCL format includes, for example, codes indicating coordinates and font shapes.

【0055】こうして、1頁分全てのビットマップデー
タとフォントデータとがレーザプリンタ2側へ出力され
ると、最後に印刷コマンドとして「<FF>」が出力さ
れて(S180)、処理を終了する。次の頁のプリント
データがアプリケーションから送信されてくる場合は、
再度、上述した処理を繰り返す。
When all bitmap data and font data for one page are output to the laser printer 2 in this way, "<FF>" is finally output as a print command (S180), and the process ends. . If the print data of the next page is sent from the application,
The above process is repeated again.

【0056】この結果、例えば、図10に示すごとくの
構成のプリントデータがレーザプリンタ2に対して送信
される。
As a result, for example, print data having a configuration as shown in FIG.

【0057】次に、レーザプリンタ2側の処理につい
て、図4以下のフローチャートに基づいて説明する。
Next, the processing on the side of the laser printer 2 will be described with reference to the flowcharts shown in FIG.

【0058】まず、初期設定が行われ(S200)、パ
ラレルインターフェース(I/F)6のバッファより、
パソコン4から受信したデータを1バイト分取得する
(S210)。
First, initialization is performed (S200), and the buffer of the parallel interface (I / F) 6
One byte of data received from the personal computer 4 is acquired (S210).

【0059】次に、この1バイトがエスケープシークエ
ンスの開始コードであるエスケープ(<Esc>:16
進コード表記で1B)コードであるか否かを判定する
(S220)。ここで、エスケープコードであれば(S
220で「YES」)、エスケープシーケンス処理が行
われる(S1000)。
Next, this one byte is an escape (<Esc>: 16) which is the start code of the escape sequence.
It is determined whether it is a 1B) code in hexadecimal code notation (S220). Here, if it is an escape code (S
“YES” at 220), an escape sequence process is performed (S1000).

【0060】エスケープシーケンス処理を図5に示す。
まず、エスケープシーケンスによるコマンドの終了まで
のデータが全て取得される(S1010)。次に、コマ
ンドに応じた処理に移る(S1020)。
FIG. 5 shows the escape sequence processing.
First, all data up to the end of the command by the escape sequence is obtained (S1010). Next, the process proceeds to a process corresponding to the command (S1020).

【0061】図10に示したプリントデータがパソコン
4からレーザプリンタ2へ送信されたものとすると、ま
ず、最初にグラフィック圧縮モード設定コマンドD1が
取得され、グラフィック圧縮モードが設定される(S1
030)。図10の例では、グラフィックモード=「H
BP(ホストベースドプリンタ)」のコマンドが送信さ
れてくるので、ステップS1030では、グラフィック
圧縮モードは「HBP」(旧来のホストベースドプリン
タへ送信するイメージデータと同じ圧縮様式を示す。)
として設定される。そして、再度ステップS210の処
理に戻る。
Assuming that the print data shown in FIG. 10 is transmitted from the personal computer 4 to the laser printer 2, first, the graphic compression mode setting command D1 is obtained, and the graphic compression mode is set (S1).
030). In the example of FIG. 10, the graphic mode = “H
In step S1030, the graphic compression mode is "HBP" (indicating the same compression format as the image data to be transmitted to the conventional host-based printer) because the command "BP (host-based printer)" is transmitted.
Is set as Then, the process returns to step S210.

【0062】次に、グラフィックデータD2が送信され
てくるが、そのグラフィックデータD2は1ラスタ毎
に、先頭にエスケープシーケンスとしてグラフィックデ
ータ受信コマンドが設定されているので(S220で
「YES」)、ステップS1020では、グラフィック
データ受信コマンドであると判定されて、グラフィック
圧縮モード=「HBP」に設定されているか否かが判定
される(S1040)。本例では、グラフィック圧縮モ
ード=「HBP」に設定されているので(S1040で
「YES」)、ホストベースドデータ受信処理が行われ
る(S2000)。
Next, the graphic data D2 is transmitted. Since the graphic data D2 has a graphic data reception command set as an escape sequence at the head of each raster ("YES" in S220), In S1020, it is determined that the received command is a graphic data reception command, and it is determined whether the graphic compression mode is set to “HBP” (S1040). In this example, since the graphic compression mode is set to “HBP” (“YES” in S1040), host-based data reception processing is performed (S2000).

【0063】ホストベースドデータ受信処理のフローチ
ャートを図6に示す。まず、受信するホストベースドタ
イプのプリントデータが、バンドの先頭のラスタに該当
するか否かが判定される(S2010)。ここでバンド
とは、印刷する1頁分のラスタを所定数(例えば128
ラスタ分)毎に分けた各領域のことを言う。本プリンタ
処理においては、このバンド毎にプリントデータを管理
している。
FIG. 6 shows a flowchart of the host-based data reception processing. First, it is determined whether the received host-based type print data corresponds to the first raster of the band (S2010). Here, the band means a predetermined number of rasters of one page to be printed (for example, 128 rasters).
This means each area divided for each raster. In the printer processing, print data is managed for each band.

【0064】プリントデータがバンドの先頭ラスタであ
れば(S2010で「YES」)、1バンド分を格納す
るのに最大限必要なメモリ領域をRAM16内に確保し
て、このメモリ領域を管理するためのBG(バックグラ
ウンド)ハンドルを設定する処理を行う(S202
0)。次に、ステップS2020にてメモリ確保に成功
したか否かが判定され(S2030)、成功していれば
(S2030で「YES」)、次に、パソコン4からの
受信データの内、1ラスタ分を取得して、BGハンドル
が示しているメモリ領域に格納する(S2040)。
If the print data is the first raster of the band ("YES" in S2010), a maximum memory area necessary for storing one band is secured in the RAM 16, and this memory area is managed. To set a BG (background) handle of the camera (S202)
0). Next, in step S2020, it is determined whether or not the memory allocation has succeeded (S2030). If the memory allocation has succeeded ("YES" in S2030), then one raster of the data received from the personal computer 4 is received. Is acquired and stored in the memory area indicated by the BG handle (S2040).

【0065】次に、ステップS2040で取得したプリ
ントデータがバンドの末尾のラスタであるか否かが判定
され(S2050)、末尾でなければ(S2050で
「NO」)、ステップS210に戻る。
Next, it is determined whether the print data acquired in step S2040 is the raster at the end of the band (S2050). If not, the process returns to step S210.

【0066】グラフィックデータD2が継続している限
り、ステップS2000にて1ラスタ分のプリントデー
タが順次処理されてゆく。そのプリントデータがバンド
の先頭でない場合には(S2010で「NO」)、既に
メモりがステップS2020にて確保されているので、
ステップS2040にてBGハンドルが指すメモリ領域
に格納される。
As long as the graphic data D2 continues, print data for one raster is sequentially processed in step S2000. If the print data is not the head of the band (“NO” in S2010), since the memory has already been secured in step S2020,
In step S2040, the data is stored in the memory area indicated by the BG handle.

【0067】また、プリントデータがバンドの末尾のデ
ータである場合には(S2050で「YES」)、その
バンドに対応するグラフィックデータD2は終了したの
で、ステップS2020にて最大限確保したメモリ領域
の内未使用の領域を解放して他の用途に使用できるよう
にするメモリリサイズ処理を行う(S2060)。そし
て、リサイズしたメモリ領域を、RAM16内に設定さ
れて、バンドのバックグラウンド(BG)エリアに登録
する。例えば、メモリ領域の先頭アドレスとそのバイト
数とを登録する。以後、次のバンドの先頭から、上述し
たごとく処理が繰り返される。
If the print data is the data at the end of the band ("YES" in S2050), the graphic data D2 corresponding to the band has been completed, so the maximum size of the memory area secured in step S2020 is determined. A memory resizing process is performed to release unused areas in the memory so that the areas can be used for other purposes (S2060). Then, the resized memory area is set in the RAM 16 and registered in the background (BG) area of the band. For example, the head address of the memory area and the number of bytes are registered. Thereafter, the processing is repeated as described above from the beginning of the next band.

【0068】このようにして受信したグラフィックデー
タD2をバンド毎に適切なメモリ領域を確保してパケッ
ト構造体に登録する処理が行われる。
The processing for registering the received graphic data D2 in the packet structure while securing an appropriate memory area for each band is performed.

【0069】この処理を繰り返している際に、使用でき
るメモリが不足して、メモリ確保に失敗すると(S20
90で「NO」、エラーとなり、エラー処理(S210
0)が実行される。再度のメモリ確保が成功すれば(S
2090で「YES」)、前述したステップS2040
からの処理を開始する。
If this process is repeated and the available memory is insufficient and the memory allocation fails (S20)
90 is "NO", an error occurs, and error processing is performed (S210).
0) is executed. If the memory allocation succeeds again (S
"YES" in step 2090), the above-described step S2040
Start processing from.

【0070】ステップS3000の使用メモリ減少処理
のフローチャートを図7に示す。
FIG. 7 shows a flowchart of the used memory reduction process in step S3000.

【0071】まず、バンドの先頭からの順番を示す変数
iに先頭バンドの番号(例えば、「0」)を設定する
(S3010)。次にこのi番目のバンドに対応するB
Gハンドルが「<NULL>」(BGハンドルが設定さ
れていない状態を示す。)か否かが判断される(S30
20)。グラフィックデータD2が取得されて、BGハ
ンドルが設定されているメモリ領域に格納されていれば
(S3020で「NO」)、まず、RAM16内に設定
された展開バッファにi番目のバンドのグラフィックデ
ータを伸張して展開する(S3030)。なお、BGハ
ンドルが「<NULL>」である場合には(S3020
で「YES」)、次に登録データが存在しているか否か
が判定される(S3110)。すなわち、i番目のバン
ドに対応するパケット構造体の所定の位置に、PCLで
記述された言語表現データが登録されているか否かが判
定される。登録されていれば(S3110で「YE
S」)、まず展開バッファをクリアして(S311
5)、白地のバックグラウンドを作成する。
First, the number of the head band (for example, “0”) is set in a variable i indicating the order from the head of the band (S3010). Next, B corresponding to the i-th band
It is determined whether the G handle is “<NULL>” (indicating that the BG handle is not set) (S30).
20). If the graphic data D2 is acquired and stored in the memory area in which the BG handle is set (“NO” in S3020), first, the graphic data of the i-th band is stored in the expansion buffer set in the RAM 16. It is expanded and expanded (S3030). If the BG handle is “<NULL>” (S3020
Then, it is determined whether registration data exists (S3110). That is, it is determined whether or not linguistic expression data described in PCL is registered at a predetermined position of the packet structure corresponding to the i-th band. If it is registered ("YE" in S3110
S "), first, the development buffer is cleared (S311
5) Create a white background.

【0072】ステップS3030またはステップS31
15の次に、登録データが存在しているか否かが判別さ
れる(S3040)。すなわち、i番目のバンドに対応
するパケット構造体の所定の位置に、PCLで記述され
た言語表現データが登録されているか否かが判定され
る。
Step S3030 or step S31
After step 15, it is determined whether registration data exists (S3040). That is, it is determined whether or not linguistic expression data described in PCL is registered at a predetermined position of the packet structure corresponding to the i-th band.

【0073】言語表現データが登録されていれば(S3
040で「YES」)、そのデータが取り出され(S3
050)、ビットマップデータにイメージ化されて展開
バッファ内に書き込まれる(S3060)。すなわち、
展開バッファ内い存在するバックグラウンドのデータの
上から書き込まれることにより合成される。
If the linguistic expression data is registered (S3
040, “YES”), and the data is taken out (S3).
050), the image is formed into bitmap data and written into the expansion buffer (S3060). That is,
The data is synthesized by being written from above the background data existing in the expansion buffer.

【0074】以後、登録データが存在する限り、展開バ
ッファに書き込み、登録データが無くなれば(S304
0で「NO」)、展開バッファに書き込まれたビットマ
ップデータを間引くことにより解像度を下げてデータ量
を少なくする間引き処理が行われる(S3070)。
Thereafter, as long as the registered data exists, the data is written into the expansion buffer, and if there is no more registered data (S304).
If “0” is “NO”, the thinning process is performed to reduce the data amount by reducing the resolution by thinning out the bitmap data written in the expansion buffer (S3070).

【0075】ステップS3070の展開バッファの間引
き処理(圧縮処理)のフローチャートを図14に示す。
この時の展開バッファのビットマップの配置状態(間引
き前と間引き後)は図12の説明図に示すようなもので
ある。
FIG. 14 shows a flowchart of the thinning-out processing (compression processing) of the expansion buffer in step S3070.
At this time, the arrangement state of the bit map of the expansion buffer (before thinning and after thinning) is as shown in the explanatory diagram of FIG.

【0076】まず、偶数ラインを表すポインタElin
eTopに間引こうとする展開バッファの先頭アドレス
をセットし、隣接する次のラインである奇数ラインのポ
インタOlineTopに展開バッファの先頭アドレス
に展開バッファ上で1ライン分の量であるWidthを
加えたものをセットする(S6000)。次に、処理ラ
インの位置を示す変数Lyに0をセットし、間引き後の
圧縮画像データを格納する為のポインタFoutPtr
を展開バッファの先頭アドレスにセットする(S601
0)。次に注目画素位置より2画素分左(処理方向を
今、左から右と設定しているので既に処理された画素位
置にあたる。)での誤差を表す変数R0と1画素分左で
の誤差を表す変数R1を共に0にクリアする(S602
0)。ライン方向での注目画素位置を示す変数Lxを0
にクリアする(S6030)。
First, a pointer Elin representing an even-numbered line
The top address of the expansion buffer to be thinned is set in eTop, and the pointer OlineTop of the next odd line, which is the next adjacent line, is added with the width of one line on the expansion buffer to the start address of the expansion buffer. The object is set (S6000). Next, a variable Ly indicating the position of the processing line is set to 0, and a pointer FoutPtr for storing the compressed image data after thinning is set.
Is set to the start address of the development buffer (S601).
0). Next, a variable R0 representing an error at two pixels to the left of the target pixel position (the processing direction is now set from left to right, which corresponds to a pixel position already processed) and an error at one pixel left are The variable R1 is cleared to 0 (S602).
0). A variable Lx indicating the pixel position of interest in the line direction is set to 0
(S6030).

【0077】引き続き、ROM14に格納された間引き
用の変換テーブルを参照するための参照アドレスを作成
する(S6040)。ここでは次のように参照アドレス
を求める。まず、 RAM16の展開バッファのビット
マップデータの内、ElineTopとOlineTo
pとにそれぞれ変数Lx分のオフセットを持たせた位置
から変換する単位である4画素分ずつ(本実施の形態に
おいては4ビットとなる)ビットマップデータをそれぞ
れ読み出す。この8画素が処理単位となるブロックであ
る。そして、このブロックのビットマップデータと変数
としてRAM16に記憶されているR0とR1の各2ビ
ットを、周知のビットシフト処理やAND処理やOR処
理等を行って、図13に示すような12ビットのアドレ
スビット列(変換テーブルの先頭からのオフセットとな
る)を作成する。そして、それにROM14内での変換
テーブルのアドレスの先頭アドレス値を加えて参照アド
レスとする。
Subsequently, a reference address for referencing the conversion table for thinning stored in the ROM 14 is created (S6040). Here, the reference address is obtained as follows. First, of the bitmap data in the expansion buffer of the RAM 16, ELineTop and OlineTo
The bitmap data (4 bits in this embodiment), which is a unit for converting from a position where p and p are respectively offset by a variable Lx, is read. These eight pixels are a block serving as a processing unit. The bit map data of this block and the two bits R0 and R1 stored in the RAM 16 as variables are subjected to well-known bit shift processing, AND processing, OR processing, and the like to form a 12-bit data as shown in FIG. (Which is an offset from the top of the conversion table) is created. Then, the start address value of the address of the conversion table in the ROM 14 is added to the reference address.

【0078】次に、この参照アドレスをもとにROM1
4の変換テーブルをアクセスして、8ビットのデータを
読み出す(S6050)。読み出された8ビットのデー
タの内、ビット0〜ビット3の4ビットを圧縮画像デー
タとしてポインタFoutPtrで示される展開バッフ
ァ領域に書き込み、ポインタFoutPtrを4ビット
分進め、ビット4、5を変数R0にビット6、7を変数
R1に格納する(S6060)。次に、注目画素位置を
示す変数Lxに変換の単位である4を加え(S607
0)、この変数Lxがラインの幅を表すWidthを超
えたか否かを判定する(S6080)。本実施の形態に
おいては、このWidthは4の倍数となるように構成
され、4ビットに満たない半端な部分を別処理しなくて
も良いようしている。
Next, based on the reference address, the ROM 1
The conversion table No. 4 is accessed, and 8-bit data is read (S6050). Of the read 8-bit data, 4 bits from bit 0 to bit 3 are written as compressed image data in the expansion buffer area indicated by the pointer FoutPtr, the pointer FoutPtr is advanced by 4 bits, and the bits 4 and 5 are set to the variable R0. Are stored in the variable R1 (S6060). Next, the conversion unit 4 is added to the variable Lx indicating the target pixel position (S607).
0), it is determined whether or not the variable Lx has exceeded the width representing the line width (S6080). In the present embodiment, the width is configured to be a multiple of 4, so that the odd portion less than 4 bits does not need to be separately processed.

【0079】変数LxがWidthよりも小さい場合は
(S6080で「NO」)、まだ1ライン分の処理が終
了していないので、ステップS6040に戻ってステッ
プS6040からステップS6070の処理を繰り返
す。変数LxがWidth以上になった場合は(S60
80で「YES」)、1ライン分の圧縮が終了したの
で、次のラインの処理を行う為に、ポインタEline
TopとOlineTopにそれぞれWidthの2倍
の値を加えることで、次の処理ラインの先頭アドレスを
与え(S6090)、展開バッファ内での処理ラインを
表す変数Lyに処理単位である2を加える(S610
0)。
If the variable Lx is smaller than the Width ("NO" in S6080), the processing for one line has not been completed yet, so the flow returns to step S6040 to repeat the processing from step S6040 to step S6070. If the variable Lx is equal to or greater than the width (S60
("YES" at 80) Since the compression for one line has been completed, the pointer Eline is used to process the next line.
By adding twice the value of Width to Top and LineTop, respectively, the start address of the next processing line is given (S6090), and 2 as the processing unit is added to the variable Ly representing the processing line in the expansion buffer (S610).
0).

【0080】そして、1バンド分(現在の展開バッファ
の全てのビットマップデータ)の圧縮が終了したか否か
を判定する為に、この変数Lyと展開バッファのライン
総数Heightとを比較し(S6110)、変数Ly
がHeightより小さければ(S6110で「N
O」)、1バンド分終了していないので、ステップS6
020に戻って次のラインの処理を続ける。また、変数
LyがHeigth以上ならば(S6110で「YE
S」)、この展開バッファの圧縮を終了する。この時点
で展開バッファには、その先頭アドレスから順番にその
容量が圧縮する前の半分の圧縮画像データが格納される
ことになる。ここで、一旦、この間引き処理を終了して
元の処理に戻る。
Then, in order to determine whether or not compression of one band (all bitmap data in the current expansion buffer) has been completed, the variable Ly is compared with the total number of lines High in the expansion buffer (S6110). ), Variable Ly
Is smaller than Height (“N” in S6110).
O ") Since the processing for one band has not been completed, step S6
Returning to step 020, the processing of the next line is continued. If the variable Ly is equal to or higher than Height (“YE
S "), the compression of the expansion buffer is terminated. At this point, half of the compressed image data before the capacity is compressed is stored in the expansion buffer in order from the start address. Here, the thinning process is temporarily ended, and the process returns to the original process.

【0081】尚、RAM16内の展開バッファに対する
書き込み及び読み出しのデータ単位は4ビットとして説
明したが、実際には8ビット(1バイト)の方が現状の
種々のCPUのシステム構成に適している。本実施の形
態においては、変換テーブルの容量を小さくするために
4ビット単位でRAM16をアクセスするようにした
が、実際には、8ビットずつRAM16をアクセスする
ようにCPUの汎用レジスタ上でバッファリングを行う
ことにより、より高速な処理を行うことができる。その
場合、すなわち、RAM14に対しては8ビット単位で
読み出しと書き込みを行い、CPUの汎用レジスタ上で
下位と上位4ビット毎に処理するようする。各ポインタ
の更新も、8ビット分処理が終わった時点でまとめて行
うようにする。
Although the data unit for writing and reading data to and from the development buffer in the RAM 16 has been described as 4 bits, 8 bits (1 byte) are actually more suitable for the current system configuration of various CPUs. In this embodiment, the RAM 16 is accessed in units of 4 bits in order to reduce the capacity of the conversion table. However, in practice, buffering is performed on a general-purpose register of the CPU so that the RAM 16 is accessed in units of 8 bits. , Higher-speed processing can be performed. In that case, that is, reading and writing are performed on the RAM 14 in units of 8 bits, and processing is performed on the general-purpose register of the CPU for each of the lower 4 bits and the upper 4 bits. Updating of each pointer is performed collectively at the time when processing for 8 bits is completed.

【0082】この展開バッファの間引き処理を行った後
の処理を、再度、図7に示すフローチャートに戻って説
明する。
The processing after the thinning processing of the expansion buffer is performed will be described again with reference to the flowchart shown in FIG.

【0083】このようにデータ量を減少させて、一部の
メモリを解放して小さくなった展開バッファの内容をハ
ンドルに設定して、パケット構造体のBGエリアに登録
し(S3080)、次に1頁分の処理が終了したか否か
が判定される(S3090)。
The data amount is reduced in this way, a part of the memory is released, and the contents of the decompression buffer, which is reduced, are set in the handle and registered in the BG area of the packet structure (S3080). It is determined whether the processing for one page is completed (S3090).

【0084】なお、BGハンドル=<NULL>であり
(S3020で「YES」)、登録データも無い場合に
は(S3110で「NO」)、展開バッファへの書き込
みは行われずに、直接、ステップS3090に移行す
る。
If the BG handle = <NULL> (“YES” in S3020) and there is no registered data (“NO” in S3110), the data is not directly written to the development buffer, and the process proceeds directly to step S3090. Move to

【0085】そして、1頁分の全てのバンドの処理が終
了していなければ(S3090で「NO」)、iをイン
クリメントして(S3100)、次のバンドを指定し
て、前述した処理を繰り返す。
If the processing for all the bands for one page has not been completed ("NO" in S3090), i is incremented (S3100), the next band is designated, and the above-described processing is repeated. .

【0086】1頁分の処理が終了すれば(S3090で
「YES」)、展開バッファに書き込まれたグラフィッ
クデータに付随して確保されているグラフィックキャッ
シュやPCLで記述されたフォントデータに付随して、
フォントデータを記憶しているフォントキャッシュを、
再利用できるメモリとして解放する(S3120)。
When the processing for one page is completed ("YES" in S3090), the processing is performed along with the graphic cache secured with the graphic data written in the expansion buffer and the font data described in the PCL. ,
A font cache that stores font data,
The memory is released as a reusable memory (S3120).

【0087】このようにして展開バッファの内容を間引
いたり(S3070)、フォントキャッシュやグラフィ
ックキャッシュを解放している(S3120)ので、使
用していたメモリの一部を解放して、使用可能なメモリ
を増加させることができる。このことにより、使用でき
るメモリが十分に増加すれば、再度、メモリ確保するこ
とができるようになる。
As described above, since the contents of the expansion buffer are thinned out (S3070) and the font cache and the graphic cache are released (S3120), a part of the used memory is released and the usable memory is released. Can be increased. As a result, if the available memory is sufficiently increased, the memory can be secured again.

【0088】このようにしてグラフィックデータが終了
し、次にPCLによる言語表現データD3、ここではフ
ォントデータがステップS210にて読み込まれると、
最初にフォント指定のエスケープシーケンスが取得され
る(S210)ので、エスケープシークエンス処理(S
1000)において、フォントの指定が行われる(S1
050)。以後取得されるフォントデータは、新たにフ
ォントの指定が行われるまでは、同一のフォントとして
扱われる。
When the graphic data is completed in this manner, and the language expression data D3 by PCL, here, font data, is read in step S210,
First, since an escape sequence for specifying a font is obtained (S210), an escape sequence process (S210) is performed.
In (1000), a font is specified (S1).
050). The font data obtained thereafter is treated as the same font until a new font is specified.

【0089】次に取得されたデータがフォントデータ
(ここではキャラクタデータ)であれば、<Esc>で
はないので(S220で「NO」)、次に<LF>(ラ
インフィード)か否かが判定される(S230)。も
し、<LF>であればレーザプリンタ2における印刷位
置をラインフィードさせるためのカーソル位置移動処理
が行われる(S240)。
Next, if the acquired data is font data (here, character data), it is not <Esc> (“NO” in S220), and then it is determined whether it is <LF> (line feed). Is performed (S230). If <LF>, a cursor position moving process for line feeding the print position in the laser printer 2 is performed (S240).

【0090】ここではフォントデータであり<LF>で
ないので(S230で「NO」)、次に印刷コマンド<
FF>か否かが判定される(S250)。ここでも<F
F>ではないので(S250で「NO」)、その値が<
NULL>か否かが判定され(S260)、<NULL
>ではないので(S260で「NO」)、フォントデー
タに示されているキャラクタを前述したパケット構造体
に登録データとして登録する(S270)。
Here, since it is font data and not <LF> (“NO” in S230), the print command <
It is determined whether or not FF> (S250). Again <F
F> (“NO” in S250), the value is <
It is determined whether or not <NULL> (S260), and <NULL>
>> (“NO” in S260), the character indicated in the font data is registered as registration data in the above-described packet structure (S270).

【0091】次にステップS270の登録が成功したか
否かが判定される(S280)。登録が成功であった場
合(S280で「YES」)、再度ステップS210か
ら処理を開始する。
Next, it is determined whether or not the registration in step S270 is successful (S280). If the registration is successful ("YES" in S280), the process starts again from step S210.

【0092】もし、使用可能メモリが不十分であって、
登録が失敗であった場合(S280で「NO」)には、
使用メモリの減少処理が実行される(S290)。この
使用メモリ減少処理は、前述の図7に示した処理と同じ
処理が行われて、使用可能なメモリの増加が行われる。
If the available memory is insufficient,
If registration failed ("NO" in S280),
The process of reducing the used memory is executed (S290). In this used memory reduction processing, the same processing as the processing shown in FIG. 7 described above is performed, and the available memory is increased.

【0093】次に、キャラクタをパケット構造体に再登
録する処理が行われ(S300)、更に登録が成功か否
かが判定されて(S310)、成功であれば(S310
で「YES」)、ステップS210に戻り、前述した処
理を繰り返す。失敗であれば(S310で「NO」)、
エラー処理を実行する(S320)。
Next, a process of re-registering the character in the packet structure is performed (S300), and it is determined whether or not the registration is successful (S310).
"YES"), the process returns to step S210, and the above-described process is repeated. If unsuccessful ("NO" in S310),
Error processing is performed (S320).

【0094】このようにして言語表現データD3の処理
が終了し、1頁の最後を示す印刷コマンド<FF>がス
テップS210にて取得されると(S250で「YE
S」)、次に図8のフローチャートに示す未登録データ
処理が実行される。
When the processing of the language expression data D3 is completed in this way and a print command <FF> indicating the end of one page is obtained in step S210 ("YE" in S250).
S "), and then the unregistered data processing shown in the flowchart of FIG. 8 is executed.

【0095】これは、ホストベースドデータがバンドの
末尾まで存在していないと、図6に示したステップS2
060、S2070の処理が行われず、パケット構造体
に登録されない。したがって、印刷を実行する前に、こ
の未登録のデータをパケット構造体に登録して、印刷可
能とするためである。
This is because if the host-based data does not exist up to the end of the band, step S2 shown in FIG.
060 and S2070 are not performed and are not registered in the packet structure. Therefore, before printing is performed, this unregistered data is registered in the packet structure to enable printing.

【0096】まず、未登録データが存在するか否かが判
定される(S4120)。未登録データが存在しない場
合には(S4120で「NO」)、このまま本処理を終
了して次の処理(S330)に移る。
First, it is determined whether or not unregistered data exists (S4120). If there is no unregistered data ("NO" in S4120), the process ends, and the process proceeds to the next process (S330).

【0097】未登録データが存在する場合は(S412
0で「YES」)、該当するバンドの残りラスタに白を
設定する(S4130)。すなわち、存在しないラスタ
に無地である白を設定する。次にメモりをリサイズする
(S4140)。このリサイズ処理はステップS206
0と同じ処理である。次にパケット構造体に登録する
(S4150)。この登録処理はステップS2070と
同じ処理である。
If unregistered data exists (S412)
If “0” is “YES”, white is set to the remaining raster of the corresponding band (S4130). That is, plain white is set for a nonexistent raster. Next, the memory is resized (S4140). This resizing process is performed in step S206.
This is the same process as 0. Next, it is registered in the packet structure (S4150). This registration processing is the same processing as step S2070.

【0098】次に、3個の展開バッファにパケットのデ
ータを3バンド分展開し、最初の1ラスタを、レーザ出
力用FIFOに書き出す。その後、エンジン20を起動
する印刷処理の割り込み実行が許可される(S33
0)。印刷処理のフローチャートを図9に示す。この印
刷処理は、DMAC(ダイレクトメモリアクセスコント
ローラ)により1ラスタ分のデータの印刷出力(例えば
レーザダイオードによる1ラスタ分のレーザビームの出
力)が完了し、レーザ出力用のFIFOが空になる毎
に、割り込み実行される処理である。このFIFOのデ
ータはエンジン20の出力するライン同期信号であるB
D信号により出力される。
Next, the data of the packet is expanded into three expansion buffers for three bands, and the first raster is written to the laser output FIFO. Thereafter, the interruption execution of the print processing for starting the engine 20 is permitted (S33).
0). FIG. 9 shows a flowchart of the printing process. In this printing process, every time a print output of one raster data (for example, output of a laser beam for one raster by a laser diode) is completed by a DMAC (direct memory access controller) and the FIFO for laser output becomes empty, This is a process executed by interruption. This FIFO data is a line synchronization signal B output from the engine 20.
It is output by the D signal.

【0099】ステップS330にて割り込み実行が許可
され、エンジン20よりBD信号が入るとFIFO内の
1ラスタ分のデータが出力される。FIFOが空になる
と直ちに割り込みがかかって、まず、1頁分の印刷が終
了したか否かが判定される(S5010)。印刷の最初
であり、1頁分の印刷は終了していないので(S501
0で「NO」)、次に最初のバンドの展開バッファ内に
存在するラスタデータをDMAの処理対象としてセット
する(S5020)。このことにより、次にBD信号に
より割り込みが発生した時に、次のラスタデータが印刷
出力される。次に空の展開バッファが存在するか否かが
判定される(S5030)。空の展開バッファが無けれ
ば(S5030で「NO」)、このまま一旦処理を終了
する。そして、1ラスタ分の印刷出力が終了して、再
度、割り込みがかかると、次のラスタデータがDMAの
処理対象としてセットされ(S5020)、印刷出力さ
れる。
In step S330, execution of an interrupt is permitted, and when a BD signal is input from the engine 20, data for one raster in the FIFO is output. As soon as the FIFO becomes empty, an interrupt occurs, and it is first determined whether printing of one page has been completed (S5010). Since printing is at the beginning and printing for one page has not been completed (S501).
Then, the raster data existing in the expansion buffer of the first band is set as a DMA processing target (S5020). As a result, the next raster data is printed out the next time an interrupt occurs due to the BD signal. Next, it is determined whether or not there is an empty expansion buffer (S5030). If there is no empty development buffer ("NO" in S5030), the process is temporarily terminated as it is. Then, when the print output for one raster is completed and an interrupt is applied again, the next raster data is set as a DMA processing target (S5020) and printed.

【0100】したがって、1つのバンドの展開バッファ
が全て印刷出力されるまでは、ステップS5030では
「NO」と判定されるので、順次ラスタデータを印刷出
力する処理(S5020)のみが行われる。
Therefore, until all the expansion buffers of one band are printed out, the determination in step S5030 is "NO", and only the process of sequentially printing out raster data (S5020) is performed.

【0101】こうして、最初のバンドの展開バッファ内
の全てのラスタデータが印刷出力されると、あるいは、
最初から空の展開バッファが存在すると、空の展開バッ
ファが生じるので(S5030で「YES」)、次に多
重割り込みがなされているか否かが判定される(S50
40)。本印刷処理が2つ以上割り込み実行されていれ
ば(S5040で「YES」)、現在、ステップS50
50以下の処理が行われていることになるので、ステッ
プS5050以下の処理を重ねて実行せずに、このまま
一旦この割り込み処理を終了する。
Thus, when all the raster data in the expansion buffer of the first band is printed out, or
If an empty expansion buffer exists from the beginning, an empty expansion buffer is generated ("YES" in S5030), and it is next determined whether or not multiple interrupts have been issued (S50).
40). If two or more main printing processes have been interrupted ("YES" in S5040), the process proceeds to step S50.
Since the processing of 50 or less has been performed, the interrupt processing is temporarily ended without performing the processing of step S5050 and subsequent steps.

【0102】多重割り込みがなされていれば(S504
0で「NO」)、未だ展開バッファに展開されていない
バンドの登録データの取り出しが行われる(S505
0)。展開バッファの数(本例では3つ)は、バンドの
数より少ないので、全てのバンドが展開バッファに展開
されているとは限らない。したがって、ステップS50
60以下の処理で、印刷出力が終了して空になった展開
バッファに、未展開のバンドを展開する。なお、この展
開処理の際にも、既に展開されていて印刷出力が完了し
ていない展開バッファについては、多重割り込み処理に
より、ステップS5020が実行されて、印刷出力処理
は継続されている。
If multiple interrupts have been issued (S504)
If “0” is “NO”, the registration data of the band not yet developed in the development buffer is extracted (S505).
0). Since the number of expansion buffers (three in this example) is smaller than the number of bands, not all bands are expanded in the expansion buffer. Therefore, step S50
In the processing of 60 or less, the undeveloped band is developed in the development buffer that has become empty after the printout is completed. Note that, also during this expansion processing, for an expansion buffer that has already been expanded and printout has not been completed, step S5020 is executed by the multiple interrupt processing, and the printout processing is continued.

【0103】まず、取り出されたバンドのBGハンドル
が「<NULL>」か否かが判定される(S506
0)。もし、「<NULL>」でなければ(S5060
で「NO」)、BGハンドルが指しているメモリ領域の
内容を、空の展開バッファに展開し(S5070)、バ
ックグラウンドのビットマップデータを形成する。
First, it is determined whether or not the BG handle of the extracted band is "<NULL>" (S506).
0). If it is not “<NULL>” (S5060
Then, the contents of the memory area pointed to by the BG handle are developed in an empty development buffer (S5070), and background bitmap data is formed.

【0104】もし、BGハンドルが「<NULL>」で
あれば(S5060で「YES」)、空の展開バッファ
をクリアして(S5080)、白のバックグラウンドを
形成する。
If the BG handle is "<NULL>"("YES" in S5060), the empty development buffer is cleared (S5080) to form a white background.

【0105】次に、取り出されたバンドの登録データ、
すなわち、言語表現データが存在するか否かが判定され
る(S5090)。存在していなければ(S5090で
「NO」)、展開バッファへの展開は終了したので、こ
のまま一旦処理を終了する。
Next, the registration data of the extracted band,
That is, it is determined whether or not the language expression data exists (S5090). If it does not exist ("NO" in S5090), the development in the development buffer has been completed, and the process is once terminated as it is.

【0106】登録データが存在していれば(S5090
で「YES」)、そのデータが取り出され(S510
0)、言語表現データはビットマップデータにイメージ
化されて展開バッファ内に書き込まれる(S511
0)。この処理が、全ての登録データについて実行さ
れ、未実行の登録データが無くなれば(S5090で
「NO」)、一旦処理を終了する。
If registered data exists (S5090)
"YES"), and the data is taken out (S510).
0), the language expression data is converted into an image into bitmap data and written into the development buffer (S511).
0). This process is executed for all the registered data, and if there is no unexecuted registered data ("NO" in S5090), the process is once ended.

【0107】このようにして、パケット構造体の登録デ
ータが順次展開されるとともに、展開バッファから、ラ
スタデータが順次印刷出力される。そして、1頁分の印
刷出力が終了すれば(S5010で「YES」)、本印
刷処理の割り込み処理が禁止されて(S5120)、印
刷処理は終了する。
In this way, the registration data of the packet structure is sequentially developed, and the raster data is sequentially printed out from the development buffer. When the print output for one page is completed ("YES" in S5010), the interrupt processing of the print processing is prohibited (S5120), and the print processing ends.

【0108】以後、印刷コマンド「<FF>」が取得さ
れる毎に、それぞれ前述した処理により各頁の印刷が行
われる。
Thereafter, each time the print command “<FF>” is acquired, each page is printed by the above-described processing.

【0109】なお、図5において、グラフィック印刷モ
ード=「HBP」でない場合は(S1040で「N
O」)、PCL言語の一部として送信されてくるグラフ
ィックデータとして受信がなされる(S1045)。こ
れは旧来の言語表現でのグラフィックデータを受信でき
るようにするためである。
In FIG. 5, if the graphic print mode is not "HBP"("N" in S1040)
O "), and received as graphic data transmitted as part of the PCL language (S1045). This is to enable the reception of graphic data in the traditional language expression.

【0110】また、ステップS1020にてカーソル移
動コマンドであると判断されると、印刷位置を移動する
カーソル移動処理がなされる(S1025)。
If it is determined in step S1020 that the command is a cursor movement command, cursor movement processing for moving the print position is performed (S1025).

【0111】本実施の形態は、パソコン4側にてプリン
タドライバー処理にて、フォントデータについてはPC
L言語にて記述した言語表現データとしてレーザプリン
タ2側へ送信し、フォントデータ以外は、従来のホスト
ベースドフォーマットのイメージデータとしてレーザプ
リンタ2側に送信している。
In this embodiment, the personal computer 4 performs printer driver processing,
The data is transmitted to the laser printer 2 as language expression data described in the L language, and other than font data is transmitted to the laser printer 2 as conventional host-based format image data.

【0112】したがって、レーザプリンタ2側では、P
CL言語でベクトルとして記述されるような、ビットマ
ップデータを作成する付加が高いデータについては、ホ
ストベースドタイプのイメージデータとして受信でき
る。このことにより、非圧縮の場合はそのまま、圧縮の
場合は単に伸張してビットマップデータとして用いれば
よく、言語表現データからビットマップデータに変換す
る必要がないので、レーザプリンタ2側の負荷が高くな
らず、処理に時間を要しない。したがって、印刷の遅延
が防止でき、パソコン4側の処理も遅延させない。
Therefore, on the laser printer 2 side, P
Data having a high addition to create bitmap data, such as data described as a vector in the CL language, can be received as host-based image data. As a result, in the case of non-compression, the data may be simply expanded and used as bitmap data in the case of compression, and there is no need to convert the language expression data into bitmap data. In addition, no time is required for processing. Accordingly, printing delay can be prevented, and processing on the personal computer 4 side is not delayed.

【0113】また、レーザプリンタ2は、図3に示した
プリンタドライバー処理のみでなく、パソコン4から送
信されてくるプリントデータの全てが言語表現データで
あっても、あるいは、すべてがホストベースドタイプの
イメージデータとしてパソコン4から送信されてきて
も、すべてプリントデータ合成エリアとして展開バッフ
ァ内に展開し、1つに合成できるので、旧来のデータ送
信システムで送信されたプリントデータでも印刷可能で
ある。なお、この場合、パソコン4からのビットマップ
データの圧縮方式、およびレーザプリンタ2が伸張でき
るイメージデータの圧縮方式は、旧来のホストベースド
タイプのプリンタにて採用されてい圧縮方式を採用す
る。
The laser printer 2 performs not only the printer driver processing shown in FIG. 3 but also all print data transmitted from the personal computer 4 as language expression data, or all of the print data transmitted from the host-based type. Even if image data is transmitted from the personal computer 4, all of the data can be developed in the development buffer as a print data composition area and combined into one, so that print data transmitted by the conventional data transmission system can be printed. In this case, the compression method of the bitmap data from the personal computer 4 and the compression method of the image data that can be decompressed by the laser printer 2 are the compression methods used in the conventional host-based printer.

【0114】また、このように、旧来の送信システムに
て、ホストベースドタイプのイメージデータが送信され
てきても、従来のホストベースドタイプのプリンタがハ
ード的に受信して印刷出力することとは異なり、レーザ
プリンタ2は、イメージデータを一旦、メモリに格納し
て、更に使用可能なメモリが少なくなると、ソフト的
に、展開バッファにイメージデータをビットマップデー
タとして展開するとともに、展開バッファの内容を間引
いて解像度を低下させている。このため、メモリ不足に
より、画像形成ができないといった問題が低減される。
As described above, even when the host-based type image data is transmitted in the conventional transmission system, it is different from the case where the conventional host-based type printer receives and prints out by hardware. The laser printer 2 temporarily stores the image data in the memory, and when the available memory becomes smaller, the laser printer 2 develops the image data as bitmap data in a development buffer and thins out the contents of the development buffer in software. To lower the resolution. For this reason, the problem that image formation cannot be performed due to lack of memory is reduced.

【0115】なお、本実施の形態のレーザプリンタ2に
おいては、上述のように縦方向で隣接する画素を間引く
ことで、2ラインを1ラインに圧縮(解像度を低下)し
たが、横方向に圧縮することも可能である。
In the laser printer 2 of this embodiment, two lines are compressed into one line (resolution is reduced) by thinning out pixels adjacent in the vertical direction as described above. It is also possible.

【0116】その場合、横方向の8ビットがA[0]、
B[0]、A[1],B[1]…A[3]、B[3]と
配列されていると想定すれば、上述と同じ方法で、変換
テーブルが作成できる。変換テーブルへのアドレスを与
える為のビット列の構成は、上述のものと同じビット配
列にする必要は無く、対応がとれるように構成すれば良
い。
In this case, 8 bits in the horizontal direction are A [0],
Assuming that B [0], A [1], B [1]... A [3], B [3] are arranged, a conversion table can be created in the same manner as described above. The configuration of the bit string for giving the address to the conversion table does not need to be the same bit arrangement as that described above, and may be configured so as to be compatible.

【0117】更に、縦横ともに圧縮することも可能であ
る。例えば、3×3の画素組(合計9画素)を1画素に
圧縮する場合、最初のラインが、A[0,0]、A
[0,1]、A[0,2]、A[1,0]、A[1,
1]、A[1,2]…、次のラインが、B[0,0]、
B[0,1]、B[0,2]、B[1,0]、B[1,
1]、B[1,2]…、3番目のラインが、C[0,
0]、C[0,1]、C[0,2]、C[1,0]、C
[1,1]、C[1,2]…と配列されていると想定し
て、数5のようにして濃度算出を行い、前述の数1〜数
4においてA[i]+B[i](iは変数)と表記され
る部分をそれぞれA[i]+B[i]+C[i](iは
変数)と置き換えれば、前述のように変換テーブルの作
成が行える。
Furthermore, it is also possible to compress both vertically and horizontally. For example, when compressing a 3 × 3 pixel set (9 pixels in total) into one pixel, the first line is represented by A [0,0], A [0,0]
[0,1], A [0,2], A [1,0], A [1,
1], A [1, 2]..., The next line is B [0, 0],
B [0,1], B [0,2], B [1,0], B [1,
1], B [1, 2]..., The third line is C [0,
0], C [0,1], C [0,2], C [1,0], C
Assuming that they are arranged as [1, 1], C [1, 2], the density calculation is performed as in Expression 5, and A [i] + B [i] in Expressions 1 to 4 described above. The conversion table can be created as described above by replacing the portions described as (i is a variable) with A [i] + B [i] + C [i] (i is a variable).

【0118】[0118]

【数5】 (Equation 5)

【0119】この場合、数1及び数3で示される係数
(a、b、c、d)は適宜変更する。また、アドレスを
示すビット列も出力値との対応付けができるように適宜
構成すればよい。
In this case, the coefficients (a, b, c, d) represented by the equations (1) and (3) are appropriately changed. Also, a bit string indicating an address may be appropriately configured so as to be able to be associated with an output value.

【0120】また、本実施の形態のレーザプリンタ2で
は、参照する処理済みの画素組の誤差を2つとしたが、
それに限るものではない。変換テーブルに利用できる記
憶手段の容量や、求められる画品位に応じて設定すれば
よい。
Further, in the laser printer 2 of the present embodiment, the error of the processed pixel set to be referred to is two.
It is not limited to that. What is necessary is just to set according to the capacity of the storage means which can be used for a conversion table, and the required image quality.

【0121】さらに、アドレスを示すビット列を構成す
る際、異なるオフセットを設けることができる為、圧縮
方法の異なる(例えば、横方向に圧縮する場合と縦方向
に圧縮する場合等)複数の変換テーブルへ必要に応じて
切り替えでアクセスすることが可能である。
Furthermore, since different offsets can be provided when constructing a bit string indicating an address, a plurality of conversion tables having different compression methods (for example, when compressing horizontally and vertically) are used. It is possible to access by switching as needed.

【0122】また、画像情報として多値の濃度を持つ場
合、1画素について複数のビット割り付けてアドレスを
表すビット列を構成し、そのビット列を変換テーブルに
入力し(すなわち、そのアドレスで変換テーブルをアク
セスし)、入力した多値のレベルよりも少ないレベルで
出力しても良い。例えば、元の画素データの画素情報の
濃度が4レベルの場合、変換テーブルへ入力されるビッ
ト列には1画素あたり2ビット割り付けられる。これに
対し、出力としては、画素位置iでの補正入力Im
[i]を閾値dと比較した結果に応じて、2レベルとし
て1ビット割り付けた出力を対応付けるように変換テー
ブルを作成することで実施できる。すなわち、画素数を
圧縮(間引く)だけでなく、画素情報のレベルを減すこ
とによって変換後の画素データ量を低減することを同時
に行うことができる。
When the image information has a multi-value density, a plurality of bits are assigned to one pixel to form a bit string representing an address, and the bit string is input to a conversion table (that is, the conversion table is accessed by the address). Then, the output may be performed at a level lower than the input multi-value level. For example, when the density of the pixel information of the original pixel data is four levels, two bits are assigned to one bit in the bit string input to the conversion table. On the other hand, the output is the correction input Im at the pixel position i.
According to the result of comparing [i] with the threshold value d, the conversion table can be implemented by creating a conversion table so as to associate the output allocated to one bit as two levels. That is, it is possible not only to compress (thin out) the number of pixels but also to reduce the amount of pixel data after conversion by reducing the level of pixel information.

【0123】また、このとき、すべての場合について入
力と出力を対応付けた変換テーブルを用意すると変換テ
ーブルのサイズ(容量)が大きくなりすぎる場合が想定
される。その場合は、処理する画像データの特性に応じ
て、発生頻度の高い範囲は変換テーブルで圧縮し(例え
ば、圧縮しようとする画素組が特定の濃度のパターンを
有する場合)、それ以外は以下に図15あるいは図16
のフローチャートに基づいて説明するようなCPU12
による圧縮処理を行うようにしても良い。これらの処理
について順次説明する。
At this time, it is assumed that the size (capacity) of the conversion table becomes too large if a conversion table in which the input and the output are associated with each other is prepared. In that case, depending on the characteristics of the image data to be processed, the range with a high frequency of occurrence is compressed by a conversion table (for example, when the pixel set to be compressed has a pattern of a specific density), and otherwise, FIG. 15 or FIG.
CPU 12 as described based on the flowchart of FIG.
May be performed. These processes will be described sequentially.

【0124】まず、図15に示すフローチャートに基づ
いて、上述のように変換テーブルを保持することによっ
て実施していた圧縮処理を、一連の処理としてCPU1
2に実行させる手順について説明する。これは、図14
のフローチャートのステップS6000に処理が移る前
に、処理対象の画像組に対して変換テーブルが利用でき
るか否かの判断を行い、判断の結果、利用できないこと
が判別された場合に行われる処理である。
First, based on the flowchart shown in FIG. 15, the compression processing which has been performed by holding the conversion table as described above is converted into a series of processing by the CPU 1.
2 will be described. This is shown in FIG.
Before the process proceeds to step S6000 of the flowchart of FIG. 7, it is determined whether or not the conversion table can be used for the image set to be processed, and the process is performed when it is determined that the conversion table cannot be used as a result of the determination. is there.

【0125】はじめに、元画像データの格納されたメモ
リ位置を示す読み出しポインタElineTop とO
lineTop とを展開バッファの先頭アドレスと展
開バッファの先頭から印刷幅分離れたメモリ位置のアド
レスを示すように設定する(S7000)。ここで、E
lineTopは図12で示す横方向での画素位置iで
のA[i]を与えるポインタであり、OlineTop
も同様にB[i]を与えるポインタである。
First, the read pointers ELineTop and O indicating the memory location where the original image data is stored are stored.
lineTop is set to indicate the start address of the expansion buffer and the address of a memory position separated by the print width from the start of the expansion buffer (S7000). Where E
LineTop is a pointer that gives A [i] at the pixel position i in the horizontal direction shown in FIG.
Is also a pointer giving B [i].

【0126】次に、圧縮した結果を格納するための書き
込みポインタFoutPtrを展開バッファの先頭に設
定し、RAM16に一時的なワークエリアとして設定さ
れたR0とR1を0にクリアする(S7010)。そし
て、各読み出しポインタの示す位置から圧縮の対象とな
る画素組を構成する画素データA[i]とB[i]とを
それぞれ読み出す(S7020)。また、誤差R0とR
1を読み出し(S7030)、画素位置iでの補正入力
Im[i]を算出する(S7040)。この補正入力I
m[i]は前述の数1に従って求める。算出したIm
[i]を閾値dと比較し(S7050)、閾値d以下の
場合は(S7050で「YES」)、出力値F[i]を
所定値f0とし、閾値dを超える場合(S7050で
「NO」)は出力値F[i]を所定値f1とする。ここ
で、f0及びf1には、元の画素データがビットマップ
(2値)の場合は、f0=0(白)及びf1=1(黒)
のように対応付ければよい。
Next, a write pointer FoutPtr for storing the compressed result is set at the head of the expansion buffer, and R0 and R1 set as temporary work areas in the RAM 16 are cleared to 0 (S7010). Then, pixel data A [i] and B [i] constituting a pixel set to be compressed are read from the position indicated by each read pointer, respectively (S7020). Also, the errors R0 and R
1 is read out (S7030), and the correction input Im [i] at the pixel position i is calculated (S7040). This correction input I
m [i] is obtained according to the above-described equation (1). Calculated Im
[I] is compared with the threshold value d (S7050). If the value is equal to or smaller than the threshold value d (“YES” in S7050), the output value F [i] is set to a predetermined value f0, and if the output value exceeds the threshold value d (“NO” in S7050). ) Sets the output value F [i] to a predetermined value f1. Here, if the original pixel data is a bitmap (binary), f0 and f1 are f0 = 0 (white) and f1 = 1 (black).
What is necessary is just to correspond as follows.

【0127】次に、出力値F[i]を書き込みポインタ
FoutPtrで示される展開バッファに格納する(S
7080)。元の画素データサイズ(1画素の濃度のレ
ベルに応じて割り当てられる画素情報のビット数)と出
力される圧縮画素データサイズは同一にしてあるので、
この時点では、このFoutPtrが指す展開バッファ
のアドレスに格納されている元の画素データは既に読み
出されて圧縮処理されており、出力値F[i]を書き込
んでもよい状態になっている。引き続き、FoutPt
rに画素データサイズ分を加え、次の書き込み位置を示
すように書き込みポインタを更新する(S7090)。
この画素位置での誤差R[i]を求め(S7100)、
現在のR1をR0にコピーし、R1にこのR[i]を格
納して、次の画素位置i+1の処理に備える(S711
0)。
Next, the output value F [i] is stored in the expansion buffer indicated by the write pointer FoutPtr (S
7080). Since the original pixel data size (the number of bits of pixel information assigned according to the density level of one pixel) and the output compressed pixel data size are the same,
At this point, the original pixel data stored at the address of the expansion buffer pointed to by FoutPtr has already been read and compressed, and the output value F [i] may be written. Continue to FoutPt
The pixel data size is added to r, and the write pointer is updated to indicate the next write position (S7090).
An error R [i] at this pixel position is determined (S7100),
The current R1 is copied to R0, and this R [i] is stored in R1 to prepare for the processing of the next pixel position i + 1 (S711).
0).

【0128】そして、次の圧縮すべき画素データを示す
ように各読み取りポインタを画素データサイズ分ずつ進
める。このとき、印刷幅(Width)に相当する分
(1ライン分)の処理が終了したか否かの判定も行い、
もし、1ラインが終了したならば、次のラインの処理を
行うように、各ポインタを1ライン分スキップさせて次
の偶数ラインあるいは奇数ラインを示すように設定する
(S7120)。そして、圧縮すべきライン数を超えた
か否かを判断して(S7130)、まだ圧縮すべき画素
データがある場合は(S7130で「NO」)、ステッ
プS7020に戻って次の画素位置の画素データの圧縮
を行う。圧縮すべき画素データが無くなった場合は(S
7130で「YES」)、この展開バッファの圧縮処理
を終了する。
Then, each reading pointer is advanced by the pixel data size to indicate the next pixel data to be compressed. At this time, it is also determined whether or not the processing corresponding to the print width (Width) (one line) has been completed.
If one line is completed, each pointer is skipped by one line so as to indicate the next even-numbered line or odd-numbered line so as to perform the processing of the next line (S7120). Then, it is determined whether the number of lines to be compressed has been exceeded (S7130). If there is still pixel data to be compressed ("NO" in S7130), the process returns to step S7020 to return to step S7020. Compression. If there is no more pixel data to be compressed (S
If “YES” in step 7130), the compression processing of the expansion buffer is ended.

【0129】この時点で、圧縮されたデータは展開バッ
ファの先頭から順に格納されているので、FoutPt
rで示される以降の展開バッファが解放されることにな
る。
At this point, since the compressed data is stored in order from the top of the decompression buffer, FoutPt
The subsequent expansion buffer indicated by r will be released.

【0130】また、複数の展開バッファの画素データを
圧縮する場合は、2つ目以降の展開バッファの圧縮に際
して、ステップS7010での書き込みポインタFou
tPtrの初期化を省略し、且つ、ステップS7090
での書き込みポインタの更新の際に、現在書き込んでい
る展開バッファが圧縮画像データでいっぱいになったか
否かを判断し、もしいっぱいになったら、次の圧縮処理
の為の画素データの読み出しが終了した展開バッファの
先頭に書き込みポインタを設定するようにしても良い。
この場合、複数の展開バッファがRAM16の連続領域
に設定されていると、最終的に全展開バッファの圧縮が
終了した時点で、連続な領域が解放できるようなる。
In the case of compressing pixel data of a plurality of expansion buffers, the write pointer Fou in step S7010 is used when compressing the second and subsequent expansion buffers.
The initialization of tPtr is omitted, and step S7090
At the time of updating the write pointer in, it is determined whether or not the decompression buffer currently being written is full of compressed image data, and if it is, reading of pixel data for the next compression process ends. A write pointer may be set at the head of the expanded buffer.
In this case, if a plurality of expansion buffers are set in the continuous area of the RAM 16, the continuous area can be released when the compression of all the expansion buffers is finally completed.

【0131】また、上述のフローチャートにおいては、
画素データサイズ毎に展開バッファをアクセスするよう
に説明したが、画素データサイズが1ビットや2ビット
と言った一般的なCPUの処理単位(例えば1バイト
等)と異なる場合は、一度、CPU12内の汎用レジス
タに処理単位に相当する分ずつ読み込みあるいは書き込
みを行い、ビット処理を行い易くして処理する。
In the above flowchart,
In the above description, the expansion buffer is accessed for each pixel data size. However, if the pixel data size is different from a general CPU processing unit such as 1 bit or 2 bits (for example, 1 byte), once the CPU 12 Is read or written in the general-purpose register by an amount corresponding to the processing unit, and the bit processing is easily performed.

【0132】次に、図16に示すフローチャートに基づ
いて、上述のように変換テーブルを保持することによっ
て実施していた圧縮処理を、一連の処理としてCPU1
2に実行させる手順について説明する。これは、図14
のフローチャートのステップS6040で参照アドレス
を示すアドレスビット列を作成した後に、処理対象の画
像組に対して変換テーブルが利用できるか否かの判断を
行い、判断の結果、利用できないことが判別された場合
にS6050の変換テーブルによる処理に代えて行われ
る処理であり、参照アドレスを示すアドレスビット列が
この処理(圧縮処理2)への入力データとなるものであ
る。また。この処理は、図12に示すように隣接するラ
インの4画素ずつからなるブロックを一度に処理するも
ので、そのブロックには4つの圧縮すべき画素組が含ま
れている。
Next, based on the flowchart shown in FIG. 16, the compression processing which has been performed by holding the conversion table as described above is converted into a series of processing by the CPU 1.
2 will be described. This is shown in FIG.
After creating an address bit string indicating a reference address in step S6040 of the flowchart of FIG. 7, it is determined whether or not the conversion table can be used for the image set to be processed, and as a result of the determination, it is determined that the conversion table cannot be used. This processing is performed in place of the processing by the conversion table in S6050, and an address bit string indicating a reference address is input data to this processing (compression processing 2). Also. In this processing, as shown in FIG. 12, a block composed of four pixels on adjacent lines is processed at a time, and the block includes four pixel sets to be compressed.

【0133】そこで、まず、そのブロック内のどの画素
組に対する処理を行うのかを示すカウンタnを0にクリ
アする(S8000)。そして、入力された参照アドレ
スを示すアドレスビット列内の前述のステップS604
0で合成した誤差を示すビット列に相当する部分を抽出
し、CPU12内の汎用レジスタに割り付けられたR0
とR1にセットし(S8010)、それらの誤差に所定
の重み付けをして加算し、誤算に関する補正濃度を求め
る(S8020)。
Therefore, first, a counter n indicating which pixel set in the block is to be processed is cleared to 0 (S8000). Then, the above-described step S604 in the address bit string indicating the input reference address is performed.
A part corresponding to a bit string indicating an error synthesized by using 0 is extracted, and R0 assigned to a general-purpose register in the CPU 12 is extracted.
And R1 (S8010), add a predetermined weight to those errors, and obtain a corrected density relating to erroneous calculation (S8020).

【0134】次に、アドレスビット列内のA[n]とB
[n](最初はn=0である)を抽出し(S803
0)、それらを加算したものに所定の重み付けを行い圧
縮すべき画素組の補正濃度を求め(S8040)、この
補正濃度とステップS8020で算出した誤差に関する
補正濃度を加算して補正入力Im[n](最初はn=0
である)を算出する(S8050)。そして、補正入力
Im[n]を閾値dと比較し(S8060)、閾値dよ
りも小さい場合は(S8060で「YES」)、圧縮画
像データF[n]として出力値f0を割り当て(S80
70)、閾値d以上の場合は(S8060で「N
O」)、圧縮画像データF[n]として出力値f1を割
り当てる(S8080)。
Next, A [n] and B in the address bit string
[N] (initially n = 0) is extracted (S803)
0), a predetermined weight is added to the sum of them, and a corrected density of the pixel set to be compressed is obtained (S8040), and the corrected density and the corrected density related to the error calculated in step S8020 are added to obtain a corrected input Im [n ] (Initially n = 0
Is calculated (S8050). Then, the correction input Im [n] is compared with the threshold value d (S8060). If the correction input Im [n] is smaller than the threshold value d ("YES" in S8060), the output value f0 is assigned as the compressed image data F [n] (S80).
70), if it is equal to or larger than the threshold value d (“N” in S8060)
O "), and assigns the output value f1 as the compressed image data F [n] (S8080).

【0135】その後、順次算出されてくる圧縮画像デー
タを保持するために割り付けられたCPU12内の汎用
レジスタのn番目の画素組に対応するビット位置に、圧
縮画相データF[n]の値をセットする(S809
0)。そして、このF[n]とA[n]+B[n]の差
分を求めて誤差を算出し、現在のR1をR0にコピー
し、新たに求めた誤差をR1にセットする(S810
0)。そして、ブロック内の次の画素組の処理を行うた
めに、nに1を加え(S8110)、そのnが3を超え
たか(すなわち4になったか)を判断する(S812
0)。超えていなければ(S8120で「NO」)、次
の画素組の処理を行うためにステップS8020にもど
り、超えた場合は(S8120で「YES」)は、現在
のR0とR1を出力のために圧縮画像データを保持して
いるCPU12の汎用レジスタの所定位置に誤差ビット
列を形成するようにセットし、この圧縮処理からの出力
としての出力ビット列を作成し(S8130)、この圧
縮処理2を終了し、この出力ビット列を持って、元の処
理であるステップS6060に戻る。このようにして、
展開バッファの間引き(圧縮)処理を続けるものであ
る。
Thereafter, the value of the compressed image data F [n] is stored in the bit position corresponding to the n-th pixel set of the general-purpose register in the CPU 12 allocated to hold the sequentially calculated compressed image data. Set (S809)
0). Then, the difference between F [n] and A [n] + B [n] is calculated to calculate the error, the current R1 is copied to R0, and the newly obtained error is set to R1 (S810).
0). Then, in order to perform the processing of the next pixel set in the block, 1 is added to n (S8110), and it is determined whether or not n exceeds 3 (ie, has become 4) (S812).
0). If not exceeded ("NO" in S8120), the process returns to step S8020 to perform processing of the next pixel set, and if exceeded ("YES" in S8120), current R0 and R1 are output for output. An error bit string is set at a predetermined position in a general-purpose register of the CPU 12 that holds the compressed image data, an output bit string is generated as an output from this compression processing (S8130), and this compression processing 2 ends. With this output bit string, the process returns to step S6060, which is the original processing. In this way,
The thinning (compression) processing of the expansion buffer is continued.

【0136】なお、図3以下のフローチャートに示した
レーザプリンタ2あるいはプリントデータ送信装置とそ
てのパソコン4の機能は、それぞれ、例えば、コンピュ
ータシステムとして起動するプログラムとして各装置に
備えられる。パソコン4では、例えば、フロッピーディ
スク、光磁気ディスク、CD−ROM等の記憶媒体に記
憶し、必要に応じてコンピュータシステムにロードにて
起動することにより用いる。また、レーザプリンタ2で
は、ROM等を記憶媒体として前記プログラムを記憶し
ておき、このROMをコンピュータシステムとしてのレ
ーザプリンタ2に組み込んでいる。
The functions of the laser printer 2 or the print data transmitting apparatus and the personal computer 4 shown in the flowcharts of FIG. 3 and subsequent figures are provided in each apparatus as, for example, a program to be activated as a computer system. In the personal computer 4, for example, it is stored in a storage medium such as a floppy disk, a magneto-optical disk, a CD-ROM or the like, and is used by being loaded into a computer system and activated as needed. In the laser printer 2, the program is stored using a ROM or the like as a storage medium, and the ROM is incorporated in the laser printer 2 as a computer system.

【0137】また、本実施の形態においては、プリント
装置として、レーザプリンタを使用したものを示した
が、レーザプリンタに限らず、特にインクジェットプリ
ンタやサーマルヘッドプリンタ等の印刷装置に好適に利
用できる。
In this embodiment, a laser printer is used as the printing apparatus. However, the present invention is not limited to a laser printer, and can be suitably used for a printing apparatus such as an ink jet printer or a thermal head printer.

【0138】本実施の形態において、ステップS704
0において数1のA[i]+B[i]の計算を行う処理
手順が領域濃度算出手段としての処理に該当し、ステッ
プS7100が誤差算出手段としての処理に該当し、R
AM16のワークメモリ内のR0あるいはR1が誤差記
憶手段に該当し、ステップS7040が評価濃度算出手
段としての処理に該当し、ステップS7050が生成手
段としての処理に該当し、ステップS7080が圧縮画
像登録手段としての処理に該当する。
In this embodiment, step S704
The processing procedure of calculating A [i] + B [i] of Equation 1 at 0 corresponds to the processing as the area density calculating means, step S7100 corresponds to the processing as the error calculating means, and R
R0 or R1 in the work memory of the AM 16 corresponds to the error storage means, step S7040 corresponds to processing as evaluation density calculation means, step S7050 corresponds to processing as generation means, and step S7080 corresponds to compressed image registration means. It corresponds to the processing as.

【0139】また、ステップS6040における偶数ラ
インと奇数ラインから読み出したそれぞれ4画素分の画
像データをビット処理する部分が評価ビット列作成手段
の処理に該当し、ステップS6040における誤差R0
とR1のビット処理部分が誤差ビット列作成手段として
の処理に該当し、ステップS6040における誤差のビ
ット列と画像データのビット列によって12ビットアド
レスを作成する処理がアドレスビット列作成手段として
の処理に該当し、ステップS6050が変換手段として
の処理に該当し、ステップS6060が圧縮画像データ
出力手段としての処理に該当する。
Also, the portion of the image data for four pixels read from each of the even-numbered line and the odd-numbered line in step S6040 is subjected to bit processing, which corresponds to the processing of the evaluation bit string creating means.
And the bit processing part of R1 correspond to the processing as the error bit string generating means, and the processing of generating a 12-bit address by the error bit string and the bit string of the image data in step S6040 corresponds to the processing as the address bit string generating means. Step S6050 corresponds to processing as a conversion unit, and step S6060 corresponds to processing as a compressed image data output unit.

【0140】また、ステップS8020が第1ビット濃
度算出手段としての処理に該当し、ステップS8040
が第2ビット濃度算出手段としての処理に該当し、ステ
ップS8060が閾値手段としての処理に該当し、ステ
ップS8000、ステップS8110及びステップS8
120が制御手段としての処理に該当する。
Step S8020 corresponds to the processing as the first bit density calculating means, and step S8040
Corresponds to the processing as the second bit density calculating means, step S8060 corresponds to the processing as the threshold means, and steps S8000, S8110, and S8
120 corresponds to the processing as the control means.

【0141】更に、ROM14内に格納された変換テー
ブルが変換値記憶手段に該当する。
Further, the conversion table stored in the ROM 14 corresponds to the conversion value storage means.

【0142】[0142]

【発明の効果】以上説明したことから明らかなように、
請求項1に記載の画像形成装置は、パソコン等の上で動
作するアプリケーションソフトウェアやイメージスキャ
ナ、デジタルカメラ等の種々の画像入力源から受信した
画像データや、画像を言語(例えば、実施の形態におけ
るPCL言語)で記述した言語表現データを周知の方法
により画素に変換して画像データ化したものなどのよう
な複数の画素からなる画像の濃度を表す元画像データを
画像記憶手段に記憶し、この画像記憶手段に記憶された
画像データに対して複数の画素からなる圧縮領域を設定
して、その圧縮領域を順次移動させながら、評価濃度算
出手段により、誤差記憶手段に記憶された注目する圧縮
領域に隣接し既に処理済みの圧縮領域に対する誤差と領
域濃度算出手段によって算出された濃度との基づいて、
この注目する圧縮領域の評価濃度を算出し、生成手段に
よってこの評価濃度と所定の閾値と比較に基づいて、こ
の注目する圧縮領域に対して所定の濃度を割り当てるこ
とにより圧縮画像データを生成し、この圧縮画像データ
とこの圧縮領域の元の濃度との差である誤差を誤差算出
手段により算出し、この誤差を圧縮領域と対応付けて誤
差記憶手段に記憶し、次の圧縮領域の処理に使用できる
ようにする。
As is apparent from the above description,
According to the image forming apparatus of the present invention, image data or images received from various image input sources such as application software operating on a personal computer or the like, an image scanner, a digital camera, or the like can be written in a language (for example, in the embodiment). Original image data representing the density of an image composed of a plurality of pixels, such as image data obtained by converting language expression data described in (PCL language) into pixels by a well-known method, and storing the original image data in the image storage means. A compression area composed of a plurality of pixels is set for the image data stored in the image storage means, and while the compression area is sequentially moved, the compression area of interest stored in the error storage means is evaluated by the evaluation density calculation means. Based on the error with respect to the compressed area already processed and the density calculated by the area density calculating means,
Calculating the evaluation density of the compression area of interest, and generating compressed image data by assigning a predetermined density to the compression area of interest based on a comparison between the evaluation density and a predetermined threshold value by the generation unit, An error, which is a difference between the compressed image data and the original density of the compressed area, is calculated by the error calculating means, and the error is stored in the error storage means in association with the compressed area, and used for processing of the next compressed area. It can be so.

【0143】これにより、圧縮領域毎に順次、簡単な演
算と記憶処理を行うだけで、元画像データから圧縮画像
データを作成し、画素数を低減するので、使用する画像
記憶手段の容量を少なくできる。
Thus, the compressed image data is created from the original image data and the number of pixels is reduced by simply performing a simple operation and storage process sequentially for each compression area, so that the capacity of the image storage means used is reduced. it can.

【0144】また、所定の閾値との比較に基づいて、新
たな濃度を割り当てる際に、割り当てる濃度を元の画像
データの濃度のレンジよりも小さくすることで、画像の
品位は多少低下するが、使用する画像記憶手段の容量を
少なくすることが可能になり、さらに使用メモリを低減
できる。
When assigning a new density based on a comparison with a predetermined threshold value, by making the assigned density smaller than the density range of the original image data, the quality of the image is slightly reduced. It is possible to reduce the capacity of the image storage means to be used, and it is possible to further reduce the memory used.

【0145】また、請求項2に記載の画像形成装置は、
圧縮画像データが処理済みの元画像データが記憶されて
いた画像記憶手段の領域に順次格納されていくので、元
画像データの格納領域とは別の領域を圧縮画像データに
割り当てる必要がなく、また、圧縮処理が終了した時点
で、不要になった(従って、他の用途に使用できるよう
に解放してもよい)領域がまとまって得られるという効
果がある。
The image forming apparatus according to claim 2 is
Since the compressed image data is sequentially stored in the area of the image storage means in which the processed original image data is stored, it is not necessary to allocate an area different from the storage area of the original image data to the compressed image data, and At the time when the compression process is completed, there is an effect that areas which are no longer needed (and thus may be released so that they can be used for other purposes) can be collectively obtained.

【0146】また、請求項3に記載の画像形成装置は、
画素情報である濃度が、複数の濃度レベルを有するもの
でなく、例えば、0と1といった2値しか持たないもの
であり、この場合、濃度が1ビットで表させるので、よ
り簡易な演算で画素数の低減が可能になり、高速な処理
に適する。
Further, according to the image forming apparatus of the present invention,
The density, which is pixel information, does not have a plurality of density levels, but has only two values, for example, 0 and 1. In this case, the density is represented by one bit. The number can be reduced, which is suitable for high-speed processing.

【0147】また、請求項4に記載の画像形成装置は、
複数の画素からなる圧縮領域(画素組)を少なくとも1
つ内包する評価領域(ブロック)を設定し、この評価領
域の画素の濃度を示す評価ビット列とこの評価領域の前
に処理を行った際に発生した誤差を示す誤差ビット列と
を作成し、これらのビット列を変換手段に対する入力ビ
ット列として与えるべく構成し、その結果得られたアド
レスビット列を変換手段に入力する(アクセスする)こ
とにより、変換手段から圧縮画像データを得るので、圧
縮領域に対する圧縮処理(変換手段による変換処理)を
変換手段に入力されたアドレスビット列のみのデータか
ら実施でき、変換(圧縮)する処理の中で画像記憶手段
をアクセスする必要がないので、電気回路等のロジック
で構成することが容易になったり、CPUでの処理にお
いて周知のキャッシュ機能が効率的に働く様にプログラ
ミングすることが容易になり、高速化が行える。
The image forming apparatus according to claim 4 is
At least one compressed area (pixel group) consisting of a plurality of pixels
An evaluation area (block) including the evaluation area is set, and an evaluation bit string indicating the density of the pixel in this evaluation area and an error bit string indicating an error generated when processing is performed before this evaluation area are created. The bit stream is provided as an input bit stream to the conversion means, and the resulting address bit string is input (accessed) to the conversion means to obtain compressed image data from the conversion means. Conversion means) can be carried out from only the data of the address bit string input to the conversion means, and there is no need to access the image storage means during the conversion (compression) processing. Can be easily programmed, and can be programmed so that the well-known cache function works efficiently in the CPU processing. Will be easy, it can be performed faster.

【0148】また、請求項5に記載の画像形成装置は、
変換手段により出力された圧縮画像データを圧縮画像デ
ータ出力手段によって、順次、画像記憶手段内の元画像
データに対する圧縮処理が済んだ領域に記憶するので、
元画像データの格納領域とは別の領域を圧縮画像データ
に割り当てる必要がなく、また、圧縮処理が終了した時
点で、不要になった(従って、他の用途に使用できるよ
うに解放してもよい)領域がまとまって得られるという
効果がある。
Further, according to the image forming apparatus of the present invention,
Since the compressed image data output by the conversion means is sequentially stored by the compressed image data output means in the area where the original image data has been compressed in the image storage means,
There is no need to allocate an area other than the storage area of the original image data to the compressed image data, and it becomes unnecessary at the time of completion of the compression processing (thus, even if it is released so that it can be used for another purpose). There is an effect that the (good) region can be obtained as a unit.

【0149】また、請求項6に記載の画像形成装置は、
複数の圧縮領域に対する圧縮処理(変換手段による変換
処理)を変換手段に入力されたアドレスビット列のみの
データを循環的に利用でき、画像記憶手段を何度にも分
けてアクセスする必要が無く、さらに高速化できる。
The image forming apparatus according to claim 6 is
Compression processing (conversion processing by the conversion means) for a plurality of compression areas can use the data of only the address bit string input to the conversion means cyclically, and there is no need to access the image storage means over and over again. Speed up.

【0150】更に、請求項7に記載の画像形成装置は、
圧縮画像データが評価領域単位毎にビット列化されて出
力されるので、画像記憶手段へ格納する処理が一時期に
集中的に実行でき、処理の効率が高まる。特に、画像デ
ータが2値である場合には、この圧縮画像データ列を画
像記憶手段に格納する処理を簡易化できる。また、出力
時の誤差を表すビット列を入力時と同じ形式とすること
で、引き続く評価領域の圧縮処理への入力が容易にな
り、引き続く圧縮処理も含めて高速化できる。
Further, according to the image forming apparatus of the present invention,
Since the compressed image data is output in the form of a bit string for each evaluation area unit, the processing of storing the compressed image data in the image storage means can be performed intensively at one time, and the processing efficiency is increased. In particular, when the image data is binary, the process of storing the compressed image data sequence in the image storage unit can be simplified. Further, by making the bit string representing the error at the time of output the same as that at the time of input, the input to the compression processing of the subsequent evaluation area becomes easy, and the speed can be increased including the subsequent compression processing.

【0151】また、請求項8に記載の画像形成装置は、
評価領域(ブロック)で採り得る全ての画像データの組
み合わせとその評価領域へ入力され得る全ての誤差につ
いての組み合わせに基づいてそれらの組み合わせを表す
アドレスビット列に対応付けて変換値を記憶しておくの
で、変換処理は極めて簡易である。このとき、全ての組
み合わせについて記憶するのでは無く、組み合わせが発
生する頻度が高いものを優先的に記憶することも可能で
ある。
The image forming apparatus according to claim 8 is
Based on all combinations of image data that can be taken in the evaluation area (block) and all combinations of errors that can be input to the evaluation area, the conversion value is stored in association with the address bit string representing the combination. The conversion process is extremely simple. At this time, instead of storing all the combinations, it is also possible to preferentially store those having a high frequency of occurrence of the combinations.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の実施の形態としてのパソコンとレー
ザプリンタとを接続した状態の説明図である。
FIG. 1 is an explanatory diagram illustrating a state in which a personal computer and a laser printer according to an embodiment of the present invention are connected.

【図2】 実施の形態における概略ブロック図である。FIG. 2 is a schematic block diagram in the embodiment.

【図3】 パソコンにおけるプリンタドライバー処理の
フローチャートである。
FIG. 3 is a flowchart of a printer driver process in a personal computer.

【図4】 レーザプリンタにおけるプリンタ処理のフロ
ーチャートである。
FIG. 4 is a flowchart of a printer process in the laser printer.

【図5】 レーザプリンタにおけるエスケープシーケン
ス処理のフローチャートである。
FIG. 5 is a flowchart of an escape sequence process in the laser printer.

【図6】 レーザプリンタにおけるホストベースドデー
タ受信処理のフローチャートである。
FIG. 6 is a flowchart of a host-based data receiving process in the laser printer.

【図7】 レーザプリンタにおける使用メモリ減少処理
のフローチャートである。
FIG. 7 is a flowchart of a memory usage reduction process in the laser printer.

【図8】 レーザプリンタにおける未登録データ処理の
フローチャートである。
FIG. 8 is a flowchart of unregistered data processing in the laser printer.

【図9】 レーザプリンタにおける印刷処理のフローチ
ャートである。
FIG. 9 is a flowchart of a printing process in the laser printer.

【図10】 プリンタドライバーが出力するプリントデ
ータの構成説明図である。
FIG. 10 is a diagram illustrating the configuration of print data output by a printer driver.

【図11】 元画像データと圧縮画像データの関係を示
す説明図である。
FIG. 11 is an explanatory diagram showing a relationship between original image data and compressed image data.

【図12】 変換テーブルへの入力情報と出力情報に関
する説明図である。
FIG. 12 is an explanatory diagram regarding input information and output information to a conversion table.

【図13】 変換テーブルへ入力するアドレスビット列
と出力されるビット列に関する説明図である。
FIG. 13 is an explanatory diagram regarding an address bit string input to a conversion table and a bit string output.

【図14】 レーザプリンタにおける変換テーブルを用
いた間引き処理のフローチャートである。
FIG. 14 is a flowchart of a thinning process using a conversion table in a laser printer.

【図15】 レーザプリンタにおける圧縮処理のフロー
チャートである。
FIG. 15 is a flowchart of a compression process in the laser printer.

【図16】 レーザプリンタにおける圧縮処理のフロー
チャートである。
FIG. 16 is a flowchart of a compression process in the laser printer.

【符号の説明】[Explanation of symbols]

2・・・レーザプリンタ 4・・・パソコン 6、8・・・パラレルインターフェース 10・・・IEEE1284用ケーブル 12・・・CPU 14・・・ROM 16・・・RAM 18・・・センサ類 20・・・エンジン 22・・・操作部 24・・・CPU 26・・・ROM 28・・・RAM 30・・・補助記憶装置 2 laser printer 4 personal computer 6, 8 parallel interface 10 cable for IEEE 1284 12 CPU 14 ROM 16 RAM 18 sensors 20・ Engine 22 ・ ・ ・ Operation unit 24 ・ ・ ・ CPU 26 ・ ・ ・ ROM 28 ・ ・ ・ RAM 30 ・ ・ ・ Auxiliary storage device

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】複数の画素からなる画像の濃度を表す元画
像データを記憶する画像記憶手段に、複数の画素からな
る圧縮領域を設定し、その圧縮領域を順次移動させなが
ら、前記圧縮領域内の画素数よりも少ない画素の濃度を
表す圧縮画像データを作成し、前記圧縮画像データに基
づいて画像を形成する画像形成装置であって、 圧縮領域の各画素に対応する画像データの濃度を前記画
像記憶手段から読み出して、それらの濃度を加算する領
域濃度算出手段と、 圧縮領域に関して圧縮画像データとして出力される濃度
と、前記領域濃度算出手段によって算出された濃度との
差に基づく誤差を算出する誤差算出手段と、 前記誤差算出手段により算出した誤差を前記圧縮領域に
対応付けて記憶する誤差記憶手段と、 前記誤差記憶手段に記憶された注目する圧縮領域に隣接
する圧縮領域に対する誤差と、前記領域濃度算出手段に
よって算出された濃度とに基づいて、該注目する圧縮領
域の評価濃度を算出する評価濃度算出手段と、 前記評価濃度算出手段によって算出した評価濃度と所定
の閾値と比較に基づいて、所定の濃度を割り当てて圧縮
画像データを生成する生成手段と、 を備えたことを特徴とする画像形成装置。
1. A compression area comprising a plurality of pixels is set in an image storage means for storing original image data representing the density of an image comprising a plurality of pixels. An image forming apparatus that creates compressed image data representing the density of pixels smaller than the number of pixels and forms an image based on the compressed image data, wherein the density of the image data corresponding to each pixel in a compressed area is An area density calculating means for reading out from the image storing means and adding the densities; calculating an error based on a difference between the density output as compressed image data for the compressed area and the density calculated by the area density calculating means; Error calculating means, an error storing means for storing the error calculated by the error calculating means in association with the compression area, and a note stored in the error storing means. Evaluation density calculation means for calculating an evaluation density of the compressed area of interest based on an error with respect to a compression area adjacent to the compression area to be observed and the density calculated by the area density calculation means; And a generation unit that generates compressed image data by assigning a predetermined density based on a comparison between the evaluation density calculated by the above and a predetermined threshold.
【請求項2】前記生成手段によって得られた圧縮画像デ
ータを順次前記画像記憶手段に記憶する圧縮画像登録手
段とを備えたことを特徴とする請求項1に記載の画像形
成装置。
2. The image forming apparatus according to claim 1, further comprising a compressed image registration unit for sequentially storing the compressed image data obtained by said generation unit in said image storage unit.
【請求項3】前記画像の濃度は2値であることを特徴と
する請求項1あるいは請求項2のいずれかに記載の画像
形成装置。
3. The image forming apparatus according to claim 1, wherein the density of the image is binary.
【請求項4】複数の画素からなる画像の濃度を表す元画
像データを記憶する画像記憶手段に、複数の画素からな
る圧縮領域とその圧縮領域を少なくとも1つ内包する評
価領域を設定し、その評価領域を順次移動させながら、
前記圧縮領域内の画素数よりも少ない画素の濃度を表す
圧縮画像データを作成し、前記圧縮画像データに基づい
て画像を形成する画像形成装置であって、 評価領域の各画素に対応する画像データの濃度に基づい
て、評価ビット列を作成する評価ビット列作成手段と、 注目する評価領域に対して評価領域の移動方向で隣接し
合う圧縮領域に対して出力される圧縮画像データとその
圧縮領域の元画像データの濃度の差に基づくそれぞれの
誤差を誤差ビット列として作成する誤差ビット列作成手
段と、 前記評価ビット作成手段により作成された評価ビット列
と、前記誤差ビット列作成手段により作成された誤差ビ
ット列とを合成してアドレスを表すアドレスビット列を
作成するアドレスビット列作成手段と、 前記アドレスビット列作成手段によって作成されたアド
レスビット列に基づいて、圧縮画像データを示す圧縮ビ
ット列を出力する変換手段と、を備えたことを特徴とす
る画像形成装置。
4. A compressed area composed of a plurality of pixels and an evaluation area including at least one of the compressed areas are set in image storage means for storing original image data representing the density of an image composed of a plurality of pixels. While sequentially moving the evaluation area,
An image forming apparatus that creates compressed image data representing the density of pixels smaller than the number of pixels in the compressed area and forms an image based on the compressed image data, the image data corresponding to each pixel in an evaluation area Evaluation bit string creation means for creating an evaluation bit string based on the density of compressed image data output to a compressed area adjacent to the evaluation area of interest in the moving direction of the evaluation area; An error bit string creating means for creating each error based on the difference in density of image data as an error bit string; combining the evaluation bit string created by the evaluation bit creating means with the error bit string created by the error bit string creating means Address bit string creating means for creating an address bit string representing an address by means of Conversion means for outputting a compressed bit string indicating compressed image data based on the address bit string created as described above.
【請求項5】前記変換手段によって出力された圧縮ビッ
ト列を前記画像記憶手段に記憶する圧縮画像データ出力
手段を備えたことを特徴とする請求項4に記載の画像形
成装置。
5. The image forming apparatus according to claim 4, further comprising a compressed image data output unit that stores the compressed bit string output by the conversion unit in the image storage unit.
【請求項6】前記評価領域は、連続する複数の圧縮領域
を内包し、前記変換手段は、 前記アドレスビット列中の誤差ビット列で表される誤差
より第1濃度和を算出する第1ビット濃度算出手段と、 前記アドレスビット列中の評価ビット列の1つの圧縮領
域に対応付けられたビットより第2濃度和を算出する第
2ビット濃度算出手段と、 前記第1濃度和と前記第2濃度和とに基づいて評価濃度
を算出し、所定の閾値と比較して、その比較結果によっ
て圧縮画像データを作成する閾値手段と、 評価領域内の全ての圧縮領域について、前記閾値手段に
よって得られた圧縮画像データと前記第2濃度和との差
を新たな誤差として新たな第1濃度和を求め、前記圧縮
領域に隣接する次の圧縮領域に対する第2濃度和を前記
第2ビット濃度算出手段により求め、これら第1濃度和
及び第2濃度和を前記閾値手段に入力することを繰り返
す制御手段と、 を備えたことを特徴とする請求項4あるいは請求項5の
いずれかに記載の画像形成装置。
6. A first bit density calculation for calculating a first density sum from an error represented by an error bit string in the address bit string, wherein the evaluation area includes a plurality of continuous compression areas. Means, a second bit density calculating means for calculating a second density sum from bits associated with one compression area of the evaluation bit string in the address bit string, and a first density sum and a second density sum. Threshold value means for calculating an evaluation density based on the threshold value, comparing the result with a predetermined threshold value, and generating compressed image data based on the comparison result; and for all compressed areas in the evaluation area, the compressed image data obtained by the threshold value means. A new first density sum is obtained by using the difference between the first density sum and the second density sum as a new error, and a second density sum for the next compression area adjacent to the compression area is calculated by the second bit density calculation means. 6. An image forming apparatus according to claim 4, further comprising: control means for repeating input of said first density sum and said second density sum to said threshold means. apparatus.
【請求項7】前記変換手段は、前記閾値手段によって順
次出力される前記圧縮画像データをビット列化するとと
もに、前記誤差を前記誤差ビット列作成手段で作成する
ビット列と同じ形式にビット列化し出力することを特徴
をする請求項6に記載の画像形成装置。
7. The conversion means converts the compressed image data sequentially output by the threshold means into a bit string, and converts the error into a bit string in the same format as the bit string created by the error bit string creation means and outputs the bit string. 7. The image forming apparatus according to claim 6, wherein the image forming apparatus is characterized in that:
【請求項8】前記変換手段は、アドレスビット列と、圧
縮ビット列と誤差ビット列とを合成したビット列とを対
応付けて記憶する変換値記憶手段を備えたこと特徴とす
る請求項4から請求項7のいずれかに記載の画像形成装
置。
8. The conversion means according to claim 4, wherein said conversion means includes conversion value storage means for storing an address bit string and a bit string obtained by combining a compressed bit string and an error bit string in association with each other. An image forming apparatus according to any one of the above.
【請求項9】請求項1乃至請求項8のいずれかに記載の
画像形成装置の機能を、コンピュータプログラムにて実
現するプログラムが記載されたことを特徴とする記憶媒
体。
9. A storage medium, wherein a program for realizing a function of the image forming apparatus according to claim 1 by a computer program is described.
JP8309476A 1996-11-20 1996-11-20 Image forming device and storage medium Pending JPH10150549A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8309476A JPH10150549A (en) 1996-11-20 1996-11-20 Image forming device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8309476A JPH10150549A (en) 1996-11-20 1996-11-20 Image forming device and storage medium

Publications (1)

Publication Number Publication Date
JPH10150549A true JPH10150549A (en) 1998-06-02

Family

ID=17993450

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8309476A Pending JPH10150549A (en) 1996-11-20 1996-11-20 Image forming device and storage medium

Country Status (1)

Country Link
JP (1) JPH10150549A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019130704A (en) * 2018-01-30 2019-08-08 ブラザー工業株式会社 Image formation apparatus and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019130704A (en) * 2018-01-30 2019-08-08 ブラザー工業株式会社 Image formation apparatus and program

Similar Documents

Publication Publication Date Title
JPH0930060A (en) Printer control method and device
JP4656623B2 (en) Drawing method, image processing apparatus, and recording medium
US5835122A (en) Printing apparatus and method capable of selectively printing with a plurality of resolutions
EP0398681B1 (en) Output apparatus
JPH11105349A (en) Print processing system, print processing method and computer readable recording medium recording print processing control program
JPH10100483A (en) Printer, print data transmitter and recording medium
JP3159837B2 (en) Image processing method and apparatus based on graphics language
US6985260B1 (en) Apparatus and method for drawing a gradient fill object
US6310693B1 (en) Printing control apparatus and method, and printing system for reducing processing overhead
US6166824A (en) Print data processing and compression apparatus
JPH10150549A (en) Image forming device and storage medium
JP2773812B2 (en) Image processing device
EP0542317B1 (en) Apparatus for generating a character pattern for a serial printer
JP3728183B2 (en) Printing control apparatus, drawing control apparatus, data processing method, and storage medium
JP3754468B2 (en) Image data processing method and image processing apparatus
JP4208350B2 (en) Drawing apparatus, drawing method, and storage medium
JP2002063582A (en) Device and method for forming image
JP4336470B2 (en) Drawing control apparatus, drawing control method and program
JP4345055B2 (en) Image processing apparatus and method, and printer system
JP3450961B2 (en) Printing apparatus and control method thereof
US6246795B1 (en) Image processing apparatus and method
JP2006140597A (en) Device and method for printing control, computer program, and storage medium
JP3236053B2 (en) Image processing system and image processing method
JP3226583B2 (en) Color image processing system and image processing apparatus
JP2903517B2 (en) Image generator for printing devices