Bugfix: If the output image was not PNG, the generator failed