Resize Android even more, fixing crash when changing languages on Android
This commit is contained in:
1 parent
5cbe7a345e
commit
a11c4614ea
7 files changed
+13
-12
No files matched your search
@@ -38,7 +38,8 @@ EXCEPTIONS = {
|
||||
"w/star_red.png",
|
||||
"w/white.png",
|
||||
"w/ui/img/main/aboutPage003android.png",
|
||||
"w/ui_en/img/main/aboutPage003android.png"
|
||||
"w/ui_en/img/main/aboutPage003android.png",
|
||||
"w/exterior/texAtlas002.png",
|
||||
}
|
||||
|
||||
# Path prefixes (relative to resources root, forward-slash) that get 8x reduction.
|
||||
@@ -63,10 +64,10 @@ def _resize_factor(rel: str) -> int:
|
||||
norm = rel.replace("\\", "/")
|
||||
for prefix in HIGH_REDUCTION_PREFIXES:
|
||||
if norm.startswith(prefix):
|
||||
return 4
|
||||
return 8
|
||||
for prefix in LOW_REDUCTION_POSTFIXES:
|
||||
if norm.endswith(prefix):
|
||||
return 1
|
||||
return 2
|
||||
return 4
|
||||
|
||||
|
||||
@@ -120,8 +121,8 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Optimize PNG images for web build")
|
||||
parser.add_argument("--src", default="resources",
|
||||
help="Source resources directory (default: resources)")
|
||||
parser.add_argument("--dst", default="web_resources",
|
||||
parser.add_argument("--dst", default="android_resources",
|
||||
help="Destination parent directory; will contain a 'resources' subdir "
|
||||
"(default: web_resources)")
|
||||
"(default: android_resources)")
|
||||
args = parser.parse_args()
|
||||
optimize(args.src, args.dst)
|
||||
Reference in new issue
Block a user