We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to set image opacity for added image (C# .NET)

I’m using this code to add image in slide with frame. And I have question - how I can set this image opacity?

        Image img = new Bitmap(annotation.ImagePath);
        IPPImage imgx = presentation.Images.AddImage(img);
        ISlide sld = presentation.Slides[annotation.PageNumber??0];
        IPictureFrame pf = sld.Shapes.AddPictureFrame(ShapeType.Rectangle, annotation.Box.X, annotation.Box.Y, annotation.Box.Width, annotation.Box.Height, imgx);
        pf.LineFormat.FillFormat.FillType = Aspose.Slides.FillType.Solid;
        pf.LineFormat.FillFormat.SolidFillColor.Color = GetAnnotationColor(annotation.PenColor,annotation.Opacity);
        pf.LineFormat.Width = Double.Parse(annotation.PenWidth.ToString());

@chub,

Thanks for contacting us. Can you please visit this thread. This will help you out to achieve your requirements. Please share feedback with us if there is still an issue.