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

Discussion: Svg Image Source viewer is incomplete #5724

Closed
humbertomoli99 opened this issue Aug 19, 2021 · 2 comments
Closed

Discussion: Svg Image Source viewer is incomplete #5724

humbertomoli99 opened this issue Aug 19, 2021 · 2 comments
Labels
area-Images Images, SVG discussion General discussion no-issue-activity team-Rendering Issue for the Rendering team

Comments

@humbertomoli99
Copy link

Discussion: Svg Image Source viewer is incomplete images overflow

when inserting an svg image into a container it overflows due to not knowing the actual measurements.

this line what it does is obtain the real measurements of the svg image so that it does not come out cut

var document = new Aspose.Svg.SVGDocument(Path.Combine(bitmapFolder, item.image));
var width = document.RootElement.Width.AnimVal.Value;
var height = document.RootElement.Height.AnimVal.Value;

var svgSource = new SvgImageSource(bitmapUri)
{
RasterizePixelHeight = Convert.ToDouble(height),
RasterizePixelWidth = Convert.ToDouble(width),
};

<Image Grid.Column="0" Grid.Row="0" Source="{Binding Icon1}" Visibility="Visible" Width="32" Height="32" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="UniformToFill"></Image>

the problem is that this code runs very slow. there is no native way for this not to happen?

Related Links

https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.media.imaging.svgimagesource?view=winui-3.0

@humbertomoli99 humbertomoli99 added the discussion General discussion label Aug 19, 2021
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Aug 19, 2021
@StephenLPeters StephenLPeters added area-Images Images, SVG team-Rendering Issue for the Rendering team labels Aug 19, 2021
@StephenLPeters
Copy link
Contributor

@codendone FYI

@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Dec 6, 2022
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Images Images, SVG discussion General discussion no-issue-activity team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

3 participants