Both code parts only read the database. If it is empty, they create a database with an empty table. But no-where is there any image put into the database. In general if you do this, first make sure that the content of your database is correct (with the emulator you can download the database file onto your computer and explore the database).