How to add transparency to an image

Q: The PDF supplied has three layers, the bottom of which is an image
(grayscale) which has no imagemask, I need to add transparency to this
image so that we can overlay the pdf on another before printing.
----

A: PDFNet SDK (www.pdftron.com/net) can be used to edit page content
and to add transparency to background images. PDFNet is currently
offered a .NET component and as a cross-platform C++ library.

You can add transparency to the background image by adding the
explicit, soft, or color-key mask. As a starting point you may want to
take a look at the following sample projects:

AddImage: http://www.pdftron.com/net/samplecode.html#AddImage
ElementEdit: http://www.pdftron.com/net/samplecode.html#ElementEdit

To add the image mask to the base image you can use image.SetSoftMask()
and image.SetMask() methods in Image class.

There are couple of ways you could access the image elements on the
page.
You could use ElementReader to traverse page display list. If the
element type is e_image you can construct Image object as follows:

In C#:
Obj image_dict = element.GetXObject();
Image img = new Image(image_dict);
Img.SetSoftMask(...);

In C++:
Obj* image_dict = element->GetXObject();
Image img(image_dict);
Img.SetSoftMask(...);

You could also directly access image XObjects listed in the page
resource dictionary.