如何发送图像到串口? [英] How to send image to serial port?

查看:137
本文介绍了如何发送图像到串口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天!我在打印图像时遇到问题.我该如何填写此功能?

Good day! I have a problem with printing image. How I must fill this function?

WriteFile(serial_port, (void *)argv[1], file_name_size, &bytes_written, NULL);


请举个例子.


Please give me an example.

推荐答案

Agrafena写道:
Agrafena wrote:

请给我一个例子.



一个例子是什么?请说明您要做什么.标题上说在com上发送图像,而您的注释说您在打印时遇到问题.



An example of what? Please explain what you are trying to do. The title says send an image on com port and your comment says you have a problem with printing.


我打印带有图片的文档.我的打印机基于RS232接口.我用COM1端口连接并发送日期.我需要使用图像进行操作的示例.
I print a document with picture. My printeris based on RS232 interface. I connect with COM1 port and send date. I need example of manipulation with image.


您不应该直接访问串行端口.您必须使用Windows的高级功能进行打印.它们抽象出了连接哪种类型的打印机(以及如何连接).

看看本节 [
You shouldn''t access the serial port directly. You have to use the higher level functions from Windows to print. They make abstraction of which type of printer is connected (and how it is connected).

Take a look at this section[^] on codeproject to look for a suitable article for your needs.


这篇关于如何发送图像到串口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆