writer: fix memory leak
Always generate at least 2D images