ico
This commit is contained in:
BIN
public/img/favicon.ico
Normal file
BIN
public/img/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
BIN
public/img/favicon.png
Normal file
BIN
public/img/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -2,13 +2,13 @@ from PIL import Image
|
|||||||
import cairosvg
|
import cairosvg
|
||||||
|
|
||||||
# Convert SVG to PNG first
|
# Convert SVG to PNG first
|
||||||
png_path = "../public/favicon.png"
|
png_path = "./public/img/favicon.png"
|
||||||
ico_path = "../public/favicon.ico"
|
ico_path = "./public/img/favicon.ico"
|
||||||
|
|
||||||
cairosvg.svg2png(url="../public/favicon.svg", write_to=png_path)
|
cairosvg.svg2png(url="./public/img/favicon.svg", write_to=png_path)
|
||||||
|
|
||||||
# Convert PNG → ICO
|
# Convert PNG → ICO
|
||||||
img = Image.open(png_path)
|
img = Image.open(png_path)
|
||||||
img.save(ico_path, format='ICO', sizes=[(16,16), (32,32), (48,48), (64,64)])
|
img.save(ico_path, format='ICO', sizes=[(32,32),(16,16), (48,48), (64,64)])
|
||||||
|
|
||||||
ico_path
|
ico_path
|
||||||
|
|||||||
Reference in New Issue
Block a user