0

I have a photo sharing app. Data from mobile/tablet goes to server and then these images are displayed in browser and mobile devices of various screen size.

For effective viewing of these images on various devices, do I need to create multiple images of various sizes or can the same image be rendered on the devices.

I have Android native app to share/view the pictures.

Bads123
  • 879
  • 2
  • 13
  • 26

1 Answers1

1

In general it depends on your app's features. But you should consider next things:

  • Senselessness: it's just senseless to show 1200x1920 picture on a device with 320x640 screen because user will not see the difference. Of course in case you don't need to have zoom functionality.
  • Network traffic: contemporary camera modules could capture tremendously large pictures (5248 х 3936 pixels). To download such a large file user will be waiting for a quite long time.
  • RAM consumption: to display picture device must upload it to the memory. Some low end devices have 256MB of memory and to show 5248х3936 picture you will need to upload into memory ~82MB(5248px * 3936px * 32bit) - so most likely you will catch OutOfMemory exception.

There several methods how to solve it. One of them is to passing device screen size to the server. The server should decide which image to return to the particular device.

eleven
  • 6,779
  • 2
  • 32
  • 52
  • Got it. I have one more question. Facebook stores 4 images for each uploaded images and then renders appropriate one based on device's screen. Any idea what are these 4 sizes? – Bads123 Oct 06 '14 at 14:48