Skip to content

Commit

Permalink
document app icon generation
Browse files Browse the repository at this point in the history
  • Loading branch information
navaronbracke committed Apr 1, 2023
1 parent 485e887 commit 36a5303
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# WeForza App

### Application icons

To generate both application launcher icons and splash screen icons,
you need a square vector asset (SVG) which contains a foreground layer (the icon itself)
and a background layer (the background that fills the square).

This asset should have its foreground layer fit within the inner 2/3 of the asset itself.
For example, an asset that has a view box of 600x600 will only show its inner 400x400 pixels.

#### Split the foreground and background layer

Given the SG asset, create two copies of it.
In a text editor of your choice, remove the background layer from the first copy. This file is now your foreground asset.
In a text editor of your choice, remove the foreground layer from the second copy. This file is now your background asset.

Now you should have the original asset, a foreground variant and a background variant.

#### Generating iOS app icons and launch screen images

For iOS, generating the app icons and launch screen images is straightforward, as the formats are predefined in XCode.

1) Generate the app icons using the image generation script and use the original asset as input,
since the app icon contains both a foreground and background layer.
Update the `AppIcon.appiconset` folder with the newly generated images.

2) Generate the launch screen images using the image generation script and use the foreground asset as input.
Update the `LaunchImage.imageset` folder with the newly generated images.
Finally, if not already set up, update the background color of the Launch Screen in XCode.

#### Generating Android app icons

1) Generate the app icon mipmaps using [Android Asset Studio](https://developer.android.com/studio/write/create-app-icons#access).
This generates various `ic_launcher` assets, which refer to the Application Launcher. These assets are the app icons.

#### Generating Android Splash Screen assets

On Android S and higher, the splash screen is composed of the `windowSplashScreenBackground` and `windowSplashScreenAnimatedIcon`.
The animated icon can be set to a vector asset and is typically set to the foreground layer of the app icon.

On Android R and lower, the splash screen is defined by the `windowBackground`. This is usually set to a drawable resource.

This drawable resource is composed of a background color and a bitmap.
The bitmaps can be generated using the image generation script, using the app icon foreground layer as input.
The generated `logo.png` files in the various `drawable/<dpi>` folders are the output bitmaps.

### Translations

The application uses `flutter gen-l10n` to generate the translations.
Expand Down

0 comments on commit 36a5303

Please sign in to comment.