Issue/950 image resize

Fix #950 - Rewrote creation of resized pictures to be more memory-efficient