How to Set Picture Transparency and Transparency for a Table Having a Solid Color?

Referred Picture Frame|Aspose.Slides Documentation but unable to apply it.

@saket.tamgadge,
Thank you for contacting support.

To set the transparency for a picture, please use the following code snippet:

var transparencyPercentage = 80; // for example

if (shape is IPictureFrame pictureFrame)
{
    var imageTransform = pictureFrame.PictureFormat.Picture.ImageTransform;
    var transparencyOperation = null as AlphaModulateFixed;

    foreach (var operation in imageTransform)
    {
        if (operation is AlphaModulateFixed alphaModulateFixed)
        {
            transparencyOperation = alphaModulateFixed;
            break;
        }
    }

    if (transparencyOperation == null)
    {
        imageTransform.AddAlphaModulateFixedEffect(100 - transparencyPercentage);
    }
    else
    {
        transparencyOperation.Amount = (100 - transparencyPercentage);
    }
}

API Reference: IImageTransformOperationCollection interface, AlphaModulateFixed class

Regarding tables in PowerPoint presentations, could you please share a presentation file with an original table and a presentation file with the table with the expected appearance, manually created in PowerPoint?

Thank you Team.

Here are the two versions of the PPT files
PPTs.zip (6.6 MB)

@saket.tamgadge,
Thank you for the sample files.

We have opened the following new ticket(s) in our internal issue tracking system and will consider your question according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44282

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

We were able to achieve it as follows

ICell currentCell = tbl.Rows[0][0];
currentCell.CellFormat.FillFormat.FillType = FillType.Solid;
currentCell.CellFormat.FillFormat.SolidFillColor.Color = cellColor;

Here cellColor is ARGB color structure, and have passed values for red, green and blue and the current cell color.

However, if you can still keep the issue open just to validate if the approach is correct.

@saket.tamgadge,
I am working on the question and will get back to you as soon as possible.

@saket.tamgadge,
I think this is a good workaround. We are glad to know that the issue has been resolved on your end.

1 Like

The issues you found earlier (filed as SLIDESNET-44282) have been fixed in Aspose.Slides for .NET 24.5 (ZIP, MSI, NuGet, Cross-platform).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.