How to do stamp transparent(original image format is png)?

It's stamp AP creation code.
And There is image of I'm using png.

public static pdftron.SDF.Obj CreateImageAppearance(PDFDoc doc,
pdftron.PDF.Image img, double opacity)
            ElementBuilder builder = new ElementBuilder();
            ElementWriter writer = new ElementWriter();

            Element element = builder.CreateImage(img, new

            if (opacity < 1)
                // Here is to adjust transparent
                // But original image's transparent area changed to
gray or black
                // that original image format is PNG

            pdftron.SDF.Obj stm = writer.End();


            // Set the bounding box
            stm.PutRect("BBox", bbox.x1, bbox.y1, bbox.x2, bbox.y2);
            stm.PutName("Subtype", "Form");
            return stm;

Is this bug of SetFillOpacity() Method?

PDFNet will automatically preserve PNG alpha channel, so I assume that
you could like to meke your annotation more transparent.

The simplest way to to set the "CA" entry on your markup annotation
(see table 170 in ISO32000). For example:
  annot.GetSDFObj().PutNumber("CA", 0.5);

You could also use transpareny groups in the annotaion but the above
line is a better options because it is better supported by different
PDF consumers.