代码库初始化
This commit is contained in:
1 parent
07786ab323
commit
4334694551
851 files changed
+42626
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from PIL import Image
|
||||
import os
|
||||
base = r"e:\MCStudioDownload\work\3027246179@qq.com\Cpp\AddOn\309c2d420bc84ee986db9cdd070ff02a\resource_pack_t7eJjrxY\textures\items"
|
||||
|
||||
# 打印若干物品贴图尺寸对比
|
||||
for n in ["burrito", "burrito_rotten", "hot_dog", "taco", "jianbing"]:
|
||||
p = os.path.join(base, n + ".png")
|
||||
if os.path.exists(p):
|
||||
im = Image.open(p)
|
||||
print(n, im.size, im.mode, os.path.getsize(p))
|
||||
|
||||
# 校验 jianbing 是否是有效完整PNG且内容是煎饼(采样角点颜色)
|
||||
p = os.path.join(base, "jianbing.png")
|
||||
im = Image.open(p)
|
||||
im.load()
|
||||
print("jianbing corners:", im.getpixel((0,0)), im.getpixel((15,0)), im.getpixel((0,15)), im.getpixel((15,15)))
|
||||
print("jianbing center:", im.getpixel((8,8)))
|
||||
Reference in new issue
Block a user