为什么我在--file--中得到错误:/ invalidfileaccess

时间:2013-09-12 06:53:31

标签: postscript

基于Simple way to add an image in postscript我写了以下内容:

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

这里出了什么问题?

1 个答案:

答案 0 :(得分:1)

很简单,访问该文件时出现问题。文件在指定位置不存在,或者您没有访问权限。

鉴于您要打开文件进行读取,最有可能的是该文件不存在。我注意到你没有使用完全限定的路径,也许你正在从错误的位置执行PostScript。

相关问题