import os
XUIDir=os.path.join(__file__.rsplit("XenonUI",1)[0],"XenonUI")
XUILibDir=os.path.join(XUIDir,"XUIlib")
XUIImageLibDir=os.path.join(XUILibDir,"image")
Image_CPU=os.path.join(XUIImageLibDir,"cpu.jpeg")
Image_Disk=os.path.join(XUIImageLibDir,"disk.jpeg")
Image_RAM=os.path.join(XUIImageLibDir,"ram.png")
Image_XUI=os.path.join(XUIImageLibDir,"XUI.png")
Image_A=os.path.join(XUIImageLibDir,"A.png")
Image_B=os.path.join(XUIImageLibDir,"B.png")
Image_C=os.path.join(XUIImageLibDir,"C.png")
Image_D=os.path.join(XUIImageLibDir,"D.png")
Image_E=os.path.join(XUIImageLibDir,"E.png")
Image_F=os.path.join(XUIImageLibDir,"F.png")
Image_G=os.path.join(XUIImageLibDir,"G.png")
Image_H=os.path.join(XUIImageLibDir,"H.png")
Image_I=os.path.join(XUIImageLibDir,"I.png")
Image_J=os.path.join(XUIImageLibDir,"J.png")
Image_K=os.path.join(XUIImageLibDir,"K.png")
Image_L=os.path.join(XUIImageLibDir,"L.png")
Image_M=os.path.join(XUIImageLibDir,"M.png")
Image_N=os.path.join(XUIImageLibDir,"N.png")
Image_O=os.path.join(XUIImageLibDir,"O.png")
Image_P=os.path.join(XUIImageLibDir,"P.png")
Image_Q=os.path.join(XUIImageLibDir,"Q.png")
Image_R=os.path.join(XUIImageLibDir,"R.png")
Image_S=os.path.join(XUIImageLibDir,"S.png")
Image_T=os.path.join(XUIImageLibDir,"T.png")
Image_U=os.path.join(XUIImageLibDir,"U.png")
Image_V=os.path.join(XUIImageLibDir,"V.png")
Image_W=os.path.join(XUIImageLibDir,"W.png")
Image_X=os.path.join(XUIImageLibDir,"X.png")
Image_Y=os.path.join(XUIImageLibDir,"Y.png")
Image_Z=os.path.join(XUIImageLibDir,"Z.png")

def img_decode():
	try:
		os.rename(Image_CPU,os.path.join(XUIImageLibDir,"cpu.py"))
		os.rename(Image_Disk,os.path.join(XUIImageLibDir,"disk.py"))
		os.rename(Image_RAM,os.path.join(XUIImageLibDir,"ram.py"))
		os.rename(Image_XUI,os.path.join(XUIImageLibDir,"XUI.py"))
		os.rename(Image_A,os.path.join(XUIImageLibDir,"A.py"))
		os.rename(Image_B,os.path.join(XUIImageLibDir,"B.py"))
		os.rename(Image_C,os.path.join(XUIImageLibDir,"C.py"))
		os.rename(Image_D,os.path.join(XUIImageLibDir,"D.py"))
		os.rename(Image_E,os.path.join(XUIImageLibDir,"E.py"))
		os.rename(Image_F,os.path.join(XUIImageLibDir,"F.py"))
		os.rename(Image_G,os.path.join(XUIImageLibDir,"G.py"))
		os.rename(Image_H,os.path.join(XUIImageLibDir,"H.py"))
		os.rename(Image_I,os.path.join(XUIImageLibDir,"I.py"))
		os.rename(Image_J,os.path.join(XUIImageLibDir,"J.py"))
		os.rename(Image_K,os.path.join(XUIImageLibDir,"K.py"))
		os.rename(Image_L,os.path.join(XUIImageLibDir,"L.py"))
		os.rename(Image_M,os.path.join(XUIImageLibDir,"M.py"))
		os.rename(Image_N,os.path.join(XUIImageLibDir,"N.py"))
		os.rename(Image_O,os.path.join(XUIImageLibDir,"O.py"))
		os.rename(Image_P,os.path.join(XUIImageLibDir,"P.py"))
		os.rename(Image_Q,os.path.join(XUIImageLibDir,"Q.py"))
		os.rename(Image_R,os.path.join(XUIImageLibDir,"R.py"))
		os.rename(Image_S,os.path.join(XUIImageLibDir,"S.py"))
		os.rename(Image_T,os.path.join(XUIImageLibDir,"T.py"))
		os.rename(Image_U,os.path.join(XUIImageLibDir,"U.py"))
		os.rename(Image_V,os.path.join(XUIImageLibDir,"V.py"))
		os.rename(Image_W,os.path.join(XUIImageLibDir,"W.py"))
		os.rename(Image_X,os.path.join(XUIImageLibDir,"X.py"))
		os.rename(Image_Y,os.path.join(XUIImageLibDir,"Y.py"))
		os.rename(Image_Z,os.path.join(XUIImageLibDir,"Z.py"))
	except Exception as err:
		pass

def img_encode():
	try:
		os.rename(os.path.join(XUIImageLibDir,"cpu.py"),Image_CPU)
		os.rename(os.path.join(XUIImageLibDir,"disk.py"),Image_Disk)
		os.rename(os.path.join(XUIImageLibDir,"ram.py"),Image_RAM)
		os.rename(os.path.join(XUIImageLibDir,"XUI.py"),Image_XUI)
		os.rename(os.path.join(XUIImageLibDir,"A.py"),Image_A)
		os.rename(os.path.join(XUIImageLibDir,"B.py"),Image_B)
		os.rename(os.path.join(XUIImageLibDir,"C.py"),Image_C)
		os.rename(os.path.join(XUIImageLibDir,"D.py"),Image_D)
		os.rename(os.path.join(XUIImageLibDir,"E.py"),Image_E)
		os.rename(os.path.join(XUIImageLibDir,"F.py"),Image_F)
		os.rename(os.path.join(XUIImageLibDir,"G.py"),Image_G)
		os.rename(os.path.join(XUIImageLibDir,"H.py"),Image_H)
		os.rename(os.path.join(XUIImageLibDir,"I.py"),Image_I)
		os.rename(os.path.join(XUIImageLibDir,"J.py"),Image_J)
		os.rename(os.path.join(XUIImageLibDir,"K.py"),Image_K)
		os.rename(os.path.join(XUIImageLibDir,"L.py"),Image_L)
		os.rename(os.path.join(XUIImageLibDir,"M.py"),Image_M)
		os.rename(os.path.join(XUIImageLibDir,"N.py"),Image_N)
		os.rename(os.path.join(XUIImageLibDir,"O.py"),Image_O)
		os.rename(os.path.join(XUIImageLibDir,"P.py"),Image_P)
		os.rename(os.path.join(XUIImageLibDir,"Q.py"),Image_Q)
		os.rename(os.path.join(XUIImageLibDir,"R.py"),Image_R)
		os.rename(os.path.join(XUIImageLibDir,"S.py"),Image_S)
		os.rename(os.path.join(XUIImageLibDir,"T.py"),Image_T)
		os.rename(os.path.join(XUIImageLibDir,"U.py"),Image_U)
		os.rename(os.path.join(XUIImageLibDir,"V.py"),Image_V)
		os.rename(os.path.join(XUIImageLibDir,"W.py"),Image_W)
		os.rename(os.path.join(XUIImageLibDir,"X.py"),Image_X)
		os.rename(os.path.join(XUIImageLibDir,"Y.py"),Image_Y)
		os.rename(os.path.join(XUIImageLibDir,"Z.py"),Image_Z)
	except Exception as err:
		pass

if __name__=="__main__":
	img_decode()