Just found a workaround.
The idea is to output to OpenEXR file format, where all channels are stored as is. Then post process it by another program to output PNG.
I've used https://github.com/Enichan/sharpexr library (MIT License) with the following C# code:
using System;
using SharpEXR;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
namespace EXR2PNG
{
class Program
{
static void Main(string[] args)
{
if (args.Length != 2)
{
Help();
return;
}
var img = EXRFile.FromFile(args[0]);
var part = img.Parts[0];
part.OpenParallel(args[0]);
var bmp = new Bitmap(part.DataWindow.Width, part.DataWindow.Height);
var data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
var destBytes = part.GetBytes(ImageDestFormat.BGRA8, GammaEncoding.Linear, data.Stride);
Marshal.Copy(destBytes, 0, data.Scan0, destBytes.Length);
bmp.UnlockBits(data);
bmp.Save(args[1], ImageFormat.Png);
}
static void Help()
{
Console.WriteLine("Usage:\r\n\tEXP2PNG [SourceEXRFilePath] [TargetPNGFilePath");
}
}
}
Actually is not a solution to make it with the Blender directly, so i don't mark it as answer.
Please note, if you are going to use this code with sharpexr library, you must out OpenEXR file with RGBA, Color Depth set as Float (Half) and Codec as None, because the library doesn't support compression and seems Float (Full).
EDIT: Here is a PowerShell script to process multiple frames
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
cd c:\Projects\GinaGame\ArtWork\Images\cube
dir *.exr | ForEach-Object {c:\Projects\sharpexr\EXR2PNG\bin\Release\EXR2PNG.exe $_.Name ($_.Name+'.png')}