Revert dynamic image creation, because Python garbage collects them.

This reverts commit 41ab1f8dc0cb5ae4e6ce0fb5a08185c48f7d2d25.