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

Preview Mode? #228

Open
frioux opened this issue Feb 18, 2023 · 1 comment
Open

Preview Mode? #228

frioux opened this issue Feb 18, 2023 · 1 comment

Comments

@frioux
Copy link

frioux commented Feb 18, 2023

I would like to be able to preview a change as an image (png, jpg, whatever) before writing it directly to the device. I've looked through the code and don't see any way to do this. Could we create either a flag for the CLIs or maybe a mode for the objects where instead of writing changes to the device the tools instead write a file to some path? I figure the EPD.display method might be a good option for this capability?

@frioux
Copy link
Author

frioux commented Feb 18, 2023

I put this block in the display method, for anyone interested in experimenting with this kind of functionality:

        test_path = os.environ.get('TEST_IMAGE', '')
        if test_path != '':
            image.save(test_path, 'PNG')
            return

This command produced the following image:

TEST_IMAGE=x.png papirus-write test2

x

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

1 participant