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

[FEATURE]: 16 grayscales support #289

Open
Zer0great opened this issue Dec 6, 2023 · 7 comments · Fixed by #294
Open

[FEATURE]: 16 grayscales support #289

Zer0great opened this issue Dec 6, 2023 · 7 comments · Fixed by #294
Assignees
Labels
new feature request For possible new features

Comments

@Zer0great
Copy link

Hello, as Inkycal already supports the parallel Waveshare displays, it would be great if their 16 grayscale capability could be used too. Especially with the IMAGE or SLIDESHOW modules, as the display is capable of high quality grayscale output.

Currently there are only 2/3 color modes supported. As the parallel displays are quite high-res/dpi, photos do not look entirely bad even in just b/w dithered. Even so, fully utilizing the display capability in Inkycal would be a step forward.

Thank you.

Copy link

github-actions bot commented Dec 6, 2023

Hi there and welcome to Inkycal. Thanks for opening this issue. As this is your first issue in this repository, please read through the contributing guidelines

@aceisace aceisace added the new feature request For possible new features label Dec 11, 2023
@aceisace aceisace linked a pull request Dec 14, 2023 that will close this issue
@aceisace
Copy link
Member

@Zer0great Thanks for opening this issue. I've implemented a "gray16" palette here: #294 . Once the test run through, I will merge it into main and take care of the web-ui to support this new palette.
As soon as this is completed, you can test it out with a git pull from the Inkycal folder, changing the palette in your settings.json to "gray16"

aceisace added a commit that referenced this issue Dec 14, 2023
Implement 16 grayscale support for image module
@aceisace
Copy link
Member

@Zer0great Could you confirm the implementation works as expected now so this issue can be closed?
Here are the instructions:

cd ~/Inkycal
git pull
# edit settings.json file. Your file may be located elsewhere. Change the path accordingly
sudo nano /boot/settings.json 
# set palette to `16gray`
# save the file with [CTRL]+[X], then press [Y] to confirm
# run Inkycal:
source venv/bin/activate
python inky_run.py

@Zer0great
Copy link
Author

Zer0great commented Dec 15, 2023

Hello, @aceisace unfortunately I can not get it to work. Error is "TypeError: Display.render() missing 1 required positional argument: 'im_colour'"
As part of troubleshooting I tried complete manual installation from scratch, into different folder, creating new venv etc.
The same error happens with palette bw or 16gray - no difference.

Problem is with both modules - image, slideshow.

Please see attached settings.json
settings.json

(venv) berry@berry:~/Inkycal $ python3 inky_run.py
inkycal.modules.inkycal_image loaded
loaded inkycal
Inkycal version: v2.0.3

Selected E-paper display: 10_in_3
generating image(s) for Inkycal Image - show an image from a URL or local path...OK!
Inkycal version: v2.0.3

Selected E-paper display: 10_in_3
Date: 15 Dec 23 | Time: 12:50
Generating images for all modules...successful
Traceback (most recent call last):
  File "/home/berry/Inkycal/inky_run.py", line 7, in <module>
    asyncio.run(inky.run())  # If there were no issues, you can run Inkycal nonstop
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/berry/Inkycal/inkycal/main.py", line 368, in run
    display.render(im_black)
TypeError: Display.render() missing 1 required positional argument: 'im_colour'

@aceisace
Copy link
Member

Thanks for testing this, @Zer0great . I'll write a few unittests and will push a fix for the problem soon 👍

@aceisace aceisace reopened this Dec 18, 2023
@aceisace
Copy link
Member

@Zer0great I found a fix for this error:
TypeError: Display.render() missing 1 required positional argument: 'im_colour'

Please run the following to fix the issue with this error:

cd ~/Inkycal
git pull
source venv/bin/activate
python inky_run.py

@Zer0great
Copy link
Author

Hello, I have tested the new version, now it basically works, but the output seems to be just black and white without gradation. Please see attached pictures - first is comparison of palette "BW" vs. "16gray", second is just bigger picture with "16gray". Sorry for bad quality, hopefuly it is adequate for demonstration.

bw_vs_16gray
20231220_181242

@aceinnolab aceinnolab deleted a comment from github-actions bot Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature request For possible new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants