Closed Bug 1314328 Opened 8 years ago Closed 8 years ago

Convert firstrun images to webp for size reduction if possible, remove alpha channel otherwise

Categories

(Firefox for Android Graveyard :: First Run, defect)

defect
Not set
normal

Tracking

(firefox53 fixed)

RESOLVED FIXED
Firefox 53
Tracking Status
firefox53 --- fixed

People

(Reporter: ahunt, Assigned: ahunt)

References

Details

Attachments

(2 files)

Using webp instead of png can result in a saving of ~25% per image.

Curently we can only use non-transparent webp images: webp support was added in Android 4.0, transparent+lossless webp support wasn't added until Android 4.2.1, we currently support 4.0.3+. (More info is available in Bug 1313990 )

All the non-transparent images are being converted as part of Bug 1313990. Some of the other transparency containing resources that we ship could be converted by adding a solid background - this could help us achieve some further apk size reductions.

E.g. the firstrun_* images have a transparent background. However the background colour is fixed and unlikely to change: adding a solid background would allow us to convert these images to webp.

Ultimately we'd want to convert as many resources as possible to VectorDrawable for the greatest possible size savings. Google however recommend using VectorDrawable only for images up to 200 x 200dp in size: our firstrun images are the largest images we have, and are therefore not suitable candidates for vector'isation - converting them to webp would minimise their long-term apk size impact.
Blocks: fatfennec
Assignee: nobody → ahunt
Status: NEW → ASSIGNED
Summary: Investigate if apk size can be reduced by removing transparency from first-run images → Convert firstrun images to webp for size reduction if possible, remove alpha channel otherwise
Comment on attachment 8817218 [details]
Bug 1314328 - Part 1: add solid background to reduce one firstrun png size

https://reviewboard.mozilla.org/r/97594/#review98070
Attachment #8817218 - Flags: review?(cnevinchen) → review+
Comment on attachment 8817220 [details]
Bug 1314328 - Part 2: convert remaining firstrun pngs to webp

https://reviewboard.mozilla.org/r/97596/#review98072
Attachment #8817220 - Flags: review?(cnevinchen) → review+
Pushed by ahunt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3577a2b44698
Part 1: add solid background to reduce one firstrun png size r=nechen
https://hg.mozilla.org/integration/autoland/rev/aa349b3a36e0
Part 2: convert remaining firstrun pngs to webp r=nechen
https://hg.mozilla.org/mozilla-central/rev/3577a2b44698
https://hg.mozilla.org/mozilla-central/rev/aa349b3a36e0
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: