Add "None" option for transparent background in Image view

Authored by huoni on Mar 24 2018, 12:31 AM.


Add "None" option for transparent background in Image view

Some users may prefer viewing images with an alpha channel without a
background. Before D11629 this was the behaviour for SVGs, but is now
impossible for both SVGs and raster images. This patch adds this option,
effectively adding functionality for raster images, and getting back the
previous behaviour for SVGs.
We also make None the default.

For raster images, choosing None paints the buffer with
Qt::transparent where needed.
For SVGs, this option doesn't draw anything, which was the behaviour before

Depends on D11629

Example (PNG on left, SVG on right):


Test Plan:
Test the None option for both raster images and SVGs.
Ensure other options (checkboard and solid color) are unaffected.

Reviewers: Gwenview, rkflx, ngraham

Reviewed By: Gwenview, rkflx, ngraham

Subscribers: zzag, muhlenpfordt

Tags: Gwenview

Differential Revision: