I like the idea of amending the PNG writer to allow specification of the compression parameters, but I'm not sure this is correct. What happens if the "Compression" attribute is set, but it's not one of the ones you check for explicitly?  For example, what if it's "zip"? I think this needs to fall back on some default if a name is specified but not recognized.  Another consideration: for JPEG, we use "compression" (method) and "quality" (how compressed it is -- in the case of JPEG, that is how lossy it is). Maybe for PNG we should also use these generic terms -- I think that the way you are using the compression tag here is a bit more akin to the quality metric rather than the compression method, or do I misunderstand?  The other advantage of this is that an application can use "compression" and "quality" in a completely generic way, without really needing to know which format it is outputting to. We should do the same here if at all possible, rather than have a bunch of PNG-specific tags (requiring the app to specifically know which format is being written).

And, really, I would have preferred if this discrete (and unrelated to ICC profiles) change would have been an entirely separate pull request.