-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b4d70c
commit ace5747
Showing
5 changed files
with
27 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# rpi-epaper-api | ||
|
||
A rest API for setting the display image on a [Waveshare 4.26](https://www.waveshare.com/4.26inch-e-paper-hat.htm) | ||
A rest API for setting the display image on a [Waveshare 4.26"](https://www.waveshare.com/4.26inch-e-paper-hat.htm) | ||
eink HAT connected to a Raspberry Pi. Supports scaling and rotating the input image. Endpoints are also provided for | ||
fetching display contents and clearing the display. | ||
|
||
|
@@ -37,13 +37,13 @@ curl --form [email protected] --form resize=FIT --form background=WHITE http://r | |
|
||
Data should be sent form-encoded. | ||
|
||
| Field | Description | Default | Required | | ||
|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|----------| | ||
| `image` | Image file to display. Any image type supported by the Python PIL library should work. | N/A | Yes | | ||
| `mode` | Colour mode used to display the image on the e-ink display.<br>`MONO` - each pixel is either on or off. Uses dithering.<br>`4GRAY` - each pixel is either on, dark gray, light gray or off. | MONO | No | | ||
| `resize` | `FIT` Resize keeping aspect ratio, without cropping<br>`CROP` Resize keeping aspect ratio, with cropping<br>`STRETCH` fill display, ignoring aspect ratio<br>`NONE` Display without any scaling, pixels drawn 1:1. | `FIT` | No | | ||
| `rotate` | Number of degrees to rotate counter-clockwise, supports increments of 90 degrees. | 0 | No | | ||
| `background` | Background colour to use if the image doesn't fill the display. Either `WHITE` or `BLACK`. | `WHITE` | No | | ||
| Field | Description | Default | Required | | ||
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|----------| | ||
| `image` | Image file to display. Any image type supported by the Python PIL library should work. | N/A | Yes | | ||
| `mode` | Display mode, corresponding to the `display_XXX` method on the `epd` object.<br>`FAST` - uses `display_Fast` for a complete screen refresh.<br>`PARTIAL` - uses `display_Partial` for incremental updates (which may cause ghosting). | `FAST` | No | | ||
| `resize` | `FIT` Resize keeping aspect ratio, without cropping<br>`CROP` Resize keeping aspect ratio, with cropping<br>`STRETCH` fill display, ignoring aspect ratio<br>`NONE` Display without any scaling, pixels drawn 1:1. | `FIT` | No | | ||
| `rotate` | Number of degrees to rotate counter-clockwise, supports increments of 90 degrees. | 0 | No | | ||
| `background` | Background colour to use if the image doesn't fill the display. Either `WHITE` or `BLACK`. | `WHITE` | No | | ||
|
||
Expect this call to take ~4-11 seconds. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters