{"action":"created","issue":{"url":"https://api.github.com/repos/lexus2k/ssd1306/issues/53","repository_url":"https://api.github.com/repos/lexus2k/ssd1306","labels_url":"https://api.github.com/repos/lexus2k/ssd1306/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/lexus2k/ssd1306/issues/53/comments","events_url":"https://api.github.com/repos/lexus2k/ssd1306/issues/53/events","html_url":"https://github.com/lexus2k/ssd1306/issues/53","id":372344561,"node_id":"MDU6SXNzdWUzNzIzNDQ1NjE=","number":53,"title":"Bitmap from esp32 SPIFFS?","user":{"login":"zenmanenergy","id":3975062,"node_id":"MDQ6VXNlcjM5NzUwNjI=","avatar_url":"https://avatars0.githubusercontent.com/u/3975062?v=4","gravatar_id":"","url":"https://api.github.com/users/zenmanenergy","html_url":"https://github.com/zenmanenergy","followers_url":"https://api.github.com/users/zenmanenergy/followers","following_url":"https://api.github.com/users/zenmanenergy/following{/other_user}","gists_url":"https://api.github.com/users/zenmanenergy/gists{/gist_id}","starred_url":"https://api.github.com/users/zenmanenergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenmanenergy/subscriptions","organizations_url":"https://api.github.com/users/zenmanenergy/orgs","repos_url":"https://api.github.com/users/zenmanenergy/repos","events_url":"https://api.github.com/users/zenmanenergy/events{/privacy}","received_events_url":"https://api.github.com/users/zenmanenergy/received_events","type":"User","site_admin":false},"labels":[{"id":618822778,"node_id":"MDU6TGFiZWw2MTg4MjI3Nzg=","url":"https://api.github.com/repos/lexus2k/ssd1306/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-21T18:45:54Z","updated_at":"2018-10-22T13:41:58Z","closed_at":null,"author_association":"NONE","body":"This is more of a question than an issue. I'm just not sure where else to ask a question.\r\n\r\nIs there a way to store a png image in the ESP32 SPIFFS filesystem then read the file and somehow pass the contents to the ssd1306_drawBitmap8() or ssd1306_drawMonoBitmap8() functions?\r\n\r\nI started by copying the code in the sova.cpp and pasting it into this site: http://javl.github.io/image2cpp/\r\n\r\nThat site converted it to a png file which I saved and uploaded into my esp32's SPIFF filesystem. The name of the file is: \"/birds.png\" Then I tried this and some variations. It *almost* works, I'm getting static on the screen, but I don't see the birds.\r\n\r\n`const char * filename=\"/birds.png\";\r\n    fs::File imgFile = SPIFFS.open( filename, \"r\");\r\n    \r\n    uint8_t buf[1534];\r\n    int siz = imgFile.size();\r\n    while(siz > 0) {\r\n      size_t len = min((int)(sizeof(buf) - 1), siz);\r\n      imgFile.read((uint8_t *)buf, len);\r\n      siz -= len; \r\n      imgFile.close();\r\n    } \r\n    ssd1306_drawMonoBitmap8(0, 0, 128, 64, buf);`\r\n Anyone have any ideas on what is wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/lexus2k/ssd1306/issues/comments/431839232","html_url":"https://github.com/lexus2k/ssd1306/issues/53#issuecomment-431839232","issue_url":"https://api.github.com/repos/lexus2k/ssd1306/issues/53","id":431839232,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTgzOTIzMg==","user":{"login":"zenmanenergy","id":3975062,"node_id":"MDQ6VXNlcjM5NzUwNjI=","avatar_url":"https://avatars0.githubusercontent.com/u/3975062?v=4","gravatar_id":"","url":"https://api.github.com/users/zenmanenergy","html_url":"https://github.com/zenmanenergy","followers_url":"https://api.github.com/users/zenmanenergy/followers","following_url":"https://api.github.com/users/zenmanenergy/following{/other_user}","gists_url":"https://api.github.com/users/zenmanenergy/gists{/gist_id}","starred_url":"https://api.github.com/users/zenmanenergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenmanenergy/subscriptions","organizations_url":"https://api.github.com/users/zenmanenergy/orgs","repos_url":"https://api.github.com/users/zenmanenergy/repos","events_url":"https://api.github.com/users/zenmanenergy/events{/privacy}","received_events_url":"https://api.github.com/users/zenmanenergy/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T13:41:58Z","updated_at":"2018-10-22T13:41:58Z","author_association":"NONE","body":"Aha! That's starting to make sense! \r\n\r\nIf I convert the png to a bmp with photoshop would this code likely work? So is ssd1306_drawBitmap8() for full color whereas ssd1306_drawMonoBitmap8() is just black/white?\r\n\r\nSigh... that was dumb of me with my password. I just edited those other ones, here is the same code w/o passwords. Don't come to my house and hack my wifi! If you want access, just knock on the door and I'll give you the new password. :-)\r\n\r\n[map8.zip](https://github.com/lexus2k/ssd1306/files/2501523/map8.zip)\r\n"}}
{"actor":{"display_login":"zenmanenergy"}}