Converting a smart cell to a one-file elixir script

Kino does it on the client. You can check the examples folder in Bumblebee. You can however use libraries like StbImage to read the file for you and NxImage for doing the resizing.