Application icon is cropped

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By

Hello, I have a problem. If I set a 1:1 PNG image (I tried 64x64 and 258x258 pixels) as my application icon and export it to my phone, the icon will crop itself. Does anybody know what should I do to fix or prevent it? Thank you,

Could you add an image of what the crop looks like / what it’s meant to?
And in the Export options (I assume Android?) have you set the Launcher Icons?

Yuminous | 2021-07-15 15:29

Added :slight_smile: (the first link refers to an original picture and the second one to the result…) | 2021-07-15 16:57

:bust_in_silhouette: Reply From: Yuminous

The cropping is due to your icon being converted for Android’s adaptive icons:

Adaptive Icon Features
As shown, some phones would like to play with how the icon is presented by moving it around. Google recommends having Foregrounds and Backgrounds for your icon so that this feature can be properly supported. Godot supports this since 2020, but its current implementation is seemingly still a work-in-progress (in regards to telling you why it’s doing this).

These settings are in the export options, but if you simply split your image into Foreground and Background without changing anything, the cropping will still occur.

Export Options
You have two ways around this:

Firstly, the logo appears to be getting cropped to an “enlarged” size of 150%, thus you can simply enlarge your logo’s background by 150% like so:

Enlarged Background
But — although this is easy, it has significant disadvantages in that this workaround will cause adaptive icon users to easily be able to see the corners of your image, which is obviously undesirable.

So secondly and preferably, extend your Zebra image so that it is sized to fit the new background. If you opt for this route, you should strongly consider splitting your Zebra into the foreground whilst the solid green backing becomes the background, thus your App will be able to be animated with adaptive icon Android versions.

Maybe like this:

Extended Zebra

I hope that it helps!

Genius, thank you very much :smiley: | 2021-07-17 18:38

Wow. What a beautifully articulated and helpful answer. Thank you, person. Thank you from the bottom of my heart. You are a diamond.

Toupoc3 | 2023-02-03 05:11