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

slow performance vs img2sixel #19

Open
Alsan opened this issue Jun 3, 2024 · 2 comments
Open

slow performance vs img2sixel #19

Alsan opened this issue Jun 3, 2024 · 2 comments

Comments

@Alsan
Copy link

Alsan commented Jun 3, 2024

when the image size is small, almost the same between gosr and img2sixel, but when the image size is large, ie: 2560x1920, gosr and img2sixel are 4.44s and 04s respectively.

i use the following two commands for test:

cat /tmp/t.png | time gsor -
img2sixel /tmp/t.png
@Alsan
Copy link
Author

Alsan commented Jun 3, 2024

and when i resize the image to a smaller size, it works fine again.

cat /tmp/t,png | time gosr -resize 640x480 -

0.58s used.

@mattn
Copy link
Owner

mattn commented Jun 3, 2024

Since sixel need to work with, primary colored imagesCurrent implementation makes paletted images dynamicly . If it use palette.Plan9 or palette.WebPage, it become bits more faster. (But rough colored images may be generated.)

I pushd fix branch. fix branch provide two flags -dither (default true) and -palette (default medan).

$ cat image.png | gosr -dither=false -palette=webpage

This become more faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants