-
Notifications
You must be signed in to change notification settings - Fork 1
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
Lua commands to load bitmap files do not work if the file is jpeg format #69
Comments
Here is the firmware version I'm using for the 5035: I confirmed that the gas guage jpg's are working in my autoexec.lua example as well. So it appears that some jpg's render but not others. Here is my image (jpg) which does not render: Here is my bmp & jpg zipped up: My bmp does render but it doesn't display how I would expect it to. As you can see the image is offset to the right (and appears to wrap around). The image was generated by opening the jpg in gimp then exporting as a bmp with these settings. |
At the suggestion Randy tried the following (no X,Y): local result = ez.PutPictFile("/Images/EarthLCD_320x240_Splash.jpeg")
ez.SerialTx("result=".. tostring(result) .. "\r\n", 80, debug_port) Serial output: result=false Same result, image not displayed. |
I suspect this issue may be related to the specific internal JPG format of the file you chose. We have found that the hardware JPEG decoder doesn't seem to work with certain JPG file formats (not really sure why). |
Doing more testing on this tonight and jpeg's written from GIMP are still an issue. |
By outputting a png from GIMP and running it through this web site to convert to either a bmp or a jpg the file loads: https://www.onlineconverter.com/ I suspect that this site is outputting older file formats that are compatible with current firmware (March 29, 2023) Trying the same thing with png->jpg using Windows paint caused the lua code to crash and not even load an image. |
Addressed in commit: https://github.com/earthlcd/EZLCD-5xxx-Master/commit/a8ee9e0cce128bca59d7cdbf2892b06de01db48e but not yet released. |
Addressed (again) in commit: https://github.com/earthlcd/EZLCD-5xxx-Master/commit/5087ce949399b93036bdf4747b2ef4c6c871a00d and master advanced. |
@microlan I've pushed this fix to master and I'm closing. |
Describe the bug
Lua commands to load bitmap files do not work if the file is jpeg format.
Tested with both ez.PutPicNo() and ez.PutPictFile().
Also tested trying to load bmp file (which seem to work fine with both functions.
To Reproduce
The text was updated successfully, but these errors were encountered: