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

Add an option to save the result #21

Open
oyedejioyewole opened this issue Jul 26, 2022 · 3 comments
Open

Add an option to save the result #21

oyedejioyewole opened this issue Jul 26, 2022 · 3 comments

Comments

@oyedejioyewole
Copy link

Please could you add the feature of saving the result of the image2ascii to a file.
Doing this manually doesn't work as you use some kind of terminal color formatting, which makes the result in a file look ugly.

Thanks

@nicobleiler
Copy link

@OyewoleOyedeji how do you even get pipe output to work? When I try I just get NIL?

image2ascii -f frame_000.png -s -c=false > 0.txt
2023/10/28 18:25:14 <nil>

@muradbu
Copy link

muradbu commented Nov 10, 2023

I'm in the same boat now

image2ascii -f frame_000_delay-0.05s.jpg > out.txt
2023/11/10 13:16:12 <nil>

@muradbu
Copy link

muradbu commented Nov 10, 2023

I figured out it's due to the default options of the image dimensions.

type Options struct {
	Ratio           float64
	FixedWidth      int
	FixedHeight     int
	FitScreen       bool // only work on terminal
	StretchedScreen bool // only work on terminal
	Colored         bool // only work on terminal
	Reversed        bool
}

Specify a fixed width, height or ratio to make it work.

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

3 participants