Why do I get Error: /invalidfileaccess in --file--

强颜欢笑 提交于 2019-12-11 07:45:07

问题


Based on Simple way to add an image in postscript I wrote the following:

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

but this gives:

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

What is going wrong here?


回答1:


Quite simply there is a problem accessing the file. Either the file does not exist in the specified location, or you do not have access rights to it.

Given that you are opening the file for read, the most likely is that the file doesn't exist. I notice that you haven't used a fully qualified path, perhaps you are executing the PostScript from the wrong location.



来源:https://stackoverflow.com/questions/18757354/why-do-i-get-error-invalidfileaccess-in-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!