aerothemeplasma/plasma/shells/io.gitgud.wackyideas.desktop/contents/images/spinner/createspinner.py
catpswin56 55c892faf4 Shell: rewrite lockscreen + more
SDDM: update for the new AeroShell SDDM KCM
Update installation script to install the new AeroShell SDDM KCM
Look and feel + Shell: switch to AeroShellUtils for the SDDM background
2026-03-14 15:52:32 -03:00

25 lines
724 B
Python
Executable file

#!/usr/bin/python3
from PIL import Image
import glob
import os
os.system("mogrify -format png Bitmap5004.bmp")
img = Image.open('Bitmap5004.png')
w, h = img.size
framesize = min(w, h)
horizontalframes = (w > h)
fin = False
cropcount = 0
while fin == False:
if (horizontalframes and framesize * (cropcount+1) > w) or (not horizontalframes and framesize * (cropcount+1) > h):
print("e")
fin = True
break
if horizontalframes:
img.crop((framesize * cropcount, 0, framesize * (cropcount+1), framesize)).save('spin'+str(cropcount)+'.png')
else:
img.crop((0, framesize * cropcount, framesize, framesize * (cropcount+1))).save('spin'+str(cropcount)+'.png')
cropcount += 1