ESP8266でPNGデコーダを実装してみた(3)

この週末はあまり時間が取れなかったのですが、このところ作っているPNGデコーダを、1bit/2bit/4bitのインデックスカラーに対応させてみました。

動画の通り、インデックスカラーはそれなりに高速に表示できます。
動画では、1bitの画像は表示させている画面がノイズのように見えますが、実は以前プチコン3号で作成した迷路の画像です。

このデコーダーの開発は、もっぱらVisual Studio上で行い、最後にArduino IDEで描画部分だけ追加しています。
やはり、少しプログラムが複雑になってくると、変数の状態を観察しながらステップ実行できる環境は欠かせないですね。

コメント

  1. selim meric より:

    こんにちは最初にすべての私はそれについて申し訳ありません間違って理解してなかったので、もしあなたの言語を理解していけません。私はTwitterまたはFacebookのロガーのようなesp8266とWebクライアントの操作を行いたいです。私は、私はしたいが、私はそれを必要といけない写真だけで私はAPIをチェックして、情報を取得し、そのTFT上にそれらを表示することを保ついけない..インターネットからダウンロードJPGとPNGをしたいとシリアルTFT上にそれらを表示します。その結果、プロジェクトがそのかどうかをしているのですか?そして、あなたはそれについての情報を持っている場合は、私を共有することができます..プロジェクトファイルを共有することができますか?
    this form did not accept ascii char and I used google translate : if you dont understand it please send a mail to me.
    どうもありがとう ..
    よろしく..

  2. boochowp より:

    Hi Selim, ESP8266 can decode a small jpeg or png file and draw it onto SPI connected TFT LCD. Although I have not yet tested displaying an image file fetched from the Internet, maybe it is also possible when the image file size is sufficiently small. I think the image file should be stored temporary in ESP8266 SPIFFS before decoding, since ESP8266 RAM space is VERY limited. JPEG image may be better for your purpose because JPEG decoder needs only 4KB working memory space while PNG decoder requires more than 32KB.
    An open source JPEG decoder for arduino is here:
    https://github.com/MakotoKurauchi/JPEGDecoder
    and my example code using this decoder is in this post:
    http://blog.boochow.com/article/427726975.html
    It reads JPEG files stored in SPIFFS and displays it on the ILI9340 based SPI TFT LCD.
    PNG decoder I wrote have not yet been posted, but I believe you’d better start with JPEG files.

  3. selim meric より:

    hi thanks your reply.. I will try it..