How to compress an image in Xamarin Forms? RRS feed

  • Question

  • User236496 posted

    I do realize that this issue has been raised multiple times, but I still cannot find a canonical answer to the question: how to compress an image in Xamarin Forms? I have Image object and I want to upload it to server, but the server doesn't accept files larger than 5MB, so I need to compress it prior to uploading. Thanks for any help.

    Friday, July 8, 2016 4:19 AM

All replies

  • User120906 posted

    Wondering if this link has anything useful for you: https://forums.xamarin.com/discussion/1750/suggest-zip-library

    Friday, July 8, 2016 4:33 AM
  • User120906 posted

    Or maybe this: https://components.xamarin.com/view/ZipArchive

    BTW, haven't tried any of these myself. :)

    Friday, July 8, 2016 4:34 AM
  • User236496 posted

    Kym, no, there shouldn't be any archiving involved. Thanks.

    Friday, July 8, 2016 4:41 AM
  • User120906 posted

    When you are talking about compressing prior to uploading, are you referring to downscaling the image or compression during uploading?

    Friday, July 8, 2016 4:56 AM
  • User236496 posted

    I mean compressing file size without affecting image dimensions in any way.

    Friday, July 8, 2016 4:58 AM
  • User302386 posted

    I guess this is what you are looking for: http://stackoverflow.com/questions/34604217/compress-size-of-image-to-250kb-using-xamarin-forms-without-dependency-service

    Thursday, May 4, 2017 4:45 PM
  • User369807 posted

    Hi nikka , Do you found any solution...?

    Tuesday, July 17, 2018 10:06 AM