moved picture manipulation into own package so that it can be reused from console app and/or http handler