+1 vote

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

https://drive.google.com/file/d/12SYrVB-WFE13eI_s4lwmrtNpR7WCXr3b/view?usp=sharing,

https://drive.google.com/file/d/1bO6ymSBP8UTdXHDmeDC4mNadLB7eFznQ/view?usp=sharing

in Engine by (96 points)
edited by

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?

Added :) (the first link refers to an original picture and the second one to the result...)

1 Answer

+4 votes
Best answer

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
Result
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:
https://i.imgur.com/y2WJt4J.png
https://i.imgur.com/aMKfG5Q.png

Extended Zebra

I hope that it helps!

by (1,014 points)
selected by

Genius, thank you very much :D

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.