Skip to content

Conversation

@KarthikRajaKalaimani
Copy link
Contributor

Issue Details:

The user reads a local image, converts it into a byte array, creates a temporary file from it, and assigns the file’s path to the Image control’s Source property, but an exception occurs during this process.

Root Cause:

PlatformInterop.LoadImageFromFile(imageView, file, callback) fails to load the temporary file, which causes an exception to be thrown.

Description of Change:

The fix introduces a constrainSize parameter that, when enabled, applies override to the Glide RequestBuilder, forcing image decoding at original dimensions rather than scaled dimensions. This constraint reduces memory usage from hundreds of megabytes to manageable levels while preserving visual quality through ImageView's built-in scaling capabilities. The fix is automatically applied to all image loading methods including and ensuring consistent behavior across different image sources without breaking existing functionality or requiring API changes.

Tested the behavior in the following platforms.

  • Android
  • Windows
  • iOS
  • Mac

Reference:

N/A

Issues Fixed:

Fixes #32869

Screenshots

Before After
It throws expection when load image image (6)

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 8, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@KarthikRajaKalaimani! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image control crashes on Android when image width exceeds height

1 participant