-
I understand that this command (which I have stumbled across in another discussion) should display an image on a connected display screen: displaytext [x0y0P/filename.rgb:] I guess you first need to issue the command displaymode 0 for it to work. I'm wondering about the exact syntax. Is the "/" after the P necessary? Is the ":" at the end of the file name necessary? Does the file name suffix have to be ".rgb" ? And I'm wondering about the file itself. Is this RGB16 format a known/recognized or standardized format? Would a graphics or image editing software (CorelDraw, Irfanview, etc) know how to create such a file, with presumably a header structure that is known to the tasmota display driver? I have read about the script editor which has a sub-function to create this type of file, but I can't find the script editor available anywhere for download. I have tried some on-line image convertors, I found one that will create RGB 565 format file, and have tried to have tasmota display the file, but when I issue the command it is causing tasmota to re-boot. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 17 replies
-
It is indeed missing a clear documentation of the format which is not AFAIK anything standard. You need to reverse engineer the code if you want to find out |
Beta Was this translation helpful? Give feedback.
-
I figured out how to create a bitmap, which I assume will work for any LCD bitmapped display connected to a tasmota device (specifically I'm working with a 240 x 240 ST7789 TFT display). I took a sample jpg photo, reduced it to 240 pixels wide, the height ended up being 142 pixels. I used irfanview to save the reduced image as RGB raw file. This creates 24 bit file with no header. R, G and B are 1 byte each, saved in that order. I wrote some code to create an rgb file that can directly be displayed by tasmota displaytext [x0y0P/file.rgb:] As per instructions, first I wrote out the image width and height (each being 2 byte unsigned integer). Then read in the pixel color values, each being 8 bits, and bit-shifted them to get 5-bit red, 6 bit green and 5 bit blue values (shifting to the right, keeping the most significant bits). I then inverted each of them (red = 31 - red, green = 63 - green, blue = 31 - blue). I then assembled them into a 16-bit unsigned integer = red + green x 32 + blue x 2048 and wrote that out to the rgb file. When writing out 16 bit integer values, the byte order is low byte then high byte. |
Beta Was this translation helpful? Give feedback.
-
I Trier that too but it did not work. How Do you call the command? How is the path if i User the on Chip file System? --Gesendet mit der GMX Mail AppAm 16.01.25, 21:16 schrieb sfromis ***@***.***>:
AFAICT, for any support of jpeg images, you need a custom build including #define JPEG_PICTS, but I'm not sure whether it would work for your use case. I'm usually using PNG images, with good experiences.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
i have tried again the displaytext -> not working. |
Beta Was this translation helpful? Give feedback.
-
Shall i try to paste this in the berry Script? --Gesendet mit der GMX Mail AppAm 17.01.25, 11:11 schrieb sfromis ***@***.***>:
No, I did not use MQTT. As mentioned, the JSON was in the local file pages.jsonl, not via a command, and only in the context of having a setup with HASPmota, specifically including a binary with that feature, and an autoexec.be like:
import haspmota
haspmota.start()
The full pages.jsonl was:
{"page":1}
{"id":10,"obj":"img","x":0,"y":0,"src":"A:/tasmota-logo-rgb.png"}
With Berry and HASPmota, there are ways of updating images, instead of it all being from a static file, but that's not relevant to simply testing if you can get an image on the screen.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Actually i have display output from the Demo. Where are These infos with the .jsonl file from ? So you say: Just create this .jsonl and upload ? Then execute for test in the berry console ?--Gesendet mit der GMX Mail AppAm 17.01.25, 11:37 schrieb sfromis ***@***.***>:
No, I already told you about what files I used, to make a very simple repeatable test case.
However, if you already have the pages.jsonl file created, the lines for the file autoexec.be (which is Berry code executed when restarting) could also be entered in the Berry console, assuming that all preconditions are met.
You also need to make sure that the Tasmota status for the display is powered on, like using front page toggle or command.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Now i tried in the autoexec: import haspmota in the page.jsonl: UFS: It is not working only black screen. |
Beta Was this translation helpful? Give feedback.
-
even this is not working.... my bad. Again 5 € less for "YCD fake" ;-). There are so many variants of it. crazy. |
Beta Was this translation helpful? Give feedback.
I figured out how to create a bitmap, which I assume will work for any LCD bitmapped display connected to a tasmota device (specifically I'm working with a 240 x 240 ST7789 TFT display).
I took a sample jpg photo, reduced it to 240 pixels wide, the height ended up being 142 pixels.
I used irfanview to save the reduced image as RGB raw file. This creates 24 bit file with no header. R, G and B are 1 byte each, saved in that order.
I wrote some code to create an rgb file that can directly be displayed by tasmota
displaytext [x0y0P/file.rgb:]
As per instructions, first I wrote out the image width and height (each being 2 byte unsigned integer).
Then read in the pixel color values, each being …