我有个问题.
我正在生成动态BMP图像,并尝试通过ZPL命令将其发送到ZEBRA打印机.我需要将我的BMP转换为GRF图像.我认为由BMP图像提取的十六进制不正确.
打印的图像模糊不清.
这是我的代码:
string bitmapFilePath = @oldArquivo; // file is attached to this support article
byte[] bitmapFileData = System.IO.File.ReadAllBytes(bitmapFilePath);
int fileSize = bitmapFileData.Length;
Bitmap ImgTemp = new Bitmap(bitmapFilePath);
Size ImgSize = ImgTemp.Size;
ImgTemp.Dispose();
// The following is known about test.bmp. It is up to the developer
// to determine this information for bitmaps besides the given test.bmp.
int width = ImgSize.Width;
int height = ImgSize.Height;
int bitmapDataOffset = 62; // 62 = header of the image
int bitmapDataLength = …Run Code Online (Sandbox Code Playgroud)