Replies: 2 comments 2 replies
-
@Cal1sto maybe open a FR in the issues, for now that is a better place to discuss these kind of half ready enhancements, or even a draft PR. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Good idea. Needs someone to implement it. I can help testing screen size 24-43 and 70. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The idea i have and already checked if it is possible to be performed and i could do it, but wan't to have your feedback if i must use my time to provide this optimisation to win some Kilo bytes. Idea is following:
Example 1: Current state for TFT70 Logo.bmp is 1126 Kb and TFT28 is 226 Kb.
By using the optimized version the Logo.bmp is replaced with a free size (Width and Height) or with a defined smaller size like 1/4 the screen size, the last one could be the best choice where the benefit is fix, the win of 75% of the size used on previous implementation.
The screen background color used will be the color of the first pixel of the image, and the optimized logo images will be displayed on the middle of the screen.
Sample 1:
With the Free size for example with the BIGTREETECH Logo we have the following result:
For TFT70 the logo file size in memory will use 96 Kb --> Benefit is 1126 - 96 = 1030 Kb (similar to the size of 15 icons in TFT70)
For TFT28 the logo file size in memory will use 55 Kb --> Benefit is 226 - 55 = 171 Kb ( similar to the size of 11 icons in TFT28 )
With the fixed 1/4 the screen size :
TFT70 (800x480) the logo will be fixed to size (400x240) : 282 Kb -> Benefit is 1126 - 282 = 844 Kb (similar to the size of 12 icons in TFT70)
TFT28 (320x240) the logo will be fixed to size (160x120) : 76 Kb -> Benefit is 226 - 76 = 150 Kb ( similar to the size of 10 icons in TFT28 )
PS: All the size used in this demonstration is rounded size based on the files size not the stored RGB pixel but the files header is only 54 bytes and approach still valid.
Beta Was this translation helpful? Give feedback.
All reactions