336
Views
11
Comments
Image compress in mobile
Question
Application Type
Mobile

I need to compress the 20 mb image into 2/3 mb size . Is that possible ? 

UserImage.jpg
Aswin Parthiban

Hi Rahul ,


I have used that one , which is not satisfying the requirements and one more exception has been occurred while using the image . The actual Requirements is reduce the size of the image into 60-70% .For example , if its size is 20MB , need to reduce to 5 Mb .Again if its 5 Mb , need to reduce to some mentioned Mb size . 


This requirements are not able to satisfy using the above one which you have mentioned. can you suggest some other solution for the above scenario if possible .



2024-02-29 20-20-43
JohnGB

Hi Aswin,

My apologies for asking, however, I wanted to know on whether you are using a mobile device when taking the 20mb image? Or May I know what resolution is the 20mb image?

Main reason is that for an 1080p image, I think the max size is around 6-7mb.

Cheers,

JohnGB

UserImage.jpg
Aswin Parthiban

Hi  John,

The data which we are using from the entity directly and resolution varies for different image.is there any solution for the above one . 


Thanks ,

Aswin 


2024-02-29 20-20-43
JohnGB

Hi Aswin,
I believe that the image from the entity is coming from an uploaded file in the web, right?

If that is the case, I would suggest to compress the image in the server side rather than compressing it on the mobile side.

As for my experience, I've never reach more than 6-7mb with a higher resolution if the image is taken from the mobile device.

Cheers,

JohnGB

2021-01-04 08-13-48
Toto
 
MVP

Hi Aswin,

You can try my component https://www.outsystems.com/forge/component-overview/5546/resize-image-mobile

You can change based on your requirement (60-70% width or height) also can reduce quality (reducing file size)

Thanks

UserImage.jpg
Aswin Parthiban

Hi JohnGB,

Thank you for your response.

Yes, here we have uploaded images in web page. In mobile we are getting that images from entity.

We did Image compress in server side , so the 21 MB images was compressed into 7.3MB. But in mobile taking more time to load that 7.3 MB image. Kindly give suggest for reducing the loading time in mobile.

Regards,

Aswin P.

UserImage.jpg
Aswin Parthiban

Hi Toto,

Thank you for your response,

I have tried with this component resize-image-mobile. Its returns the base 64 value.

But its taking more time to load images when directly use that base 64 value or convert base 64 to binary value.


Regards,

Aswin P.

UserImage.jpg
Aswin Parthiban

Hi Rahul,

Thank you for your response.

I have tried with this component https://www.outsystems.com/forge/component-overview/2078/image-utils-mobile it's working fine in android but in iOS  the full image is not shown after resize the image.


Regards,

Aswin P.

2021-01-04 08-13-48
Toto
 
MVP

Hi Aswin,


Usually I pair this component with this (https://www.outsystems.com/forge/component-overview/3242/binarydata-client-side) so the result not in base64 but in binary.


Thanks

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Aswin,

If that image is already JPG compressed, this is only possible by:

  • Seriously reducing quality, making the image of very bad quality;
  • Seriously reducing the resolution/dimensions, possibly making the image illegible / unclear.

If these are just photos, you could reduce the quality a bit, and reduce the resolution a lot, and then you might get away with such a massive reduction in size. Otherwise, you just cannot do this.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.