본문 바로가기
IT/안드로이드

png to xml for android logo

by DOSGamer 2023. 7. 13.
반응형

그래도 진짜로 적용 가능한 사이트를 남겨 둡니다.

 

1단계 : png - > svg 

2단계 : svg -> xml

 

이렇게 해서 안드로이드 스튜디오에

res > drawable > vector asset 으로 등록 하면 됩니다.

 

 

1단계 : png 로고를 svg 로 변환하고

https://cdkm.com/kr/png-to-svg

 

PNG SVG 변환 - PNG 를 SVG 로 온라인에서 무료로 변환하십시오

프레임 속도: 원래 프레임 속도 유지 프레임 속도 사용자 정의 10 12 15 20 23.976 25 29.97 30 50 60

cdkm.com

 

2단계 : svg 로고를 xml 로 변환해서 코드만 복사

 

https://svg2vector.com/

 

SVG to Vector Drawable Converter – Convert SVG, PNG, JPEG, GIF images to Android VectorDrawable XML resource files online

 

svg2vector.com

 

3단계 : 안드로이드 스튜디오에 xml 만들어서 코드 복사 하면 됩니다.

 

 

도스게임 플레이어 로고를 급조해서 만들었었는데

단순한 로고 라서 xml 로 변경이 잘 되네요.  반원이 약간 삐뚤어 졌지만....수정 할 수 있는 그래픽 툴도 없음...ㅋㅋㅋ

 

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="405"
android:viewportHeight="405"
android:width="50dp"
android:height="50dp">
<path
    android:pathData="M195.5 1L209.5 1L218.5 3Q229.7 6.3 237.5 13L391 166.5L400 183.5L402 191.5L402 210.5Q399.2 225.7 391 235.5L236.5 390Q227.8 396.8 215.5 400L210.5 401L193.5 401Q176.9 398.1 166.5 389L14 236.5Q7.3 228.7 4 217.5L2 207.5L2 195.5L6 179.5L18 161.5L162.5 17L180.5 5L195.5 1ZM197 12Q182 14 174 22L23 173L16 185L13 198Q13 219 23 230L175 381Q183 388 196 390L214 389Q225 386 233 379L380 232Q388 223 391 210Q393 197 390 190L382 174L231 22L213 13L197 12Z"
    android:fillColor="#FFFFFF"
    android:fillAlpha="0.9254902"
    android:strokeColor="#FFFFFF"
    android:strokeAlpha="0.9254902"
    android:strokeWidth="1" />
<path
    android:pathData="M190 40L194 40.5L191 41L190.5 43L190 40Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M195.5 41L203 41.5L195.5 42L195.5 41Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M204.5 42L221.5 45L249.5 57Q269 68.5 284 84.5Q310.8 112.2 322 155.5L321 155.5Q306.9 103.1 270.5 73L245.5 56L221.5 46L204.5 43L204.5 42Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M190.5 44L191 123.5L190 123.5L190.5 44Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M191.5 138L192 237.5L191 237.5L191.5 138Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M322.5 157L324 163.5L323 163.5L322.5 157Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M324.5 165L327 176.5L327 184.5L326 184.5L326 176.5L324 169.5L324.5 165Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M327.5 186L328 217.5L327 217.5L327.5 186Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M326.5 219L327 226.5L326 226.5L326.5 219Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M325.5 228L326 232.5L325 232.5L325.5 228Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M324.5 234L325 238.5L324 238.5L324.5 234Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M323.5 240L324 242.5L323 242.5L323.5 240Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M322.5 244L323 246.5L320.5 254L320 251.5L322.5 244Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M192.5 252L193 352.5L192 352.5L192.5 252Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M318.5 258L319 259.5L315.5 268L315 266.5L318.5 258Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M314.5 269L315 270.5L311.5 277L311 275.5L314.5 269Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M310.5 278L311 279.5L309 280.5L310.5 278Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M308.5 282L308 283.5L301.5 295L302 293.5L308.5 282Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M300.5 296L299.5 298L300.5 296Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M298.5 299L297.5 301L298.5 299Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M296.5 302L295 304.5L276.5 326L283 318.5L296.5 302Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M274.5 326L268.5 333L274.5 326Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M266.5 333L264.5 336Q251.4 346.4 234.5 353L234.5 352Q252.9 344.9 266.5 333Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M228.5 354L230 354.5L219.5 358L219.5 357L228.5 354Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M214.5 358L218 358.5L209.5 361L204.5 361L204.5 360Q211.2 360.7 214.5 358Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M197.5 361L203 361.5L197.5 362L197.5 361Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M193.5 362L196 362.5L193.5 363L193.5 362Z"
    android:fillColor="#40B7E6"
    android:fillAlpha="0.9882353"
    android:strokeColor="#40B7E6"
    android:strokeAlpha="0.9882353"
    android:strokeWidth="1" />
<path
    android:pathData="M191 41Q195.5 42.7 203.5 42L221.5 46L247.5 57Q270.5 70 287 89.5Q308.9 114.1 320 149.5L324 164.5L324 169.5L326 176.5L326 184.5L327 185.5L327 218.5L326 219.5L326 227.5L323 243.5L311 277.5Q297.4 305.9 275.5 326Q257.6 342.6 233.5 353L218.5 358L193 362L192 138.5L191 137.5L191 44.5L190 43.5L191 41Z"
    android:fillColor="#40B7E6"
    android:strokeColor="#40B7E6"
    android:strokeWidth="1" />
</vector>
반응형