Skip to content

Converted all the PNG to WebPs to save space. #910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2017

Conversation

akm0012
Copy link
Contributor

@akm0012 akm0012 commented Oct 11, 2017

No description provided.

@janpio
Copy link
Contributor

janpio commented Oct 11, 2017

May I ask what process you used to do this? Might need that myself.

@akm0012
Copy link
Contributor Author

akm0012 commented Oct 11, 2017

Sure, in Android Studio right click on the Resources folder and at the bottom there is an option to "Convert to WebP"

@codecov-io
Copy link

Codecov Report

Merging #910 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #910   +/-   ##
======================================
  Coverage    6.36%   6.36%           
======================================
  Files          97      97           
  Lines        5105    5105           
  Branches      479     479           
======================================
  Hits          325     325           
  Misses       4753    4753           
  Partials       27      27

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e5d8c4...f43bb92. Read the comment docs.

@janpio
Copy link
Contributor

janpio commented Oct 11, 2017

Ok, that IS easy. Thanks.

@misaochan
Copy link
Member

misaochan commented Oct 16, 2017

Thanks for submitting this, @akm0012 . A question - https://developer.android.com/topic/performance/network-xfer.html says that WebP is only supported by API 17 and above, whereas our minSDK is 15. Will this be an issue for those who are using 16 and below?

@neslihanturan
Copy link
Collaborator

I agree to your question @misaochan . So, I am not sure about merging this PR.

@misaochan
Copy link
Member

misaochan commented Oct 25, 2017

I don't think this PR can be merged the way it currently is, as AFAIK there is no way around the limitation. However, we can discuss if we want to change the minSDK to 17 (4.2.x) instead - it may or may not be worth the tradeoff.

According to our Google Play page, currently 1.6% of our users are using lower versions than that. So unless WebP brings HUGE benefits (or there are other additional benefits to raising the minimum), I would go with no unless a workaround can be found.

@psh
Copy link
Collaborator

psh commented Oct 26, 2017

I did a little poking around -

Both pages say that WebP is supported back to API 14 for lossy images without transparency. The converter in Android Studio should be sensitive to min API

If the minSdkVersion is less than 18, the flag to "skip images with transparency" is selected by default, so if you just press OK it will run through the project and convert images that aren't transparent.

Assuming the conversion was done with that in mind, I dont expect there would be a problem.

That said, there might still be a case to be made for nudging the project's min API, but I don't think the introduction of WebP is necessarily the trigger for it! 😺

@neslihanturan
Copy link
Collaborator

Weird thing is both @psh and @misaochan referenced from https://developer.android.com. However one says min required API level is 17, while the other says 14.

I think we shouldn't change our min API level yet. But if this is not the case I don't see any problem with merging this patch. If you have, please raise your hands until tomorrow :)

@misaochan
Copy link
Member

misaochan commented Oct 31, 2017

@neslihanturan I think @psh means that API 14+ should support WebPs for lossy images without transparency, whereas API 17+ is needed for other types of images. I think the best way to proceed from here would be to test this PR with an API 15 emulator (our minimum) and merge if all the images work on that.

@psh
Copy link
Collaborator

psh commented Oct 31, 2017

Thanks @misaochan - that's a much better and more succinct summation of what I was trying to say! 👍

@neslihanturan
Copy link
Collaborator

I have tested it on API 16 (4.1.2) device and works fine.

@misaochan
Copy link
Member

Sounds good to me then. Fingers crossed.... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants