JP3569957B2 - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP3569957B2 JP3569957B2 JP13666994A JP13666994A JP3569957B2 JP 3569957 B2 JP3569957 B2 JP 3569957B2 JP 13666994 A JP13666994 A JP 13666994A JP 13666994 A JP13666994 A JP 13666994A JP 3569957 B2 JP3569957 B2 JP 3569957B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- font
- position information
- memory
- origin
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
- Controls And Circuits For Display Device (AREA)
- Dot-Matrix Printers And Others (AREA)
Description
【0001】
【産業上の利用分野】
本発明は画像処理装置に関するものであり、特に、ホストコンピュータ等の上位装置で作成される画像を、該上位装置とは解像度が異なる出力装置で出力するための解像度変換機能を有する画像処理装置に関する。
【0002】
【従来の技術】
上位装置から供給された文字をプリンタ等の出力装置に出力する際、前記上位装置からの指示に従って該文字の画像データをページメモリ上に展開する。この場合、該画像データの展開位置は次のパラメータによって特定される。図8において、ページメモリ原点0に対して(XDP,YDP)の位置にページメモリの使用領域原点Rがあり、該使用領域原点Rに対して(X0,Y0)の位置に文字出力域原点Mが設定されている。また、該文字出力域原点Mから(X1,Y1)の位置に文字ボディフェースの原点Nが設定され、さらに、該原点Nから(X2,Y2)のオフセットを有して文字レターフェースの原点Qつまり印字開始位置が設定される。なお、図8の例では、Y2=0である。メモリ上の前記各位置のうち、ページメモリ原点0はページメモリ固有の位置であり、他の点つまりページメモリ使用領域原点R、ならびに各原点M,N,Qは画像データ展開時に前記上位装置から指示される前記パラメータによって位置が特定される。これらのパラメータは上位装置の解像度に合った画素密度で指定される。
【0003】
ところで、画像を作成するホストコンピュータ等の上位装置とプリンタ等の出力装置との解像度が常に同一であるという保障はなく、互いが異なることが多い。例えば、240spi(スポット/インチ)の解像度能力を有する上位装置から供給された文字データを該上位装置の指示に従って300spiの解像度を有する出力装置で印字する場合がある。
【0004】
このような場合、解像度の差異を考慮せず、上位装置から供給された文字の画像データをそのまま300spiの解像度の出力装置で出力すると次のような不具合がある。つまり解像度の差異による上位装置と出力装置との画素密度の差によって文字の各ドット間隔が小さくなり、出力される文字が所望のものよりも小さくなる。
【0005】
このような不具合を解消するため、240spiから300spiへ画像データを解像度変換してページメモリに展開する。この解像度変換のためには、上記各原点や文字間隔等のパラメータを変換するとともに、出力装置の解像度に合ったドット数のフォントを選択して、文字の画像データをページメモリ上に作成することが行われている。
【0006】
解像度変換のための位置情報の変換制御に関しては、特公平4−14911号公報に一例が記載されている。この公報に記載された制御では、前記使用領域原点Rに対する原点Qの位置(X,Y)を、次の式で算出するようにしている。
X=X0+αX1+X2…(9) ,Y=Y0+βY1−Y2…(10)
同式において、αおよびβは、それぞれ文字の縦と横の変換倍率を示す。
【0007】
【発明が解決しようとする課題】
上記従来の解像度変換制御には次のような問題点があった。印字位置パラメータは整数ドットで処理をする必要があることから、前記原点を示すパラメータX0、Y0、X2、およびY2は上位装置で整数にする際の丸め誤差を含んでいる。一方、パラメータX1およびY1は変換倍率α,βを乗算した後に整数にするときに丸め誤差が生じる。このように、従来の解像度変換では算出誤差が少なくとも3ドット含まれる。
【0008】
また、実際の使用において、前記パラメータX0、Y0、X2、およびY2にも変換倍率を乗算する必要が生じることがある。つまり、実際の使用において、上位装置と画像処理装置とで整数でパラメータX0、Y0、X2、およびY2をやりとりする場合には、上位装置で1文字毎に解像度変換前のパラメータと変換倍率の乗算を行い、かつ整数化を行うことになり、上位装置の資源を多く使う等、負担が大きい。
【0009】
本発明は、上記問題点を解消し、解像度変換時の演算誤差を小さくでき、かつ上位装置における演算処理を簡素化することができる画像処理装置を提供することを目的とする。
【0010】
【課題を解決するための手段】
上記の課題を解決し、目的を達成するための本発明は、上位装置から供給される情報に基づいて算出した印字開始位置情報(X,Y)および印字する文字コードに対応したフォントメモリアドレスならびにフォントサイズを読み出して出力するコマンド処理手段と、前記フォントメモリアドレスおよびフォントサイズに基づいてフォントメモリからフォントデータを読み出し、かつ前記印字開始位置情報(X,Y)に従ってメモリへフォントデータを展開する文字出力制御手段とを具備すると共に、前記印字開始位置情報(X,Y)は、メモリ原点を基準とするメモリ使用領域域原点のX方向およびY方向位置情報を(XDP,YDP)、該メモリ使用領域原点を基準とする文字出力域原点のX方向およびY方向位置情報を(X0,Y0)、該文字出力域原点を基準とする印字位置原点のX方向およびY方向位置情報を(X1,Y1)、該印字位置原点を基準とするX方向およびY方向の印字位置オフセットを(X2,Y2)とし、解像度変換のためのX方向およびY方向それぞれの変換倍率をαおよびβとしたとき、次の式(1) ,式(2) によって算出される点に第1の特徴がある。
X=XDP+α(X0+X1+X2)……式(1)
Y=YDP+β(Y0+Y1+Y2)……式(2)
また、本発明は、前記位置情報X0+X1をX´、Y0+Y1をY´とし、文字間隔(本明細書では、直前の文字の文字ボディフェースの原点Nと、注目文字の文字ボディフェースの原点Nとの間隔)をFSSとしたとき、文字の印字方向がX方向およびY方向の場合、それぞれ該パラメータX´を式(3) ,(5) 、Y´を式(4) ,(6) によって前記印字開始位置情報(X,Y)を算出する点に第2の特徴がある。
【0011】
但し、式(3) 〜(6) において、パラメータnは処理対象文字を示す2以上の整数であり、n−1は該処理対象文字の1つ前の文字である。
X´n=X´n−1+FSS……(3)
Y´n=Y´n−1……(4)
X´n=X´n−1……(5)
Y´n=Y´n−1+FSS……(6)
【0012】
【作用】
第1の特徴を有する本発明では、パラメータX0,X1,X2を加算して1つのパラメータとし、加算して1つにまとめたパラメータに解像度変換倍率を乗算しているので、各パラメータを別個に処理する際に生じる丸め誤差の重複を回避できる。また、解像度変換に関係するパラメータについてはすべて変換倍率の乗算を該画像処理装置で行うので、上位装置に負担が及ばない。
【0013】
また、第2の特徴によれば、2文字目以降の印字開始位置情報の算出結果に、それ以前の丸め誤差が蓄積しない。
【0014】
【実施例】
以下、図面を参照して本発明を詳細に説明する。図1は本発明の画像処理装置の構成図である。同図において、解像度変換装置1は、パソコンやホストコンピュータのような上位装置20からの指示に従って画像処理を行い、プリンタ5に出力する。前記解像度変換装置1は、フォントメモリ2、文字出力制御装置3、ページメモリ4、パラメータ格納用メモリ6、コマンド処理装置7、およびプリンタ制御装置8から構成される。
【0015】
前記フォントメモリ2はRAMであり、上位装置20から供給されたフォントデータを格納する。パラメータ格納用メモリ6は上位装置20から供給された前記各原点を代表するパラメータ(位置パラメータ)を指示するコマンドや該コマンドに従って文字コードを検索するためのテーブル等が格納される。これらコマンドやテーブルの詳細は後述する。
【0016】
コマンド処理装置7は、上位装置からの処理開始指示に従って前記パラメータ格納用メモリ6から文字出力に必要なデータを読み出し、文字レターフェースの原点つまり印字開始位置Q(X,Y)を算出する。この印字開始位置Q(X,Y)とフォントメモリアドレスならびにフォントサイズは文字出力制御装置3に入力される。文字出力制御装置3は、コマンド処理装置7から供給されたフォントメモリアドレスとフォントサイズに従ってフォントデータメモリ2からフォントのビットマップデータを読み出し、前記印字開始位置Qからページメモリ4にデータを展開する。該展開されたフォントデータは、上位装置20からプリンタ制御装置8に供給される印字開始指示に応答してプリンタ5に出力される。
【0017】
次に、前記パラメータ格納用メモリ6に格納されるコマンドやテーブルの具体例を説明する。図2(a)にはページメモリ使用領域指定コマンド21を示す。該コマンド21にはページメモリ使用領域開始原点XDP,YDP、ページメモリ使用領域サイズXs ,YS が含まれる。図2(b)には解像度変換をしない場合のフォントAのフォントセットテーブル27を示し、図2(c)には解像度変換をする場合のフォントBのフォントセットテーブル25を示す。フォントAおよびBのフォントセットテーブルには、フォントサイズと文字間隔、ならびに文字コードに対応するフォントメモリアドレスが設定される。ここで、解像度変換をするためのフォントBは文字間隔FSSとフォントサイズとが異なった値となっているが、解像度変換を行わないフォントAは文字間隔FSSとフォントサイズとが同じ値となっている。図2(d)には、文字の種類によって文字間隔、フォントサイズ、ならびに印字開始位置Qつまり文字ボディフェースの原点Nに対する印字位置オフセットX2,Y2が異なる場合のフォントセットテーブル28を示す。図示のように、文字の種類つまり文字コードに対応して異なる値が設定される。例えば、英字では漢字とは違い、文字の種類によって前記文字間隔等が異なる。
【0018】
また、図3(a)には文字印字外部コマンド22を示す。該文字印字外部コマンド22には変換指定フラグF、変換倍率α,β、文字出力域原点M(X0,Y0)のデータ、文字コードテーブルアドレス、ならびにフォント検索テーブルアドレスが含まれる。解像度変換を行う場合は、前記変換指定フラグFは「1」に設定される。なお、この例では、縦横の変換倍率α,βには同じ値が設定されている。
【0019】
図3(b)には文字コードテーブル23を示す。該テーブル23には印字位置情報テーブルアドレスと印字する文字コードとが含まれる。該文字コードテーブル23は、前記文字コードテーブルアドレスによって検索される。図3(c)には印字位置情報テーブル26を示す。該印字位置テーブル26には、文字ボディフェースの原点Nつまり印字位置パラメータ(X1,Y1)とフォント番号が含まれる。該印字位置テーブル26は前記印字位置情報テーブルアドレスによって検索される。図3(d)にはフォント検索テーブル24を示す。該フォント検索テーブル24には各フォントのフォントセットテーブルアドレスが設定される。該フォント検索テーブル24は前記フォント検索テーブルアドレスによって検索され、さらに、前記フォント番号に対応するフォントのフォントセットテーブルアドレスが検索される。ここでは、フォント番号「2」に従ってフォントBのフォントセットテーブルアドレスが検索される。このアドレスは前記フォントセットテーブル25の先頭を示す。
【0020】
次に、文字の解像度変換処理をフローチャートを参照して説明する。ここでは、任意のm行目の文字処理について説明する。図4において、ステップS1では、文字印字外部コマンド22を参照して変換指定フラグFにより解像度変換指定の有無を判断する。該変換指定フラグFが「1」ならば解像度変換指定があったと判断してステップS2に進み、文字出力域パラメータ(X0,Y0)および変換倍率α,βを読み込む。ステップS3では、印字位置情報テーブル26から印字位置パラメータ(X1,Y1)を読み込む。ステップS4ではフォントセットテーブル25から印字位置オフセット(X2,Y2)および文字間隔FSSを読み込む。
【0021】
ステップS5では、第1文字目から処理を開始するため、何文字目かを表すパラメータnに「1」をセットする。ステップS6では、第1文字目の印字位置を算出するためパラメータX´nおよびY´nに前記パラメータX0とX1との加算値、および前記パラメータY0とY1との加算値を設定する。このパラメータX´nおよびY´nは1つの文字から次の文字の処理へ移行するときの誤差が積み重ならないように仮のアドレスとして設定するものである。
【0022】
ステップS7では、第n文字目の印字開始位置(X,Y)を算出する。該印字開始位置は次式によって算出される。
X=XDP+α(X´n+X2)…(7)
Y=YDP+β(Y´n+Y2)…(8)
ステップS8では、文字コードテーブル23の文字コードからフォントセットテーブル25のフォントメモリアドレスを導き出す。ステップS8では、文字出力制御装置3に印字開始位置(X,Y)を出力する。ここまでの処理によってページメモリ4の第m行目に1つの文字のフォントビットマップが展開される。
【0023】
ステップS10では、1行すべての文字の処理が終了したか否かが判断される。まだ処理されていない文字があると判断されたならばステップS11に進み、次の文字の処理のためパラメータnをインクリメントする。ステップS12では前記仮のアドレスを更新する。つまり直前の文字のX方向アドレスX´n−1に文字間隔FSSを加算して新たなパラメータX´nとし、Y´nは変化させないので、直前の文字のY方向アドレスY´n−1をY´nとして設定する。なお、文字の印刷方向が副走査方向つまりY方向である場合は、X´nにX´n−1を設定し、Y´nに(Y´n−1+FSS)を設定する。ステップS12が終了するとステップS7に戻る。
【0024】
また、変換指定フラグが「1」でない場合は、ステップS13に進んで通常の処理を行う。通常の処理とは前記フォントAを使用し、各パラメータX0,Y0X1,Y1ならびにX2,Y2に変換倍率を乗算しないで印字位置X,Yに文字の画像データを展開する処理をいう。この処理は本発明に直接関係しないので詳細の説明は省略する。ステップS14では、1行すべての文字の処理が終了したか否かが判断される。この判断が肯定ならば処理を終了する。同様にステップS10の判断が肯定ならば処理を終了する。
【0025】
上記フローチャートでは、各文字について印字位置オフセットX2,Y2および文字間隔FSSが固定の場合を説明した。これに対して、印字位置オフセットX2,Y2および文字間隔FSSが文字毎に変化する場合は次のような処理となる。
【0026】
図5のフローチャートにおいては処理の要部のみを示し、図4と同符号のステップは同一または同等の処理を示す。同図に示すように、前記ステップS5およびS6とステップS4との順序を入れ替え、ステップS5およびS6を先に、ステップS4を後に処理する。また、ステップS4では、フォントセットテーブル28から各文字コードに対応する印字位置オフセットX2,Y2および文字間隔FSSを読み出す。そして、1つの文字の処理を終了する毎に、ステップS12からこのステップS4に移行する。
【0027】
次に、上位装置20から指示されるパラメータによって具体的にページメモリ4に作成されるデータを参照して本実施例を説明する。図6は、副走査方向に文字を印字する場合であって、解像度変換をしない場合のデータの作成例を示す模式図である。同図において、上位装置20から指示された、ページメモリ4の原点0を基準にしたページメモリの使用領域原点R(XDP,YDP)、該使用領域原点Rを基準とした文字出力域原点M(X0,Y0)、該原点Mを基準とした文字ボディフェースの原点N(X1,Y1)、および該原点Nからの印字位置オフセット(X2,Y2)に従って文字の画像データが作成される。
【0028】
一方、上位装置20から供給される前記各原点を示すパラメータに基づいて解像度変換をして画像データをページメモリ4上に作成した例を図7に示す。印字開始位置(X,Y)は、次式で算出される。X=XDP+α(X0+X1+X2),Y=YDP+β(Y0+Y1+Y2)。
【0029】
また、上述のように、2文字目以降の印字位置は、(X0+X1)=X´n、(Y0+Y1)=Y´nとして、Y´nには1つ前の文字の位置Y´n−1に文字間隔FSSを加算した値を使用する。なお、X方向に印字する場合はX´n−1に文字間隔FSSを加算することはすでに述べたとおりである。
【0030】
このように、本実施例では、解像度変換を行う場合は、上位装置20から与えられたパラメータのうちメモリの絶対アドレスつまり使用領域原点Rを除く他の原点を指示するパラメータを一括してこれに解像度変換の倍率を乗算するようにした。
【0031】
【発明の効果】
以上の説明から明らかなように、請求項1および2の発明によれば、パラメータX0,X1,X2を加算して1つのパラメータとし、加算して1つにまとめたパラメータに解像度変換倍率を乗算しているので、各パラメータを別個に処理する際に生じる丸め誤差を1ドット以内に止めることができる。したがって、1ドット単位で画像を表現する際に、プリンタ等の出力装置によって高精度の出力結果が得られる。
【0032】
特に、請求項2の発明では、2文字目以降の印字開始位置情報の算出結果に、それ以前の丸め誤差が蓄積しない。
【0033】
また、解像度変換に関係するパラメータについてはすべて変換倍率の乗算を該画像処理装置で行うので、上位装置に負担が及ばない。特に上位装置の演算速度が画像処理装置よりも遅い場合に、システム全体の処理速度を上げることができる。
【図面の簡単な説明】
【図1】本発明の第1実施例の画像処理装置の構成を示すブロック図である。
【図2】パラメータ格納用メモリに格納されるコマンドとテーブルの例を示す図である。
【図3】パラメータ格納用メモリに格納されるコマンドとテーブルの例を示す図である。
【図4】文字間隔等が固定の場合の本発明にかかる処理を示すフローチャートである。
【図5】文字間隔等が文字ごとに変更される場合の本発明にかかる処理の要部を示すフローチヤートである。
【図6】解像度変換なしの場合のページメモリ上での文字の作成例を示す図である。
【図7】解像度変換をした場合のページメモリ上での文字の作成例を示す図である。
【図8】印字方向がY方向の場合に解像度変換なしでページメモリ上に文字を作成した例を示す図である。
【符号の説明】
1…画像処理装置、 2…フォントメモリ、 3…文字出力制御装置、 4…ページメモリ、 5…プリンタ、 6…パラメータ格納用メモリ、 7…コマンド処理装置、 8…プリンタ制御装置、 20…上位装置[0001]
[Industrial applications]
The present invention relates to an image processing device, and more particularly to an image processing device having a resolution conversion function for outputting an image created by a host device such as a host computer to an output device having a different resolution from that of the host device. .
[0002]
[Prior art]
When outputting a character supplied from a higher-level device to an output device such as a printer, image data of the character is developed on a page memory in accordance with an instruction from the higher-level device. In this case, the development position of the image data is specified by the following parameters. In FIG. 8, the use area origin R of the page memory is located at (XDP, YDP) with respect to the
[0003]
By the way, there is no guarantee that the resolution of a host device such as a host computer that creates an image and the output device such as a printer are always the same, and they are often different. For example, character data supplied from a host device having a resolution capability of 240 spi (spots / inch) may be printed by an output device having a resolution of 300 spi in accordance with an instruction from the host device.
[0004]
In such a case, if the image data of the character supplied from the higher-level device is directly output by the output device having the resolution of 300 spi without considering the difference in resolution, the following problem occurs. That is, the dot interval between characters becomes smaller due to the difference in pixel density between the host device and the output device due to the difference in resolution, and the output character becomes smaller than desired.
[0005]
In order to solve such a problem, the resolution of the image data is converted from 240 spi to 300 spi, and the image data is developed in the page memory. For this resolution conversion, the above-mentioned parameters such as the origin and the character spacing are converted, and a font having the number of dots corresponding to the resolution of the output device is selected, and character image data is created on the page memory. Has been done.
[0006]
An example of the conversion control of the position information for the resolution conversion is described in Japanese Patent Publication No. 4-14911. In the control described in this publication, the position (X, Y) of the origin Q with respect to the use region origin R is calculated by the following equation.
X = X0 + αX1 + X2 (9), Y = Y0 + βY1-Y2 (10)
In the equation, α and β indicate the vertical and horizontal conversion magnifications of the character, respectively.
[0007]
[Problems to be solved by the invention]
The conventional resolution conversion control has the following problems. Since the print position parameter needs to be processed with an integer dot, the parameters X0, Y0, X2, and Y2 indicating the origin include a rounding error when the host device makes the integer. On the other hand, when the parameters X1 and Y1 are multiplied by the conversion magnifications α and β and then converted to integers, a rounding error occurs. As described above, in the conventional resolution conversion, the calculation error includes at least three dots.
[0008]
In actual use, the parameters X0, Y0, X2, and Y2 may need to be multiplied by the conversion magnification. That is, in actual use, when the parameters X0, Y0, X2, and Y2 are exchanged between the host device and the image processing device as integers, the host device multiplies the parameter before resolution conversion by the conversion magnification for each character. Is performed, and the number is converted to an integer, which imposes a heavy burden, such as using a lot of resources of a higher-level device.
[0009]
SUMMARY OF THE INVENTION It is an object of the present invention to provide an image processing apparatus which can solve the above-mentioned problems, can reduce the calculation error at the time of resolution conversion, and can simplify the calculation processing in a host device.
[0010]
[Means for Solving the Problems]
SUMMARY OF THE INVENTION In order to solve the above-mentioned problems and achieve the object, the present invention provides a print start position information (X, Y) calculated based on information supplied from a host device, a font memory address corresponding to a character code to be printed, and A command processing means for reading and outputting a font size; a character for reading font data from a font memory based on the font memory address and the font size; and expanding font data to a memory in accordance with the print start position information (X, Y) together and an output control unit, the print start position information (X, Y) is the X-direction and Y-direction position information of the memory use area zone origin relative to the memory origin (XDP, YDP), the memory used The X-direction and Y-direction position information of the character output area origin based on the area origin is (X0, Y0), The X and Y direction position information of the print position origin with respect to the character output area origin is defined as (X1, Y1), and the print position offset in the X and Y directions with respect to the print position origin is defined as (X2, Y2). The first feature is that when the conversion magnifications in the X and Y directions for resolution conversion are α and β, respectively, the following formulas (1) and (2) are used.
X = XDP + α (X0 + X1 + X2) Equation (1)
Y = YDP + β (Y0 + Y1 + Y2) Equation (2)
Further, the present invention is, X'the position information X0 + X1, and Y'the Y0 + Y1, the character spacing (herein, the origin N of the character body face the preceding character, the origin N of the character body face of the noted character when the interval) was FSS, when the printing direction of the character in the X direction and Y direction, respectively the parameters X'formula (3), (5), wherein the Y'(4), wherein the (6) A second feature is that the print start position information (X, Y) is calculated.
[0011]
However, in Equations (3) to (6), the parameter n is an integer of 2 or more indicating the character to be processed, and n-1 is the character immediately before the character to be processed.
X'n = X'n-1 + FSS (3)
Y'n = Y'n-1 (4)
X'n = X'n-1 (5)
Y'n = Y'n-1 + FSS (6)
[0012]
[Action]
In the present invention having the first feature, the parameters X0, X1, and X2 are added to form one parameter, and the added parameters are multiplied by the resolution conversion magnification. Overlapping rounding errors that occur during processing can be avoided. In addition, since the image processing device multiplies all the parameters related to the resolution conversion by the conversion magnification, no burden is imposed on the host device.
[0013]
Further, according to the second feature, the previous rounding error is not accumulated in the calculation result of the print start position information for the second and subsequent characters.
[0014]
【Example】
Hereinafter, the present invention will be described in detail with reference to the drawings. FIG. 1 is a configuration diagram of the image processing apparatus of the present invention. In FIG. 1, a
[0015]
The
[0016]
The
[0017]
Next, specific examples of commands and tables stored in the
[0018]
FIG. 3A shows a character print
[0019]
FIG. 3B shows the character code table 23. The table 23 includes a print position information table address and a character code to be printed. The character code table 23 is searched by the character code table address. FIG. 3C shows the print position information table 26. The print position table 26 includes the origin N of the character body face, that is, the print position parameters (X1, Y1) and the font number. The print position table 26 is searched by the print position information table address. FIG. 3D shows the font search table 24. In the font search table 24, a font set table address of each font is set. The font search table 24 is searched by the font search table address, and further, a font set table address of the font corresponding to the font number is searched. Here, the font set table address of the font B is searched according to the font number “2”. This address indicates the head of the font set table 25.
[0020]
Next, the character resolution conversion processing will be described with reference to a flowchart. Here, the character processing of an arbitrary mth line will be described. In FIG. 4, in step S1, the presence or absence of resolution conversion designation is determined by the conversion designation flag F with reference to the character print
[0021]
In step S5, "1" is set to a parameter n representing the number of the character in order to start the processing from the first character. In step S6, the added value of the parameters X0 and X1 and the added value of the parameters Y0 and Y1 are set in the parameters X'n and Y'n for calculating the printing position of the first character. These parameters X'n and Y'n are set as tentative addresses so that errors when shifting from one character to the processing of the next character do not accumulate.
[0022]
In step S7, the print start position (X, Y) of the n-th character is calculated. The print start position is calculated by the following equation.
X = XDP + α (X′n + X2) (7)
Y = YDP + β (Y′n + Y2) (8)
In step S8, the font memory address of the font set table 25 is derived from the character code of the character code table 23. In step S8, the print start position (X, Y) is output to the character
[0023]
In step S10, it is determined whether or not the processing of all the characters in one line has been completed. If it is determined that there is a character that has not been processed, the process proceeds to step S11, and the parameter n is incremented for processing the next character. In step S12, the temporary address is updated. That is, the character spacing FSS is added to the X-direction address X'n-1 of the immediately preceding character to form a new parameter X'n, and Y'n is not changed. Set as Y'n. If the character printing direction is the sub-scanning direction, that is, the Y direction, X'n is set to X'n-1 and Y'n is set to (Y'n-1 + FSS). When step S12 ends, the process returns to step S7.
[0024]
If the conversion designation flag is not "1", the process proceeds to step S13 to perform a normal process. The normal process is a process of using the font A and expanding the character image data at the print positions X and Y without multiplying the parameters X0, Y0X1, Y1 and X2, Y2 by the conversion magnification. Since this processing is not directly related to the present invention, detailed description will be omitted. In step S14, it is determined whether the processing of all the characters in one line has been completed. If this determination is affirmative, the process ends. Similarly, if the determination in step S10 is affirmative, the process ends.
[0025]
In the above flowchart, the case where the printing position offsets X2, Y2 and the character spacing FSS are fixed for each character has been described. On the other hand, when the print position offsets X2 and Y2 and the character spacing FSS change for each character, the following processing is performed.
[0026]
In the flowchart of FIG. 5, only the main part of the processing is shown, and the steps denoted by the same reference numerals as those in FIG. 4 indicate the same or equivalent processing. As shown in the figure, the order of steps S5 and S6 and step S4 are interchanged, and steps S5 and S6 are processed first, and step S4 is processed later. In step S4, the print position offsets X2, Y2 and the character spacing FSS corresponding to each character code are read from the font set table 28. Then, every time the processing of one character is completed, the process shifts from step S12 to step S4.
[0027]
Next, the present embodiment will be described with reference to data specifically created in the page memory 4 based on parameters specified by the
[0028]
On the other hand, FIG. 7 shows an example in which image data is created on the page memory 4 by performing resolution conversion based on the parameters indicating the origins supplied from the
[0029]
As described above, the printing positions of the second and subsequent characters are (X0 + X1) = X'n, (Y0 + Y1) = Y'n, and Y'n is the position Y'n-1 of the immediately preceding character. And a value obtained by adding the character spacing FSS to the value. When printing in the X direction, the character spacing FSS is added to X'n-1 as described above.
[0030]
As described above, in the present embodiment, when performing resolution conversion, among the parameters given from the higher-
[0031]
【The invention's effect】
As is apparent from the above description, according to the first and second aspects of the present invention, the parameters X0, X1, and X2 are added to form one parameter, and the added parameters are multiplied by the resolution conversion magnification. Therefore, a rounding error generated when each parameter is separately processed can be stopped within one dot. Therefore, when an image is expressed in units of one dot, a highly accurate output result can be obtained by an output device such as a printer.
[0032]
In particular, according to the second aspect of the present invention, the previous rounding error is not accumulated in the calculation result of the print start position information for the second and subsequent characters.
[0033]
In addition, since the image processing device multiplies all the parameters related to the resolution conversion by the conversion magnification, no burden is imposed on the host device. In particular, when the operation speed of the host device is lower than that of the image processing device, the processing speed of the entire system can be increased.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to a first embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a command and a table stored in a parameter storage memory.
FIG. 3 is a diagram illustrating an example of a command and a table stored in a parameter storage memory.
FIG. 4 is a flowchart illustrating a process according to the present invention when a character interval or the like is fixed.
FIG. 5 is a flowchart showing a main part of a process according to the present invention when a character interval or the like is changed for each character.
FIG. 6 is a diagram illustrating an example of creating a character on a page memory when resolution conversion is not performed.
FIG. 7 is a diagram illustrating an example of creating characters on a page memory when resolution conversion is performed.
FIG. 8 is a diagram illustrating an example in which characters are created on a page memory without resolution conversion when the printing direction is the Y direction.
[Explanation of symbols]
DESCRIPTION OF
Claims (2)
フォントデータを格納するフォントメモリと、
上位装置から供給される前記位置情報を格納するパラメータ格納手段と、
前記位置情報に基づいて算出した印字開始位置情報(X,Y)および印字する文字コードに対応したフォントメモリアドレスならびにフォントサイズを読み出して出力するコマンド処理手段と、
前記フォントメモリアドレスおよびフォントサイズに基づいてフォントメモリからフォントデータを読み出し、かつ前記印字開始位置情報(X,Y)に従って前記メモリへフォントデータを展開する文字出力制御手段とを具備すると共に、
前記印字開始位置情報(X,Y)は、
メモリ原点を基準とするメモリ使用領域原点のX方向およびY方向位置情報を(XDP,YDP)、該メモリ使用領域原点を基準とする文字出力域原点のX方向およびY方向位置情報を(X0,Y0)、該文字出力域原点を基準とする印字位置原点のX方向およびY方向位置情報を(X1,Y1)、該印字位置原点を基準とするX方向およびY方向の印字位置オフセットを(X2,Y2)とし、解像度変換のためのX方向およびY方向それぞれの変換倍率をαおよびβとしたとき、式(1) ,式(2) によって算出されることを特徴とする画像処理装置。
X=XDP+α(X0+X1+X2)……式(1)
Y=YDP+β(Y0+Y1+Y2)……式(2)In an image processing apparatus for creating font data whose resolution has been converted on a memory in accordance with position information in a coordinate system before resolution conversion supplied from a higher-level device,
A font memory for storing font data,
Parameter storage means for storing the position information supplied from the host device,
And command processing means for calculating the print start position information (X, Y) and font memory address corresponding to the character code to be printed and read the font size output based on the position information,
Character output control means for reading font data from a font memory based on the font memory address and font size, and developing font data in the memory in accordance with the print start position information (X, Y);
The print start position information (X, Y) is
The X-direction and Y-direction position information of the memory used areas zero point relative to the memory origin (XDP, YDP), an X-direction and Y-direction position information of the character output area origin as a reference the memory use area origin (X0 , Y0), the position information in the X and Y directions of the print position origin with reference to the character output area origin is (X1, Y1), and the print position offset in the X direction and Y direction with respect to the print position origin is (X1, Y1). X2, Y2), and when the conversion magnifications in the X and Y directions for resolution conversion are α and β, the image processing apparatus is calculated by the equations (1) and (2).
X = XDP + α (X0 + X1 + X2) Equation (1)
Y = YDP + β (Y0 + Y1 + Y2) Equation (2)
但し、式において、パラメータnは処理対象文字を示す2以上の整数であり、n-1は該処理対象文字の1つ前の文字である。
X´n=X´n-1+FSS……(3)
Y´n=Y´n-1……(4)
X´n=X´n-1……(5)
Y´n=Y´n-1+FSS……(6)In the calculation of the print start position information (X, Y), when the position information X0 + X1 is X ', Y0 + Y1 is Y', the character interval is FSS, and the character print direction is the X direction and the Y direction, respectively. 2. The image processing apparatus according to claim 1, wherein said parameter X 'is calculated by equations (3) and (5), and Y' is calculated by equations (4) and (6).
However, in the formula, the parameter n is an integer of 2 or more indicating the character to be processed, and n-1 is the character immediately before the character to be processed.
X'n = X'n-1 + FSS ... (3)
Y'n = Y'n-1 ... (4)
X'n = X'n-1 ... (5)
Y'n = Y'n-1 + FSS ... (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP13666994A JP3569957B2 (en) | 1994-05-27 | 1994-05-27 | Image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP13666994A JP3569957B2 (en) | 1994-05-27 | 1994-05-27 | Image processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH07319442A JPH07319442A (en) | 1995-12-08 |
JP3569957B2 true JP3569957B2 (en) | 2004-09-29 |
Family
ID=15180722
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP13666994A Expired - Fee Related JP3569957B2 (en) | 1994-05-27 | 1994-05-27 | Image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3569957B2 (en) |
-
1994
- 1994-05-27 JP JP13666994A patent/JP3569957B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH07319442A (en) | 1995-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0345076A (en) | Processing system for picture data | |
JP3145509B2 (en) | Character generation method and device | |
US5537131A (en) | Character generating method and apparatus | |
KR100306862B1 (en) | Character pattern generator, character generating method, and storage medium therefor | |
JP3037854B2 (en) | Character generation method and device | |
JP3569957B2 (en) | Image processing device | |
KR100227178B1 (en) | Character generation device | |
KR100254659B1 (en) | Character forming apparatus | |
JPH01290448A (en) | Character generator | |
JP3037023B2 (en) | Character generator | |
JP2727667B2 (en) | Drawing equipment | |
JP2806790B2 (en) | Character generator and method | |
JPH0511734A (en) | Character pattern generating device | |
JP2861201B2 (en) | Data converter | |
JP3039214B2 (en) | Data converter | |
KR940001106B1 (en) | Image processing method and apparatus therefor | |
JP3347756B2 (en) | Character generation method and device | |
JP2901526B2 (en) | Character generator | |
JP3055306B2 (en) | Data output device | |
JPH07152737A (en) | Document preparing device | |
JPH05216456A (en) | Character output device | |
JPH02238965A (en) | Recorder | |
JPH0511736A (en) | Character pattern output device | |
JPH04269797A (en) | Character data generation device | |
JPH08153092A (en) | Document processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040309 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040506 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20040601 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040614 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080702 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090702 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100702 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100702 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110702 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110702 Year of fee payment: 7 |
|
LAPS | Cancellation because of no payment of annual fees |