Article

How to optimize the quality of images / photos in a mobile application

Question

We are trying to optimize the synchronization time of the mobile application (offline), and one of the steps is image optimization.

How can we set the target image size (for example 1280 x 800)?

For example, there is a feature in Appache Cordova for this exact scenario.

Is it possible to do this in the settings or is it necessary to change the code?

Answer

We already optimaze images in the app.

Below is the code used in the base version:

Terrasoft.Camera.captureFromCamera({
            quality: 70,//в процентах
            size: 1280,//по максимальной стороне
            success: function() {},
            failure: function() {},
            scope: this
        });

This code enables you to change the image size:

Terrasoft.sdk.RecordPage.configureColumn("Opportunity", "opportunityFilesDetail", "Data", {
    quality: 50
});

 

Like 0

Like

Share

0 comments
Show all comments