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

convert warns for greyscale captures #35

Open
saturnism opened this issue Jul 13, 2015 · 9 comments
Open

convert warns for greyscale captures #35

saturnism opened this issue Jul 13, 2015 · 9 comments

Comments

@saturnism
Copy link

sometimes screencapture saves png file that's greyscale (e.g., black white console). when this happens, convert will complain and warn about not being able to convert colors space:

https://github.com/icholy/ttygif/blob/master/ttygif_osx.c#L125

It helps to disable warning by redirecting it to /dev/null

@icholy
Copy link
Owner

icholy commented Jul 13, 2015

Does it prevent it from creating the output gif?

@saturnism
Copy link
Author

Yeah - the generated gif has the warning all over
On Mon, Jul 13, 2015 at 19:19 Ilia Choly [email protected] wrote:

Does it prevent it from creating the output gif?


Reply to this email directly or view it on GitHub
#35 (comment).

@icholy
Copy link
Owner

icholy commented Jul 13, 2015

Do you have an example I can see?

@saturnism
Copy link
Author

00008_76

@icholy
Copy link
Owner

icholy commented Jul 14, 2015

Oh, I see what you mean. Can I get a few of the pngs that you're using?

http://stackoverflow.com/a/11451064/215969

identify -format "%[colorspace]   <== %f\n" *.png

@saturnism
Copy link
Author

The pngs are generated by ttygif afaik.
On Tue, Jul 14, 2015 at 12:31 Ilia Choly [email protected] wrote:

Oh, I see what you mean. Can I get a few of the pngs that you're using?

http://stackoverflow.com/a/11451064/215969

identify -format "%[colorspace] <== %f\n" *.png


Reply to this email directly or view it on GitHub
#35 (comment).

@icholy
Copy link
Owner

icholy commented Jul 14, 2015

Someone else contributed the osx version which uses screencapture. I'm on linux so I have no way to test/reproduce this issue.

If you give me an example png that creates the problem I'll try to find appropriate flags for convert to handle it correctly.

I don't want to pipe the output to /dev/null because that might hide real errors in the future.

@rzh
Copy link

rzh commented Jul 24, 2015

There is a workaround for this, make your terminal full screen and run ttygif with -f option. works for Mac OS's native terminal.app, did not try iTerm.

I think the issue is caused by this line
https://github.com/icholy/ttygif/blob/master/ttygif_osx.c#L125

@jonbho
Copy link
Contributor

jonbho commented Jan 29, 2016

I just wrote a fix for this and submitted a pull request for this, by redirecting error output, before reading that you didn't want to do that. Sorry.

It does fix it completely, because convert just complains but it still processes things correctly. Removing "-background white" from the convert argument list also fixes it.

Personally, the call to convert says "-quiet", so it specifically doesn't want error messages. I'd say it is a bug in "convert" not to honor the "-quiet" argument. And if you tell it "-quiet", I see no harm in just redirecting the output to null - there is clearly an interest in not getting any output.

Proper fixes would require proper command-line args to ttygif, which is still quite a bit of effort to add.

Otherwise thanks for the awesome work!

@icholy icholy added the bug label Jul 7, 2017
@icholy icholy added the osx label Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants