Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing images is extremely slow #3

Open
pinpox opened this issue Mar 3, 2022 · 1 comment
Open

Printing images is extremely slow #3

pinpox opened this issue Mar 3, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@pinpox
Copy link

pinpox commented Mar 3, 2022

Using an EPSON TM-T88II printer with this code snippet works (it prints the image) but is extremely slow. The printer prints one "line" of the image and waits for ~2 seconds, then prints the next line and so on. The printer is definitely capable of much faster printing, I'm also trying out the python-escpos library and that one spits out a complete image in under a second without any delay between lines.

Not sure what is happening here. The python library allows selecting between normal and "high density" mode when printing images, maybe that is the difference, but I don't see how to toggle it here.

	p := escpos.New(socket)
	p.SetConfig(escpos.ConfigEpsonTMT88II)

	f, err := os.Open("./logo.gif")
	if err != nil {
		panic(err)
	}
	defer f.Close()
	img, fmtName, err := image.Decode(f)

	if err != nil {
		panic(err)
	}

	p.PrintImage(img)
@hennedo
Copy link
Owner

hennedo commented Sep 27, 2022

I have not that much experience with serial connection optimization. I guess there might be some bottleneck with buffers or so.

@hennedo hennedo added the help wanted Extra attention is needed label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants