Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does EMF (Enhanced Metafile) support opacity?

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?

like image 509
superrache Avatar asked Apr 02 '14 13:04

superrache


2 Answers

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

like image 170
superrache Avatar answered Sep 30 '22 16:09

superrache


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.

like image 31
Alexander Demerdzhiev Avatar answered Sep 30 '22 16:09

Alexander Demerdzhiev