Imagemask 和原始数据的 PostScript 错误

PostScript error with imagemask and raw data

在 Adob​​e 的 PLRM 我使用 imagemask 运算符找到了以下示例。 这在 运行 Ghostscript 时工作正常。

54 112 translate               % Locate lower-left corner of square
120 120 scale                  % Scale 1 unit to 120 points
0 setgray                      % Set current color to black
24 23                          % Specify dimensions of source mask
true                           % Set polarity to paint the 1 bits
[24 0 0 -23 0 23]              % Map unit square to mask
{< 003B00 002700 002480 0E4940
   114920 14B220 3CB650 75FE88
   17FF8C 175F14 1C07E2 3803C4
   703182 F8EDFC B2BBC2 BB6F84
   31BFC2 18EA3C 0E3E00 07FC00
   03F800 1E1800 1FF800 >}
imagemask
showpage

作为练习,我尝试使用 ImageType-1 字典和原始数据重写上面的示例,最后得出以下代码:

54 112 translate
120 120 scale
0 setgray
<<
  /ImageType 1
  /Width 24
  /Heigth 23
  /BitsPerComponent 1
  /Decode [1 0]
  /ImageMatrix [24 0 0 -23 0 23]
  /DataSource currentfile /ASCIIHexDecode filter
>>
imagemask
003B00 002700 002480 0E4940
114920 14B220 3CB650 75FE88
17FF8C 175F14 1C07E2 3803C4
703182 F8EDFC B2BBC2 BB6F84
31BFC2 18EA3C 0E3E00 07FC00
03F800 1E1800 1FF800>
showpage

但是,当 运行 使用 Ghostscript 时,出现以下错误。

Error: /undefined in --imagemask--

我还在绞尽脑汁想找这个bug,但是没用。 怎么可能 imagemask 未定义?还是我错过了一些明显的东西?

我不知道这是否正是您编写的代码,但有一个错字:

  /Heigth 23

这显然应该是:

  /Height 23

如果我更正它,文件将运行完成,并绘制火鸡。