I have images defined like below in postscript file:
<< /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
using the image DataSource, I need to create a C# bitmap object.
Bitmap bitmapImage = new Bitmap(986, 1, PixelFormat.Format32bppPArgb);
I don't have much knowledge about ps files.
Depending on info available in ps block, can anyone please confirm following:
Thank you!
Which PixelFormat to use here - I am currently using PixelFormat.Format32bppPArgb?
Instead of PixelFormat.Format32bppPArgb
i would use PixelFormat.Format8bppIndexed
because of this line: /BitsPerComponent 8
Anyway, you can use other format, it will be converted
Is '/Width 986 /Height 1' is the right image size to use when creating C# Bitmap?
Yes it is: width =986 / height =1
Only if you want to create a Bitmap
respecting width and height in Postscript file
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.