2

ポストスクリプトに画像を追加する簡単な方法に基づいて、次のように書きました。

gsave
    360 72 translate                            % set lower left of image at (360, 72)
    230 346 scale                               % size of rendered image is 175 points by 47 points
    2304                                        % number of columns per row
    3456                                        % number of rows
    8                                           % bits per color channel (1, 2, 4, or 8)
    [2304 0 0 -3456 0 3456]                     % transform array... maps unit square to pixel
    (graphics/IMG_2216.jpg) (r) file /DCTDecode filter   % opens the file and filters the image data
    false                                       % pull channels from separate sources
    3                                           % 3 color channels (RGB)
    colorimage
grestore

しかし、これは次のようになります:

Error: /invalidfileaccess in --file--
Operand stack:
   2304   3456   8   --nostringval--   (graphics/IMG_2216.jpg)   (r)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1894   1   3   %oparray_pop   1893   1   3   %oparray_pop   --nostringval--   1877   1   3   %oparray_pop   1771   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:126/200(L)--   --dict:136/228(L)--
Current allocation mode is local

ここで何がうまくいかないのですか?

4

1 に答える 1

1

単純に、ファイルへのアクセスに問題があります。指定した場所にファイルが存在しないか、ファイルへのアクセス権がありません。

ファイルを読み取り用に開いている場合、ファイルが存在しない可能性が最も高くなります。完全修飾パスを使用していないことに気付きました。おそらく PostScript を間違った場所から実行しているのでしょう。

于 2013-09-12T07:05:37.587 に答える