Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docs for https://github.com/dotnet/maui/pull/25686 #2604

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/user-interface/images/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,14 @@ A background color for an image can also be specified:

<!-- Valid color values are actually derived from the SKColor struct, rather than Microsoft.Maui.Graphics.Colors. -->
Color values can be specified in hexadecimal, or as a .NET MAUI color. For example, `Color="Red"` is valid.

## Control image quality by specifying FilterQuality

The underlying [SKFilterQuality](https://github.com/mono/SkiaSharp/blob/f9bf4512767c9de22b6683e573b145ce5f0ce0a9/binding/SkiaSharp/SKPaint.cs#L17) used to compress the images is set to `SKFilterQuality.High` by default.

With https://github.com/dotnet/maui/pull/25686 a new configuration property `FilterQuality` was introduced that can be set to any member of `SKFilterQuality`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to use the wording "property" here, when the end user will need to specify an "attribute" on the MauiImage Item?

I know the property was added in the class but that is an internal class which the user will not be able to use.
And we don't want to confuse it with an MSBuild property.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Changed.


```xml
<!-- This instructs Skia to use the internal default for filter quality and to avoid the current default value `SKFilterQuality.High` -->
<MauiImage Include="Resources\Images\logo.svg" FilterQuality="None" />
```