Downloading and displaying images efficiently in Xamarin.Forms - android

With devices having different resolutions and pixel densities, what's the best approach for downloading images and displaying them efficiently across those devices? Should I send a web service the size wanted for the image and have that service return the appropriately sized image?
I am not sure I'm taking the right path and I haven't found a guide about this, so, please advise. Thanks.

Related

how to scale a user provided image across multiple devices

I am having a problem on how to display user provided images to other users across different devices. For example, I have multiple copies of varying sizes for the same image for my app. These are images I created during development and are part of the app which can support different sized screens. Inside of my app though users can upload a picture of themselves. Obviously now I do not have control of the dimensions of this image. Some users may have new fancy phones which produce very high quality pictures while other users may have not so great phones and produce lower quality images. As well, with user uploaded pictures there is only one image upload. What is the best practice to display these images across various devices. So a user who took a picture on their new iphone 6 will appear nicely on a smaller 3 year old android device as well as a photo taken on a smaller 3 year old android device will appear nicely on an iphone 6?
http://developer.android.com/guide/practices/screens_support.html provides information on how to control images inside of android if I the developer have control of the images, but what if I don't? What if I receive a low quality image from a user, what is the best practice to show it nicely on an ipad for instance?
You can read those guide:
http://developer.android.com/training/displaying-bitmaps/index.html
http://developer.android.com/training/displaying-bitmaps/load-bitmap.html#load-bitmap
When receive your image, you can read its size and decide the scale size it base on user device. (But a small image still looks nasty on a big screen).
Beside, I think you can use other download library like Picasso or Glide to support download and decode image.
Hope this helps.

App intro images - Android-

i'm creating some app intros for my Android app with photoshop and illustrator. The images that i'm creating are very very large in terms of resolution. How to make them fit in all android devices without distorting their propotions?
Ps: I didn't try yet to load these images into a device, is it a good idea to resize them according to the android default Dpi resolutions (ldpi,hdpi,xhdpi etc...)?
You can use Picasso. It can handle resizing and image loading for you.

Display an image gathered from the app depending on device resolution

In my app, I am getting different resolutions of images from URL and I put them in a Bitmap to finally send it to the screen.
The problem is that I don't find a way to choose between the different resolution automatically depending on the screen resolution of the device. Since I get the images while the app is running, I can't put them in the drawable folders before...
Any help will be greatly appreciated!

Should I create resized images for all drawable folders (ldpi-mdpi-hdpi) if the image is the same?

If the image is the same but only resized, should I create (resize) all the images? Or let the system resize the images for me and only ship the app with hdpi images?
For me it makes sense to create new images if the images are different, for example, if the resized image doesn't fit into a ldpi screen then another image needs to be created with less information.
Am I going to run into memory issues on small devices if I only ship apps with hdpi images?
Thanks!
I think you should use specific drawable for each type of screen. By doing this, you are sure that the UI is the same in each screens.
I don't know if you already read this but here is a good article that explains the best way to support multiple screens http://developer.android.com/guide/practices/screens_support.html

Storing and displaying image resources strategy

As we know it there are several screen layout out there on various android devices. Now, my question is, what's the best solution for displaying image on screen (full sized image) on that various device?
Should I (this is several strategy I have in mind right now):
resize every images for that target device? (with the cost of resizing it and lost of quality on larger device)
create several images for all or several common screen size? (with larger download size)
create core application and let them download images appropriate to that screen size (that means, I have to prepare hosting of those images)
something I don't know yet...
So, if you guys have experience in this kind of situation, your recommendation is greatly appreciated.
Update: My application will have several (20-30) images.
This is documented ( http://developer.android.com/guide/practices/screens_support.html ) and answered quite a few times already I believe.
Create different images for the different screen resolution (store in drawable, drawable-hdpi... accordingly).
You can also define different layouts for different screen sizes (although to display full screen images, it does not sound like you need that).

Categories

Resources