It could be that I don't fully understand your situation and contraints, but it sounds like you may be going all-out when a simpler solution might do the trick.
Why not use your webserver app to do the transcoding on your end, then provide an additional download link that users can click on to download a png version of the image.
If there is a specific need for the client machine/browser to do the transcoding, please reply with further detail.