AIファイルとは何ですか? |知識ベース
導入
AIファイルは、Adobe Illustrator によって作成・使用されるファイルです。PostScript 言語で記述されていますが、詳しくは「PSファイルとは?」という記事をご覧ください。PostScript 言語構文は、Backus–Naur 形式(BNF)での後置記法があることを思い出してください。
operand1...operandm operator |
また、PS ファイルは prolog と script のパーツで構成される最小限の構造を持っています。
%!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 |
%%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 mx y l, x y Lx1 y1 x2 y2 x3 y3 c, x1 y1 x2 y2 x3 y3 Cnum wHXa | Native PS operator x y movetox y linetox1 y1 x2 y2 x3 y3 curvetonum setlinewidthclosepathred green blue setrgbcolor | Description starts a new subpath of the current pathappends a straight line segment to the current pathappends a section of a cubic Bezier curve to the current pathsets the line width parameter in the graphics statecloses the current subpathsets 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 Vx1 y1 x3 y3 y, x1 y1 x3 y3 Yred green blue Xared green blue XAcyan magenta yellow black kcyan magenta yellow black KFfSs[ a b c d tx ty ] llx lly urx uryh w bits ImageType AlphaChannelCountreserved 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 pointsappends 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 pointssetrgbcolor for fillsetrgbcolor for strokesetcmykcolor for fillsetcmykcolor for strokefills the area enclosed by the current path with the current filling color or pattern, leaving it as an open paththe same, but close pathstrokes the area enclosed by the current path with the current filling color or pattern, leaving it as an open paththe same, but close pathdescribes a raster image in Adobe Illustrator |
また、新しいオペレーター、たとえばテキスト、グラデーション、レイヤーを扱うオペレーターがいます。
AI operator NnBb(path) modified XGtype ToTOalignment Taa b c d ty ty Tmty ty Tdname Ln[ a b c d tx ty ] llx lly urx uryh w bits ImageType AlphaChannelCountreserved bin-ascii ImageMask XF | Description neither fills nor strokes, leaving it as an open paththe same, but close pathfills and strokes, leaving it as an open paththe same, but close pathimage link operatorbegins a text object. The type argument take on one of the following values: 0 − point text; 1 − area text; 2 − path textends a text object and restores the current transformation matrixsets text alignment both horizontally and verticallysets the text matrix for text along a pathtranslates the text matrix by tx and ty to the beginning of the next line of textsets layer namedescribes a raster image in Adobe Illustrator when the actual image data is not included in the file |
特にグループ化オペレーターについて言及する価値があります。これらは Begin と End のオペレーターで構成され、その間に他のオペレーターが配置されます。
AI operator *u ... *Uu ... Uname type nColors Bd ... BDtopLeftCellIndex selectedIndex Pb ... PBMb ... MBvisible preview enabled printingdimmed hasMultiLayerMaskscolorIndex red green blue Lb ... LB | Description begin compound path, end compound pathbegin compound group, end compound groupbegin gradient definition, end gradient definitionbegin palette, end palettebegin mask, end maskbegin layer definition, end layer definition |
3番目の違いは、擬似コメントです。 PostScriptの通訳は標準コメント、「%」で始まる行、および「 %% 」で始まる構造コメントを区別していることをすでに知っているように。 Adobe Illustratorは、「%_ 」で始まる、いわゆる「擬似」コメントを追加します。これらのコメントは、実際には真新しい、Adobe Illustratorのオペレーターに特有のものです。それらは、PostScriptインタープリターによって無視されるためにコメントとして実装されますが、Adobe IllustratorおよびAIファイルを読み取って解析する他のアプリケーションで使用されます。以下は、そのようなコメントオペレーターの例です。
AI operator colorSpec colorStyle midPoint rampPoint %_BsrampSpec rampType %_Br%_Gs%_ | Description gradient color stop descriptiondescription of the gradient rampopens the graph sectionmake 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の動的ページ説明言語のサブセットです。