Use the CLI
Pictures
Turn your own images and animations into pictures your display can show.
On this page
A picture is an image of your own on the display's playlist, shown like any app. The CLI turns a
photo or an animation into the 64×32 image the display shows, on your computer, and then stores it
for the display. The examples use $DEVICE for the display's id, as
Set up a display explains.
Try it on your computer
ledable images convert photo.jpg photo.webpimages convert writes exactly what the display would
get, so you can look at it before you add it. It needs no account or display, and prints what it
wrote:
{
"output": "/Users/you/photo.webp",
"content_type": "image/webp",
"frames": 1,
"width": 64,
"height": 32,
"truncated": false
}What goes in and what comes out
- In: a PNG, JPEG, WebP or GIF of at most 15 MiB, recognised by its content rather than its file name. One frame may hold at most 16,777,216 pixels, as many as 4096 × 4096.
- Out: a lossless 64×32 WebP. A photo's orientation from the camera is applied first.
- Animations: an animated GIF or WebP stays animated, with its frame timing and its loop
count. At most 300 frames are kept:
truncatedistruewhen later frames were dropped. A GIF whose frames would take more than 128 MiB of memory once decoded is refused.
Choose the part of the image
The panel is twice as wide as it is high, so the CLI keeps a 2:1 part of the image and scales it to 64×32. Without options it keeps the middle, 80% of the image's width, or less when the image is wider than 2:1 and that would not fit.
ledable images convert photo.jpg photo.webp --crop 0,0.125,1
ledable images convert scan.png scan.webp --rotate 90 --flip horizontal--rotateturns the image clockwise by 90, 180 or 270 degrees.--flipmirrors it,horizontalorvertical.--crop x,y,widthpicks the part to keep, as fractions from 0 to 1 of the image after turning and mirroring:xandyare its top-left corner,widthits width. Its height follows from the 2:1 shape, and the part must fit inside the image. For a 1200×800 photo,--crop 0,0.125,1keeps the full width, centred from top to bottom.
Every frame of an animation is framed the same way.
Add it to a display
ledable images add photo.jpg --device "$DEVICE" --name Holiday --duration 20images add takes the same image and the same options as
images convert, then does what the app's Add a picture page does: it stores the picture for the
display and adds an entry for it at the end of the playlist. It prints the new entry's id:
{
"state": "stored",
"instance_id": "…",
"frames": 1
}Without --name, the picture gets a numbered default name. --duration sets how many seconds it
shows; the default, 0, follows the display's display time.
Rename it, change its time, switch it off or move it with the
playlist commands, as any entry.
Pictures stored for a display
ledable images list --device "$DEVICE"
ledable images download <filename> holiday.webp --device "$DEVICE"images list prints the pictures stored for the display,
each with its filename, file_size and when it was last changed.
images download saves one to a file.
To delete a picture, remove its entry with
playlist remove: a picture that no other entry shows
is deleted with it.