This change just first step to fix this bug. The commit removes much tricky code. But big
changes causes regressions, so, i want to test it before proceed.
Known issues:
- Layer frame not printed
- Transparency feature is dropped
- DPI feature is temporary disabled
- Print code not rewrited yet
- New behaviour allows resize image when exporting, but no interface for that