Does EMF (Enhanced Metafile) support opacity?
Asked Answered
T

2

8

I would be able to create an EMF image (programmatically or from a software) having the background color 50% transparent and the other elements completely opaques.

I'm already be able to create a background completely transparent, but not with a certain alpha/opacity.

Creating this semi-transparent background would allow to overlay the image to another background without completely hide it.

Does anyone know if it's possible with the Enhanced Metafile format?

Treasure answered 2/4, 2014 at 13:40 Comment(0)
T
7

The answer is no: EMF (or WMF) image format supports full transparency but not opacity between 0.0 and 1.0 because it doesn't support colors with alpha channel.

Here are image formats that supports alpha channel

Treasure answered 14/11, 2014 at 8:39 Comment(0)
B
4

I've been struggling with this topic a few weeks now and my research led me to good results. Here is information for those who might face this issue in the future:

Windows EMF which uses GDI library does not support transparent colors. However there is a newer EMF format called EMF+, which uses GDI+ library and supports transparency.

Here is the documentation of the class.

There are quite a few examples for these metafiles in C++ arround the internet, but some experiments can lead you the right way.

Bonnett answered 7/6, 2016 at 9:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.