I've never seen anyone do it. I've read the API, and don't see it. I know I can do it with PERL and I am sure others could do it in other languages.
Almost anything can be done, but there is no guide on how to do it.
When I resize/edit images in a <canvas>, I don't think anything is left of the original headers.
JΛ̊KE