Rhinocommon problems about modifying the alpha transparency of a png picture frame

I am trying to use Rhinocommon to get an png pictureFrame, but when it is done the png is shown with alpha channel unused(background not transparent).
And I have also tried to modify the alpha transparency of the material associated with the pictureFrame object. However it seems that that trick does not work.

Here is how my code organizes:

Guid picId = myDoc.Objects.AddPictureFrame(plane, filepath, false, _width, _height,false, false);
RhinoObject picobj = myDoc.Objects.FindId(picId);
int picMtrl = picobj.Attributes.MaterialIndex;
myDoc.Materials[picMtrl].AlphaTransparency = true;  
picobj.GetMaterial(true).AlphaTransparency = true;
myDoc.Views.Redraw();
RhinoApp.WriteLine("alpha set done{0}, {1}", picMtrl, picobj.GetMaterial(false).AlphaTransparency);

The problem is that even I have set the alpha transparency value to “true”, the following output of this value is still “false”. So I am quite cofused and looking for some help. Thanks a lot.

@andy - is this something you can help with?

Hi @dale , me again :slight_smile:
Any luck on this issue? I have same problem and dont know how to make it work :frowning:

I set AlphaTransparency to true and it will be changed to true in material but nothing happens :frowning:

index = rs.ObjectMaterialIndex(obj guid)
material = scriptcontext.doc.Materials[index]