Downloading Images, Mobile Data Guide[Please Help]

Hi Im creating a simple 2d mobile Game with unity,

I have run into an issue, Its regarding leaderboard. I am using 120x120 images for leaderbaord that I’m downloading at runtime from the server. I need to understand how much data (Kilobytes or Megabytes) is needed to download One image of 120x120 pixels. I cant find the solution anywhere on web that’s why im asking this question here in this forum

How much data the image takes depends entirely on what format you choose. If you choose a format with built in data compression, then you also have to factor in how compressible the data is in your image. An image of all a single color will be significantly smaller than an image of random colors for each pixel, when using a format with compression.

So the only answer really is for you to create one of these images and see for yourself how big your image is.

Most important question is, why you do that?
Why don’t you store scores in data base? In worse case scenario as a text.

1 Like

what do you mean? I meant Downloading avatars( facebook Profile pictures) of players from facebook. The complete scenario is this.

I have a leaderboard which takes 3 arguments ( name, Profile Picture and Score). Profile Picture urls is being fetched for Player’s facebook friends thru facebook unity sdk. Now to show the pictures i need to downlaod the images at runtime for each user.

That is the main issue, How do i calculate how much mobile data is used to download each picture. How can i find this out?

And is it legal to download and save images( all of facebook friends profile images) on mobile so that i dont have to download the pictures again and again.

That is unspecified in your first post. Howevever,

You need read Facebook licence department and contact lawyer.
But I for example, wouldn’t want your application, to access any of my Facebook data.
Because something is public, doesn’t mean you can grab and process as you like.

And I think you got another thread, talking about FB pictures?

2 Likes

Yeh That’s why I was only interested in calucalting the mbs/kbs needed to download an image of 120x120 in this post. The main issue is the same.

How to calculate how much mobile data is needed? How do i calculate that?

You can save any picture locally from Web on PC for testing and see, how much space it takes.
There are different formats and compression rates. So size in KB may vary. Grab some set of images from desired source and estimate min, max and a average space required.

You also should consider using cache. And btw, I am pretty sure, the similar subject pops out at least once before on the forum. Try search for such.

1 Like

Bro I’ve tried searching alot for this particular issue. I failed each time ;-O couldnt find any help. I guess I’ll have to do this in this way. What should I do?

If facebook allows to download and save profile pictures of user’s friends on user’s device then my life is alot easier.
But cant for the love of God find whether facebook allows it or not. Tried asking it on facebook developers forum. but that forum is sooooo dull. No response to any questions.

The Facebook developer TOS includes images downloaded from Facebook in the catch all “Platform Data”. The term appears 89 times in the TOS, so there are plenty of rules to read up on readily available. But this prohibited practice with regards to Platform Data seems applicable here, and has me assuming you will need explicit permission from every one of those friends before accessing their images. I Am Not A Lawyer

https://developers.facebook.com/terms/

2 Likes

Thanks so much.