OK, I found file from 1.5 and edited it. Now I have images without white background, all with equal height and different width. All you need, is to put attached file into overrides/classes folder and edit two files: app/cache/dev/class_index.php and app/cache/prod/class_index.php change this:
'ImageManager' =>
array (
'path' => '',
'type' => 'class',
'override' => false,
),
into this:
'ImageManager' =>
array (
'path' => 'override/classes/ImageManager.php',
'type' => 'class',
'override' => false,
),
After that, you should clear cache and regenerate images.
ImageManager.php