Comments (4)
Some tests:
- obj: # background for test transparency
id: color_matte
x: 0
y: 40
width: 240
height: 240
bg_color: 0x00ffff
bg_opa: cover
radius: 0
pad_all: 0
border_width: 0
widgets:
- img:
align: center
src: esphome_logo_transparent
id: img_transp
with:
image:
- file: https://esphome.io/_static/made-for-esphome-black-on-transparent.png
id: esphome_logo_transparent
resize: 220x72
type: # as below
use_transparency: # as below
with type: TRANSPARENT_BINARY
(transparency enabled by default) results in:
with type: GRAYSCALE
results in (same result with dither: FLOYDSTEINBERG
):
with: type: GRAYSCALE
and use_transparency: true
results in (nothing):
with type: RGB565
and use_transparency: true
results in:
with: type: RGB24
and use_transparency: true
results in:
with: type: RGBA
(transparency enabled by default) results in:
from esphome.
Supported encodings?
from esphome.
Repeated some of the tests with SVG image instead of PNG:
image:
- file: https://esphome.io/_static/made-for-esphome-black-on-transparent.svg
id: esphome_logo_transparent
resize: 220x72
type: # as below
use_transparency: # as below
with type: TRANSPARENT_BINARY
(transparency enabled by default) results in:
with: type: GRAYSCALE
and use_transparency: true
results in (nothing):
with type: RGB565
and use_transparency: true
results in:
from esphome.
I think situation is similar to the fonts, LVGL seems to use a proprietary format, and they have online and offline converter tools for images to C arrays: https://lvgl.io/tools/imageconverter
It's two approaches here:
- the command line tool can be used before compile, like pillow or cairo are used (add another
type: LVGL
with sub-options maybe?) - some other implementation needs to be done at runtime for #14
from esphome.
Related Issues (20)
- `number` component HOT 1
- `label` options HOT 5
- Click area extension option (for all obj)
- `line` invert Y option
- `anim_time` style option
- `roller` visible rows
- `arc` Place another object to the knob
- `led` light component enhancement
- Antiburn function HOT 11
- Event triggers HOT 4
- Possible new issue with handling **bineary_sensors** HOT 2
- suggestion to rename 'obj' to 'widget' HOT 2
- options for `btnmatrix` HOT 17
- `lvgl.widget.update` for btnmatrix buttons HOT 1
- Escape characters in texts, eg. `label`
- `meter` needle/line styling HOT 2
- `binary_sensor` should reflect `checked` state + `publish_initial_state` config
- `state` options templatable HOT 3
- `msgboxes` options HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome.