Write/update PNG and JPEG.

Indirectly, using MEM datasets as an intermediary.

For #177