AIファイルとは何ですか? |知識ベース

導入

AIファイルは、Adobe Illustrator によって作成・使用されるファイルです。PostScript 言語で記述されていますが、詳しくは「PSファイルとは?」という記事をご覧ください。PostScript 言語構文は、Backus–Naur 形式(BNF)での後置記法があることを思い出してください。

operand1...operandm operator

また、PS ファイルは prologscript のパーツで構成される最小限の構造を持っています。

%!PS-Adobe-3.0 EPSF
<header comments>
%%EndComments
%%BeginProlog
{<proc set>}    (not required, but is normally present)
%%EndProlog
<setup>
{<layer>}|{<object>}
{<page trailer>}
<document trailer>
%%EOF

Prolog には、後続のスクリプトが必要とするデータが含まれます。レンダリングや印刷に関する情報(PostScript のバージョン、バウンディングボックス、作成者、作成日、タイトルなど)や、必要なフォント、グローバル変数、手順が定義されます。手順は、リテラル名でアクセスできる辞書 procsets に格納され、すべての procsets には名前が付けられています。EPS ファイルで prolog に定義されていないフォントやリソースが必要な場合、少なくとも %%DocumentNeededFonts%%DocumentNeededResources%%DocumentNeededProcsets といったコメントが含まれます。PS/EPS ファイルの構造は、%% で始まる特別な構造コメントでマークされています。

.aiファイルとは何ですか?

AI ファイル(Adobe Illustrator ファイル)は、実際には EPS ファイルであり、AI 仕様に従っています。EPS ファイルには必須の 2 つのコメントが含まれます。

%!PS-Adobe-3.0 EPSF

and

%%BoundingBox: ...

AIとEPSファイルの違い。

主な違いはオペレーターです。Adobe Illustrator のオペレーターは 1 文字または 2 文字のシンボルで構成されますが、PS/EPS では通常、2 文字以上の人間が読みやすいキーワードが使用されます。

Adobe Illustrator は 130 以上の 1〜2 文字のオペレーターを使用していますが、これらの定義は EPS ファイルのように AI ファイルの Prolog に保存されていません。代わりに、Illustrator アプリケーション内部に保持され、起動時にメモリへロードされます。 これは、EPSとAIファイルの2番目の主な違いです。

したがって、AI ファイルは、Adobe Illustrator が作成・編集・表示・印刷に使用される場合にのみ、EPS ファイルとして扱われます。Prolog に含まれない AI オペレーターの定義や手順セット、フォントなどは、Adobe Illustrator のライセンスを持つ内部ユーザーのみが利用でき、外部の消費者はアクセスできません。そのため、AI 形式は独自のファイル形式として扱われます。

以下に示すように、一部の AI オペレーターは PS 演算子の短縮形です。

AI operator

x y m
x y l, x y L
x1 y1 x2 y2 x3 y3 c, x1 y1 x2 y2 x3 y3 C
num w
H
Xa

Native PS operator

x y moveto
x y lineto
x1 y1 x2 y2 x3 y3 curveto
num setlinewidth
closepath
red green blue setrgbcolor

Description

starts a new subpath of the current path
appends a straight line segment to the current path
appends a section of a cubic Bezier curve to the current path
sets the line width parameter in the graphics state
closes the current subpath
sets the current color space in the graphics state to DeviceRGB and the current color to the component values specified by red, green, and blue

その他は、PS演算子のより詳細な形式を表しています。

AI operator

x2 y2 x3 y3 v, x2 y2 x3 y3 V
x1 y1 x3 y3 y, x1 y1 x3 y3 Y
red green blue Xa
red green blue XA
cyan magenta yellow black k
cyan magenta yellow black K
F
f
S
s
[ a b c d tx ty ] llx lly urx ury
h w bits ImageType AlphaChannelCount
reserved bin-ascii ImageMask
XI

Description

adds a Bezier curve segment to the current path between the current point and the point x3, y3, using the current point and then x2, y2 as the Bezier direction points
appends a Bezier curve to the current path between the current point and the point x3, y3 using x1, y1 and x3, y3 as the Bezier direction points
setrgbcolor for fill
setrgbcolor for stroke
setcmykcolor for fill
setcmykcolor for stroke
fills the area enclosed by the current path with the current filling color or pattern, leaving it as an open path
the same, but close path
strokes the area enclosed by the current path with the current filling color or pattern, leaving it as an open path
the same, but close path
describes a raster image in Adobe Illustrator

また、新しいオペレーター、たとえばテキスト、グラデーション、レイヤーを扱うオペレーターがいます。

AI operator

N
n
B
b
(path) modified XG
type To
TO
alignment Ta
a b c d ty ty Tm
ty ty Td
name Ln
[ a b c d tx ty ] llx lly urx ury
h w bits ImageType AlphaChannelCount
reserved bin-ascii ImageMask
XF

Description

neither fills nor strokes, leaving it as an open path
the same, but close path
fills and strokes, leaving it as an open path
the same, but close path
image link operator
begins a text object. The type argument take on one of the following values: 0 − point text; 1 − area text; 2 − path text
ends a text object and restores the current transformation matrix
sets text alignment both horizontally and vertically
sets the text matrix for text along a path
translates the text matrix by tx and ty to the beginning of the next line of text
sets layer name
describes a raster image in Adobe Illustrator when the actual image data is not included in the file

特にグループ化オペレーターについて言及する価値があります。これらは Begin と End のオペレーターで構成され、その間に他のオペレーターが配置されます。

AI operator

*u ... *U
u ... U
name type nColors Bd ... BD
topLeftCellIndex selectedIndex Pb ... PB
Mb ... MB
visible preview enabled printing
dimmed hasMultiLayerMasks
colorIndex red green blue
Lb ... LB

Description

begin compound path, end compound path
begin compound group, end compound group
begin gradient definition, end gradient definition
begin palette, end palette
begin mask, end mask
begin layer definition, end layer definition

3番目の違いは、擬似コメントです。 PostScriptの通訳は標準コメント、「」で始まる行、および「 %% 」で始まる構造コメントを区別していることをすでに知っているように。 Adobe Illustratorは、「%_ 」で始まる、いわゆる「擬似」コメントを追加します。これらのコメントは、実際には真新しい、Adobe Illustratorのオペレーターに特有のものです。それらは、PostScriptインタープリターによって無視されるためにコメントとして実装されますが、Adobe IllustratorおよびAIファイルを読み取って解析する他のアプリケーションで使用されます。以下は、そのようなコメントオペレーターの例です。

AI operator

colorSpec colorStyle midPoint rampPoint %_Bs
rampSpec rampType %_Br
%_Gs
%_

Description

gradient color stop description
description of the gradient ramp
opens the graph section
make some other peculiar to Adobe Illustrator operators ignorable by PS interpreter

AIファイルとEPSファイルの最後の違いは、 revisable form です。 Adobeは、ドキュメントの最終フォームとの最終フォームを分離します。 最終フォームには、ページの表示または印刷に必要な情報のみが含まれています。 Revisable Form には、アプリケーションのドキュメントの編集に使用できるが、印刷には必要ない他のものが含まれています。一部のAI演算子は、 revisable form に対してのみ存在します。特に、これらの演算子の多くは、テキストの操作に使用されます。擬似コメントはすべて、 revisable form に使用されます。対照的に、EPSファイルは最終フォームのドキュメントです。

AIファイルは何に使用されていますか?

AIファイルは、Adobe Illustratorアプリケーショングラフィックスの編集、転送、保存に使用されます。

AIファイルを開くにはどうすればよいですか?

AIファイルは、スタンドアロンAdobe Illustratorアプリケーションで開かれて表示できます。 AI Viewerを使用して、AsposeからYPURドキュメントを開くこともできます。これは、インストールを必要としないクロスプラットフォームアプリです。

PDFはAIファイルと同じですか?

いいえ、それらは異なる形式と言語です。 PDFとAIファイルには同じ内部ページの説明モデルがありますが、PDFは静的なページ説明言語であり、AIはPostScriptの動的ページ説明言語のサブセットです。

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.