문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top