Skip to content
Permalink
Browse files

improve lossless webp compression

  • Loading branch information...
Akaricchi committed May 6, 2019
1 parent b4081c6 commit 8047ca18ce5b689935b98cfe1c1d091fa1595275
Showing with 119 additions and 81 deletions.
  1. BIN resources/00-taisei.pkgdir/gfx/atlas_common_0.webp
  2. BIN resources/00-taisei.pkgdir/gfx/atlas_huge_0.webp
  3. BIN resources/00-taisei.pkgdir/gfx/atlas_portraits_0.webp
  4. BIN resources/00-taisei.pkgdir/gfx/cell_noise.png
  5. BIN resources/00-taisei.pkgdir/gfx/cell_noise.webp
  6. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0000.spr
  7. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0001.spr
  8. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0002.spr
  9. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0003.spr
  10. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0004.spr
  11. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0005.spr
  12. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0006.spr
  13. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0007.spr
  14. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0008.spr
  15. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0009.spr
  16. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0010.spr
  17. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0011.spr
  18. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0012.spr
  19. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0013.spr
  20. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0014.spr
  21. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0015.spr
  22. +1 −1 resources/00-taisei.pkgdir/gfx/fire.frame0016.spr
  23. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0017.spr
  24. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0018.spr
  25. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0019.spr
  26. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0020.spr
  27. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0021.spr
  28. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0022.spr
  29. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0023.spr
  30. +2 −2 resources/00-taisei.pkgdir/gfx/fire.frame0024.spr
  31. BIN resources/00-taisei.pkgdir/gfx/hud.webp
  32. +1 −1 resources/00-taisei.pkgdir/gfx/part/myon.spr
  33. +1 −1 resources/00-taisei.pkgdir/gfx/part/smoothdot.spr
  34. +1 −1 resources/00-taisei.pkgdir/gfx/player/youmu.frame0000.spr
  35. +1 −1 resources/00-taisei.pkgdir/gfx/player/youmu.frame0001.spr
  36. +1 −1 resources/00-taisei.pkgdir/gfx/player/youmu.frame0002.spr
  37. +1 −1 resources/00-taisei.pkgdir/gfx/player/youmu.frame0003.spr
  38. +1 −1 resources/00-taisei.pkgdir/gfx/player/youmu.frame0004.spr
  39. BIN resources/00-taisei.pkgdir/gfx/runes.webp
  40. BIN resources/00-taisei.pkgdir/gfx/stage1/fog.webp
  41. BIN resources/00-taisei.pkgdir/gfx/stage1/snowlayer.webp
  42. BIN resources/00-taisei.pkgdir/gfx/stage1/waterplants.webp
  43. BIN resources/00-taisei.pkgdir/gfx/stage2/border.webp
  44. BIN resources/00-taisei.pkgdir/gfx/stage2/leaves.webp
  45. BIN resources/00-taisei.pkgdir/gfx/stage2/roadgrass.webp
  46. BIN resources/00-taisei.pkgdir/gfx/stage2/roadstones.webp
  47. BIN resources/00-taisei.pkgdir/gfx/stage2/spellbg1.webp
  48. BIN resources/00-taisei.pkgdir/gfx/stage3/border.webp
  49. BIN resources/00-taisei.pkgdir/gfx/stage3/spellbg2.webp
  50. BIN resources/00-taisei.pkgdir/gfx/stage3/wspellbg.webp
  51. BIN resources/00-taisei.pkgdir/gfx/stage3/wspellclouds.webp
  52. BIN resources/00-taisei.pkgdir/gfx/stage4/lake.webp
  53. BIN resources/00-taisei.pkgdir/gfx/stage4/mansion.webp
  54. BIN resources/00-taisei.pkgdir/gfx/stage4/planks.png
  55. BIN resources/00-taisei.pkgdir/gfx/stage4/planks.webp
  56. BIN resources/00-taisei.pkgdir/gfx/stage5/spell_bg.webp
  57. BIN resources/00-taisei.pkgdir/gfx/stage5/spell_clouds.webp
  58. BIN resources/00-taisei.pkgdir/gfx/stage5/spell_lightning.webp
  59. BIN resources/00-taisei.pkgdir/gfx/stage6/towerwall.webp
  60. BIN resources/00-taisei.pkgdir/gfx/youmu_bombbg1.webp
  61. +2 −1 scripts/gen-atlas.py
  62. +1 −1 scripts/optimize-all-img.sh
  63. +60 −23 scripts/optimize-img.sh
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 4000
region_y = 508
region_x = 3996
region_y = 1122
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 4000
region_y = 639
region_x = 1386
region_y = 1508
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 4000
region_y = 770
region_x = 1916
region_y = 1530
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 3996
region_y = 1122
region_x = 2012
region_y = 1530
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 1386
region_y = 1508
region_x = 508
region_y = 1532
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 1916
region_y = 1530
region_x = 604
region_y = 1532
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 2012
region_y = 1530
region_x = 700
region_y = 1536
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 508
region_y = 1532
region_x = 796
region_y = 1536
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 604
region_y = 1532
region_x = 892
region_y = 1536
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 700
region_y = 1536
region_x = 210
region_y = 1544
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 796
region_y = 1536
region_x = 306
region_y = 1544
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 892
region_y = 1536
region_x = 1694
region_y = 1549
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 210
region_y = 1544
region_x = 1790
region_y = 1549
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 306
region_y = 1544
region_x = 3796
region_y = 1612
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 1694
region_y = 1549
region_x = 3892
region_y = 1612
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 1790
region_y = 1549
region_x = 3988
region_y = 1612
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 3796
region_x = 1282
region_y = 1612
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 3892
region_y = 1612
region_x = 402
region_y = 1616
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 3988
region_y = 1612
region_x = 1126
region_y = 1616
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 1282
region_y = 1612
region_x = 2
region_y = 1628
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 402
region_y = 1616
region_x = 98
region_y = 1628
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 1126
region_y = 1616
region_x = 1482
region_y = 1636
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 2
region_y = 1628
region_x = 4000
region_y = 508
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 98
region_y = 1628
region_x = 4000
region_y = 639
region_w = 92
region_h = 127
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 1482
region_y = 1636
region_x = 4000
region_y = 770
region_w = 92
region_h = 127
Binary file not shown.
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 942
region_x = 962
region_y = 384
region_w = 16
region_h = 16
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 962
region_x = 942
region_y = 384
region_w = 16
region_h = 16
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 2548
region_x = 2660
region_y = 1354
region_w = 108
region_h = 120
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 2660
region_x = 2772
region_y = 1354
region_w = 108
region_h = 120
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 2772
region_x = 2884
region_y = 1354
region_w = 108
region_h = 120
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 2884
region_x = 2996
region_y = 1354
region_w = 108
region_h = 120
@@ -1,7 +1,7 @@
# Autogenerated by the atlas packer, do not modify

texture = atlas_common_0
region_x = 2996
region_x = 2548
region_y = 1354
region_w = 108
region_h = 120
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -302,10 +302,11 @@ def process(dstfile=dstfile):
subprocess.check_call([
'cwebp',
'-progress',
'-preset', 'drawing',
'-preset', 'icon',
'-z', '9',
'-lossless',
'-q', '100',
'-m', '6',
str(dstfile),
'-o', str(new_dstfile),
])
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

cd "$(dirname "${BASH_SOURCE[0]}")"/.. || exit $?
find resources -type f -name "*.png" | parallel -j$(nproc) scripts/optimize-img.sh
find resources -type f -name "*.png" -or -name '*.webp' | parallel -j$(nproc) scripts/optimize-img.sh
Oops, something went wrong.

0 comments on commit 8047ca1

Please sign in to comment.
You can’t perform that action at this time.