Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postscript文件图像和C#位图_C#_Postscript - Fatal编程技术网

Postscript文件图像和C#位图

Postscript文件图像和C#位图,c#,postscript,C#,Postscript,我在postscript文件中定义了如下图像: << /ImageType 1 /Width 986 /Height 1 /BitsPerComponent 8 /Decode [0 1 0 1 0 1] /ImageMatrix [986 0 0 -1 0 1] /DataSource < 803fe0503824160d0784426150b864361d0f8844625138a4562d178c466351b8e4763d1f904864523924964d27944a

我在postscript文件中定义了如下图像:

<< /ImageType 1
/Width 986 /Height 1
/BitsPerComponent 8
/Decode [0 1 0 1 0 1]
/ImageMatrix [986 0 0 -1 0 1]
/DataSource <
803fe0503824160d0784426150b864361d0f8844625138a4562d178c466351b8e4763d1f904864523924964d27944a6552b964b65d2f984c665339a4d66d379c4e6753b9e4f67d3fa05068543a25168d47a4526954ba648202
> /LZWDecode filter >> image } def
我对ps文件不太了解。
根据ps block中的可用信息,任何人都可以确认以下内容:

  • 此处使用哪种像素格式-我当前使用的是PixelFormat.Format32bppPArgb
  • “/Width 986/Height 1”是创建C#位图时使用的正确图像大小吗
谢谢大家!

这里使用哪种像素格式-我目前正在使用 PixelFormat.Format32bppPArgb

我将使用
PixelFormat.Format32bppPArgb
而不是
PixelFormat.format8bpindexed
,因为这行:
/BitsPerComponent 8

无论如何,您可以使用其他格式,它将被转换

是“/Width 986/Height 1”是创建时要使用的正确图像大小 C#位图

是的,它是:宽度=986/高度=1

只有当你想在Postscript文件中创建一个关于宽度和高度的位图时,你想看看我的另一个问题吗?请看你是否有任何线索。
Bitmap bitmapImage = new Bitmap(986, 1, PixelFormat.Format32bppPArgb);