We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to fill the width of the SfImageEditor.

When we read in a photo taken in portrait, we would like to fill the width right to the available edge. Currently we get a broad stripe of white space on the sides and less at the top and bottom. (see the Image: Initial Load.png). What we would like to see on initial load, is in the other photo (After Zoom to width of device.png), where the width is fully used and the top and bottom of the photo extend past the available space. I achieved this by manually zooming until the width was at the edge of the device.
Is there a setting that would help me achieve this (like Aspect="Fill")? If not, how do I do it programmatically?

Attachment: ScreenCapForSF_427581c8.zip

1 Reply

BK Bharathiraja K Syncfusion Team April 30, 2019 01:47 PM UTC

Hi Will, 
Greetings from Syncfusion. 
We don’t have the option to set the Aspect=”Fill” to the image in ImageEditor. By default, we have loaded the image with the aspect ratio as “AspectFit” in the image editor. If we set the Aspect = “Fill” to the image, there may be a chance to lose the image quality when zooming or cropping the image. So that, we have followed the common editor tool behavior to load the image with the ratio as AspectFit. 

Live Chat Icon For mobile
Up arrow icon