image rendered in blender differs from image saved to disk I have my rendering set up like so:



the idea is to combine the normals and the depth in to one texture which i can use in a game i am making. I could do 2 separate images, one for normal and one for depth, but it seems to be like i should be able to combine the 2 using the alpha channel to contain the depth information. 

When i render it i get what i expect. I can click the rendered image in blender to see the colour and alpha values all over it, and they are consistent with what i expect. The row of boxes looks like it changes colour as it becomes more distant (because of depth/alpha) but the sampled rgb values are steady. The very near box is almost entirely transparent and the rgb values present and correct (i hope!). 



(White cross marks where i was clicking)

When i save that image and edit in gimp everything has changed. With the row of boxes, instead of the rgb values remaining steady and only the alpha changing, both rgb and alpha changes. And the very near box has lost all rgb information. It's now just white with 1% alpha. 



What do?

Edit:

If in blender i render the image, then go to the image menu and chose save as, i get a checkbox "save as render" on the left. If i uncheck this it works as expected (i think... not thoroughly checked it).

... just checked it and this isn't solving it. It keeps colour values in the extreme-alpha case, and it keeps colour values internally consistent, but the values themselves are all wrong compared to what the blender render window says they are. 

Further edit:

It seems if i export as EXR the values are all correct. I can than convert to PNG and the values are all correct. Most peculiar. Would be marvellous if i didn't have to do all that extra work and it just made the PNG in the first place :)
Strangely enough it appears to work if you convert to premultiplied alpha:



This messes up the RGB values in blender, but the exported png then works as desired.
I'm not too sure why this works the way it does (I'd expect the opposite), but a lot of alpha handling in blender is rather odd..