Search code examples
androidpng

Convert xxx.9.png to xxx.png


I was asking how to convert images from .9.png to .png extensions.

I've tried to rename them using ren xxx.9.png xxx.png but not work

I tried many solutions on the internet but failed.

the images are too many and hard to do manually. also, I read that doing it manually will not recognize by android studio it'll continue to see that it is .9.png too.

so can anyone help me to solve that image?


Solution

  • A .9.png or a 9-patch image is simply a .png image with a 1px border around its edges. You can read more about it here. You can see this for yourself if you click on any png resource in android and scroll through the options that popup and click on create a 9-patch file, the dialog will show a filetype of png and not 9.png although this will be reflected in the name. This link is also worth a read.