Page 1 of 1

(RDMLX/RPG) Tips when using images

Posted: Wed Apr 16, 2014 10:26 am
by MarkDuignan
You may need to use thumbnails
The use of thumbnails reduces data transmission sizes and the amount of RAM memory required on the mobile device to display the image.
If you have catalogue of images (eg: products) you will almost certainly need to maintain parallel full and thumbnail images sets.
Full sized images in commercial application are typically in the 100Kb – 200Kb range. Thumbnails are typically in the 1Kb to 3Kb range.
Generally thumbnails should be displayed by default.
Generally larger images should be displayed singly and upon request.
A common mistake is to use full sized images in a list or table and resize them to look like a thumbnail sized images on the client.
The full sized images are still loaded and transmitted to the device and they consume full sized image memory on the device.
You can use LongRange to simultaneously capture large and thumbnail images.
There are free and commercial tools available to automatically and in batch produce thumbnail image sets from large image sets.

Uncontrolled Image Sizes
Different mobile devices capture different sized images. For example, an iPad2 may capture a 1Mb image by default, an iPhone 5 a 5Mb image and some Android devices can capture 17Mb images. As a consequence - if you do not control image capture size(s) you will get variable image upload and download times.
If you attempt to display a list or table of uncontrolled large images, even if they are dynamically resized to be appear as small on the device, you will get unnecessarily slow downloads from the server and may even exceed the memory capacity of the client device.
Allowing the annotation of uncontrolled image sizes is not recommended as it may exceed the memory capacity of the device.
To control the size of images use the ImageSize.Width.LD / ImageSize.Width.PT and ImageSize.Height.LD/ ImageSize.Height.PT properties.

Image Testing
It is important to test your application on the same mobile platforms and in the same communication environment(s) that your end users will use. For example, these are things you should avoid:
- Testing with a 1Mb image capture device, then deploying to users with 5Mb and 10Mb capture devices.
- Testing with a 50Mb/S office Wi-Fi connected to a 1Gb LAN, then deploying to users using 3G networks.

Investigate LongRange’s Image Caching Options
For commonly used images investigate the use of the <root>/LongRange/resource folder or a subfolder of it.
Using the resource cache folder means that the image only needs to be downloaded once to the device.
You can put images into the resource cache folder on a mobile device by:
• Referencing the image using the Resource property.
• Naming it your schema’s Application Resources list.
• Preloading from your schema’s Local Objects Generator program.

Investigate Using Document Views
Where structured collections of images, especially videos, need to collected or displayed you should investigate the use of document views. Document views offer some unique advantages in the handling of larger image files, they can operate offline and will work better in situations where intermittent or slow communications are present.