The image with large size how to reduce it?
💬 Questions and Help
I have Images usually over 5MB and if there is some images it will not scroll smoothly.
but the image to be 100 * 100 pixel is ok.
will the FFImageLoading auto reduce the size of it when I set the source with Image over 5MB?
If you want to be certain you can do something along the lines of:
await ImageService.Instance.LoadStream(token => photo.OpenReadAsync()) .DownSample(500, 500)
You can use .DownSample(100) to reduce the size
@aliusman thankyou and how to use it in xaml?
@mcguu In XML you need to set the layout_width and layout_heigh for your ImageView for example
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
...
/>
Please remember that, this does not mean the image size will be reduced in memory/heap, FFImageLoading will load full image as is (5MB for example) and ImageView will scale the image size.
If you really want to reduce the size of an image, you should always use .DownSample()