It's stamp AP creation code.
And There is image of I'm using png.
http://www.nocsontech.com/URGENT_t.png
public static pdftron.SDF.Obj CreateImageAppearance(PDFDoc doc,
pdftron.PDF.Image img, double opacity)
{
ElementBuilder builder = new ElementBuilder();
ElementWriter writer = new ElementWriter();
writer.Begin(doc);
Element element = builder.CreateImage(img, new
pdftron.Common.Matrix2D());
element.GetBBox(bbox);
if (opacity < 1)
{
// Here is to adjust transparent
element.GetGState().SetFillOpacity(opacity);
// But original image's transparent area changed to
gray or black
// that original image format is PNG
}
writer.WriteElement(element);
pdftron.SDF.Obj stm = writer.End();
writer.Dispose();
builder.Dispose();
// 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?