3 ms·
Switching out of the "staticy" background for a plain gray reduced the payload size to ~20M, a savings of ~30Mb. I know this might sound somewhat obvious in re
by userbinator 9y ago
Switching out of the "staticy" background for a plain gray reduced the payload size to ~20M, a savings of ~30Mb.
I know this might sound somewhat obvious in retrospect, but you could've retained something similar to the original background and reduced the size significantly by generating it at runtime --- the code to create a random-looking background may only be not more than a few dozen bytes, and can be the same for multiple resolutions.
For more examples of this technique, see demoscene productions --- the following video was generated by a binary of less than 4096 bytes:
https://www.youtube.com/watch?v=jB0vBmiTr6o https://www.youtube.com/watch?v=jB0vBmiTr6o
Source code: https://github.com/in4k/rgba_tbc_elevated_source https://github.com/in4k/rgba_tbc_elevated_source
Explanation: http://www.iquilezles.org/www/material/function2009/function2009.pdf http://www.iquilezles.org/www/material/function2009/function...
- richardwhiuk 9y agoYou can't programmatically generate the launch image on iOS.
- userbinator 9y agoI've never worked with iOS but given what I've heard about the extensive restrictions on what apps can do, I'm not surprised. I guess this is more like an icon which the OS retrieves from a known place and displays, before the app even runs? Then again, like most demosceners, I see "you can't" as a challenge... and immediately thought of whether exploiting the image format/whatever loads it to run the necessary code would do the trick. Probably wouldn't please Apple for sure. ;-)
- adrianN 9y agoUse an obscure format with a code execution vulnerability in imagemagick to run the generator.
- saagarjha 9y agoiOS most certainly does not use ImageMagick to generate this images.
- richardwhiuk 9y agoPNG only, and I think certain types of PNG as well (e.g. you can't use the alpha channel).
- giovannibajo1 9y agoI think it's instead brilliant that they are giving developers the opportunity to display an image that gives user feedback while the app is loading its binary, executing static constructors, dynamically linking libraries, etc. you are not forbidden to roll out your own splash screen screen, but it will not be as immediate and smooth as the builtin splash screen support.
- deleted 9y ago[deleted]
- mizaru 9y agoThat wasn't an option before iOS 8, I think. edit: I'm not entirely sure if it's possible to do something like this using launch screens.