My original one was actually working!
making it more generic.
Write png image to database.
Added viewer module.
Successful train stars.