「App:Library:LVGL:docs:3rd party libraries:GIF decoder」の版間の差分
(同じ利用者による、間の2版が非表示) | |||
12行目: | 12行目: | ||
<code style="color: #bb0000;">lv_gif_set_src(obj, src)</code> works very similarly to <code style="color: #bb0000;">lv_img_set_src</code>. As source, it also accepts images as variables (<code style="color: #bb0000;">lv_img_dsc_t</code>) or files. | <code style="color: #bb0000;">lv_gif_set_src(obj, src)</code> works very similarly to <code style="color: #bb0000;">lv_img_set_src</code>. As source, it also accepts images as variables (<code style="color: #bb0000;">lv_img_dsc_t</code>) or files. | ||
− | | | + | |LVGLでのGIF画像の使用を許可します。 |
+ | <nowiki>https://github.com/lecram/gifdec</nowiki> に基づいています。 | ||
+ | |||
+ | <code style="color: #bb0000;">lv_conf.h</code> で<code style="color: #bb0000;">LV_USE_GIF</code> を有効にすると、<code style="color: #bb0000;">lv_gif_create(parent)</code>を使って GIF ウィジェットを作成することができます。 | ||
+ | |||
+ | <code style="color: #bb0000;">lv_gif_set_src(obj, src)</code> は,<code style="color: #bb0000;">lv_img_set_src</code> と非常によく似た働きをします.source と同様に、画像を変数(<code style="color: #bb0000;">lv_img_dsc_t</code>)またはファイルとして受け取ります。 | ||
|} | |} | ||
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]] | :[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]] | ||
24行目: | 29行目: | ||
| | | | ||
To convert a GIF file to byte values array use LVGL's online converter. Select "Raw" color format and "C array" Output format. | To convert a GIF file to byte values array use LVGL's online converter. Select "Raw" color format and "C array" Output format. | ||
− | | | + | |GIFファイルをバイト値配列に変換するには、LVGLのオンラインコンバーターを使用します。「Raw」カラーフォーマットと「Carray」出力フォーマットを選択します。 |
|} | |} | ||
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]] | :[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]] | ||
36行目: | 41行目: | ||
| | | | ||
For example: | For example: | ||
+ | <syntaxhighlight lang="C++" style="border:1px dashed gray;"> | ||
lv_gif_set_src(obj, "S:path/to/example.gif"); | lv_gif_set_src(obj, "S:path/to/example.gif"); | ||
− | Note that, a file system driver needs to be registered to open images from files. Read more about it here or just enable one in <code style="color: #bb0000;">lv_conf.h</code> with <code style="color: #bb0000;">LV_USE_FS_...</code> | + | </syntaxhighlight>Note that, a file system driver needs to be registered to open images from files. Read more about it here or just enable one in <code style="color: #bb0000;">lv_conf.h</code> with <code style="color: #bb0000;">LV_USE_FS_...</code> |
− | | | + | |例えば: |
+ | <syntaxhighlight lang="C++" style="border:1px dashed gray;"> | ||
+ | lv_gif_set_src(obj、 "S:path / to / example.gif"); | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | ファイルからイメージを開くには、ファイルシステムドライバを登録する必要があることに注意してください。詳しくはこちらをご覧ください。また、<code style="color: #bb0000;">lv_conf.h</code> で <code style="color: #bb0000;">LV_USE_FS_...</code>を指定して有効にすることもできます。 | ||
|} | |} | ||
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]] | :[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]] | ||
54行目: | 66行目: | ||
* <code style="color: #bb0000;">LV_COLOR_DEPTH 16</code>: 4 x image width x image height | * <code style="color: #bb0000;">LV_COLOR_DEPTH 16</code>: 4 x image width x image height | ||
* <code style="color: #bb0000;">LV_COLOR_DEPTH 32</code>: 5 x image width x image height | * <code style="color: #bb0000;">LV_COLOR_DEPTH 32</code>: 5 x image width x image height | ||
− | | | + | |GIFアニメーションをデコードして表示するには、次の量のRAMが必要です。 |
+ | |||
+ | * <code style="color: #bb0000;">LV_COLOR_DEPTH 8</code>:3x画像幅x画像高さ | ||
+ | * <code style="color: #bb0000;">LV_COLOR_DEPTH 16</code>:4x画像幅x画像高さ | ||
+ | * <code style="color: #bb0000;">LV_COLOR_DEPTH 32</code>:5x画像幅x画像高さ | ||
|} | |} | ||
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]] | :[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]] |
2022年6月29日 (水) 15:44時点における最新版
https://docs.lvgl.io/8.2/libs/gif.html
GIF decoder
英文 | 自動翻訳 |
---|---|
Allow using GIF images in LVGL. Based on https://github.com/lecram/gifdec When enabled in
|
LVGLでのGIF画像の使用を許可します。
https://github.com/lecram/gifdec に基づいています。
|
Convert GIF files to C array
英文 | 自動翻訳 |
---|---|
To convert a GIF file to byte values array use LVGL's online converter. Select "Raw" color format and "C array" Output format. |
GIFファイルをバイト値配列に変換するには、LVGLのオンラインコンバーターを使用します。「Raw」カラーフォーマットと「Carray」出力フォーマットを選択します。 |
Use GIF images from file
英文 | 自動翻訳 |
---|---|
For example: lv_gif_set_src(obj, "S:path/to/example.gif");
lv_conf.h with LV_USE_FS_...
|
例えば:
lv_gif_set_src(obj、 "S:path / to / example.gif");
|
Memory requirements
英文 | 自動翻訳 |
---|---|
To decode and display a GIF animation the following amount of RAM is required:
|
GIFアニメーションをデコードして表示するには、次の量のRAMが必要です。
|
Example
英文 | 自動翻訳 |
---|---|
Open a GIF image from file and variable |
API
英文 | 自動翻訳 |
---|---|
Functions
Variables
|