Inkycal icon indicating copy to clipboard operation
Inkycal copied to clipboard

[FEATURE]: defining borders around the content, rendering Inkycal on an area smaller than the full panel

Open pbarthelemy opened this issue 9 months ago • 4 comments

Is your feature request related to a problem? Please describe. Inkycal assumes the full e-ink panel is useable and visible.

However, when put in a standard picture frame, a significant section around the panel can be hidden : for instance, this happens when using a 7.5in panel with 5*7 Ikea photo frame as its cut-out is smaller than the screen. There are certainly other uses cases.

The new feature is about defining a useable area that is smaller than the panel, i.e. defining borders around the content and rendering it at the appropriate position.

Describe the solution you'd like

  1. add 4 parameters in settings.json to define the widths of the 4 border strips (frame_border_x1, etc... in pixels)
  2. modify the web-ui to calculate the module sizes, accounting for the smaller useable area
  3. make minimal changes in the Inkycal code to assemble the modules in the useable area
  4. add a step to paste the useable area to final full-size image before it is rendered onto the panel

nota :

  • the setting names frame_border_width_left, frame_border_width_right, frame_border_height_top, frame_border_height_bottom are added to settings.json
  • there are 4 values as it is not assumed that the useable area is centered on panel
  • the padding at the module-level is still available.
  • this feature can easily made backwards-compatible : if the 4 new settigns are absent from settings.json, the border widths/heights default to 0 and the image is rendered as in the current version.

Describe alternatives you've considered Currently, one way to address the problem is to use padding x-axis and padding y-axis. This creates a border in each module. While it is workable, this solution does not apply to the debug section (and its PiSugar info) and has to implemented in each module.

Additional context This addresses [FEATURE]: image module -> allow max width in percent #354

Example draft image - asymmetric borders shozn in red as an highlight "frame_border_width_left" : 20, "frame_border_width_right" : 40, "frame_border_height_top" : 10, "frame_border_height_bottom" : 50, in the settings.json, on a 800*480 panel. Image

pbarthelemy avatar Feb 11 '25 12:02 pbarthelemy

@aceisace : probably a stupid question ;-) ... Where is the code for the web-ui ? (I did not find it in the repo... I guess I am missing something ... )

pbarthelemy avatar Feb 15 '25 14:02 pbarthelemy

Thanks for the PR! Will get back to this and your PR in a few days. The code for the web-ui is not (yet) public. However, I can adapt the code if any changes are needed 👍

aceisace avatar Feb 22 '25 16:02 aceisace

Marking this issue as stale due to inactivity

github-actions[bot] avatar Apr 23 '25 23:04 github-actions[bot]

Marking this issue as stale due to inactivity

github-actions[bot] avatar Jun 23 '25 23:06 github-actions[bot]

Marking this issue as stale due to inactivity

github-actions[bot] avatar Aug 26 '25 23:08 github-actions[bot]

Marking this issue as stale due to inactivity

github-actions[bot] avatar Nov 26 '25 23:11 github-actions[bot]