InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.63k stars 901 forks source link

PhotoStyle Watch Face #2028

Open JenJell opened 4 months ago

JenJell commented 4 months ago

This pull request introduces a digital watch face designed to display user-uploaded photos. InfiniSim_2024-02-23_111015 I am uncertain if this is a watch face we want to add into the base InfiniTime. However, after developing it to test an image conversion function in InfiniLink, I thought it would be worthwhile to share it here to gather everyone’s thoughts on the concept. Also, if this is something we want to add, I would appreciate any feedback on the design that could be improved or modified

watch_photo_real This watch face has been tested on both the simulator and with real hardware.

joseph58tech commented 4 months ago

I quite like this idea, how would we upload photos to the watch though? I know WaspOS has a gallery app but I've never looked into how exactly it works.

github-actions[bot] commented 4 months ago
Build size and comparison to main: Section Size Difference
text 384592B 7512B
data 940B 0B
bss 63524B 8B
JenJell commented 4 months ago

@joseph58tech, right now this watch face is looking for a photo at "images/watch_photo.bin" in the file system. So all that has to be done is to upload an image file into the right location using a companion app. Though, the image does need to be converted first before it is uploaded.

joseph58tech commented 4 months ago

@JenJell what companion app are you using?

JenJell commented 4 months ago

@joseph58tech, for me, I am using a custom version of InfiniLink. However, if you want to achieve this without using an iPhone and Mac, you can convert your image file using an lvgl convertor like this online one or the lv_img_conv.py script. Make sure the image is 250x250 in size and use the color format CF_TRUE_COLOR or CF_TRUE_COLOR_ALPHA and output format Binary RGB565 Swap. Then send the image over to images/watch_photo.bin on the watch's file system using a companion app like ITD or Amazfish.

joseph58tech commented 4 months ago

@JenJell Ah, I'm on Android so I don't have the option to view the file system

FintasticMan commented 4 months ago

On android you can use InfiniTimeExplorer in a Chromium-based browser

everypizza1 commented 4 months ago

I just tested it out on my watch, uploaded an image, and it crashed on selecting the face.

Update: it works! IMG_20240225_110303.jpg

JenJell commented 4 months ago

@everypizza1, glad it's working now. As for why it crashed, I believe that is related to this file system bug #2021.

JumpLink commented 3 months ago

It would also be great to be able to upload several images depending on the time of day, e.g. background images with a moving sun could be used. The weather could also be included.

joseph58tech commented 3 months ago

On android you can use InfiniTimeExplorer in a Chromium-based browser

I had no idea this existed lol, now I can finally upload the resources file

JumpLink commented 3 months ago

IMG_20240307_125414200.jpg

Works for me, too 🙃

joseph58tech commented 3 months ago

Sorry to bother, but how exactly would I get the files to load them to the watch?

liamcharger commented 3 months ago

You would need to find the image you want to upload to the watch, rescale it to 240 x 240, and convert it to the supported binary format using a tool like LVGL's image converter.

If you're using LVGL's converter, the color format is CF_TRUE_COLOR, and the output format is Binary RGB565 Swap.

joseph58tech commented 3 months ago

You would need to find the image you want to upload to the watch, rescale it to 240 x 240, and convert it to the supported binary format using a tool like LVGL's image converter.

I meant how do I load the watchface to the watch, I guess I worded that weird

liamcharger commented 3 months ago

@JenJell I like this watchface a lot, but there is one issue: if the image is on the lighter side of the scale, the text is not legible. My suggestion would be using a text color selector, like the PineTimeStyle watchface.

JenJell commented 3 months ago

@liamcharger, glad you like it! Although, I’ve actually already thought of that. Just perform a long press on the watch face to access it's settings.

JenJell commented 3 months ago

You would need to find the image you want to upload to the watch, rescale it to 240 x 240, and convert it to the supported binary format using a tool like LVGL's image converter.

I meant how do I load the watchface to the watch, I guess I worded that weird

Currently to add this watch face, you would need to build your own version of InfiniTime with this pull request included.

liamcharger commented 3 months ago

@joseph58tech you can also use the build artifact from the GitHub workflow.

joseph58tech commented 3 months ago

Currently to add this watch face, you would need to build your own version of InfiniTime with this pull request included.

Oh so it's not a separate recourse file I can load then

liamcharger commented 3 months ago

@liamcharger, glad you like it! Although, I’ve actually already thought of that. Just perform a long press on the watch face to access it's settings.

Oops, I missed that! That's embarrassing...😬

JumpLink commented 3 months ago

Switching between the menus is slower than on other watch faces with my image, does the others have the same problem?

https://github.com/InfiniTimeOrg/InfiniTime/assets/1073989/4e8918e0-0a26-4ddb-8c94-6899e9f125f2

FintasticMan commented 3 months ago

Unfortunately that is to be expected, we had the same issue with the analog watch face until we replaced the background image with an implementation in lvgl.

liamcharger commented 3 months ago

@JenJell, one issue I noticed is that when using InfiniLink with the live watch faces, in the watch face setting list, this watch face is where the terminal face used to be, making InfiniLink pull the terminal watch face instead, and everything past the terminal is incorrect as well. So, my proposal would be moving it to the bottom of the watch face list so the live watch faces feature in InfiniLink isn't affected.