tiledimage 0.2.2__py3-none-any.whl → 0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
tiledimage/2pngs.py ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env python
2
+
3
+ import sys
4
+
5
+ import cv2
6
+
7
+ import tiledimage.cachedimage as ci
8
+
9
+
10
+ def main():
11
+ if len(sys.argv) not in (3, 4):
12
+ print("Convert a image to a tiled image.\n")
13
+ print("usage: pngs2 from_image to_image.pngs [tilesize]\n")
14
+ sys.exit(1)
15
+ tilesize = 64
16
+ if len(sys.argv) == 4:
17
+ tilesize = int(sys.argv[3])
18
+ image = cv2.imread(sys.argv[1])
19
+ with ci.CachedImage(
20
+ "new", dir=sys.argv[2], tilesize=(tilesize, tilesize)
21
+ ) as cimage:
22
+ cimage.put_image((0, 0), image)
23
+
24
+
25
+ if __name__ == "__main__":
26
+ main()
tiledimage/pngs2.py ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env python
2
+
3
+ from __future__ import print_function
4
+
5
+ import sys
6
+
7
+ import cv2
8
+
9
+ import tiledimage.cachedimage as ci
10
+
11
+
12
+ def main():
13
+ if len(sys.argv) != 3:
14
+ print("Convert an image tile to a single image.\n")
15
+ print("usage: pngs2 from_image.pngs to_image.[jpg|png|...]\n")
16
+ sys.exit(1)
17
+ with ci.CachedImage("inherit", dir=sys.argv[1]) as image:
18
+ image = image.get_image()
19
+ cv2.imwrite(sys.argv[2], image)
20
+
21
+
22
+ if __name__ == "__main__":
23
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tiledimage
3
- Version: 0.2.2
3
+ Version: 0.3
4
4
  Summary: tools for tiled image that can be cached on a filesystem.
5
5
  License: MIT
6
6
  Author: vitroid
@@ -0,0 +1,10 @@
1
+ tiledimage/2pngs.py,sha256=J0jWP4Dx0Y3abSDG3FbAwg7kOrOZ7k3VPkx7lnt0Gt8,575
2
+ tiledimage/__init__.py,sha256=rnObPjuBcEStqSO0S6gsdS_ot8ITOQjVj_-P1LUUYpg,22
3
+ tiledimage/cachedimage.py,sha256=Mbxpl56dZTYiUENnqO7F6pI-0q5wvbsyUt0Gq0Z8j94,3239
4
+ tiledimage/pngs2.py,sha256=fLet08S7RAuLq-B8eqe8FvjICUKU_nL-cdYZnL9MlAw,490
5
+ tiledimage/tilecache.py,sha256=gl1kzUJUfipS7tzfWoCxktFrvb5jsXoe2p24zYwh068,3413
6
+ tiledimage/tiledimage.py,sha256=UslrUDLJlCapQRmcVmUMsCsnqY4jbmNk0tkLCpl0_SY,5823
7
+ tiledimage-0.3.dist-info/METADATA,sha256=BDIJOrelFGqxIVYCdfezFs4UxbcIiYpHRVfzBx3rq9k,3290
8
+ tiledimage-0.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
9
+ tiledimage-0.3.dist-info/entry_points.txt,sha256=Ef5N7paIPCI141ygjQJ7aLN_rFHLIMjss2P-wT7xqPg,75
10
+ tiledimage-0.3.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ 2pngs=tiledimage.2pngs:main
3
+ pngs2=tiledimage.pngs2:main
4
+
@@ -1,8 +0,0 @@
1
- tiledimage/__init__.py,sha256=rnObPjuBcEStqSO0S6gsdS_ot8ITOQjVj_-P1LUUYpg,22
2
- tiledimage/cachedimage.py,sha256=Mbxpl56dZTYiUENnqO7F6pI-0q5wvbsyUt0Gq0Z8j94,3239
3
- tiledimage/tilecache.py,sha256=gl1kzUJUfipS7tzfWoCxktFrvb5jsXoe2p24zYwh068,3413
4
- tiledimage/tiledimage.py,sha256=UslrUDLJlCapQRmcVmUMsCsnqY4jbmNk0tkLCpl0_SY,5823
5
- tiledimage-0.2.2.dist-info/METADATA,sha256=rk4PgnVqkloPBubtPBLnwZ9l17fdHyYr7rxniEPKtp8,3292
6
- tiledimage-0.2.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
7
- tiledimage-0.2.2.dist-info/entry_points.txt,sha256=RiJU6UjfqclD9HizScQ4nX6PbysR7Tybr2DrKv0AXTQ,53
8
- tiledimage-0.2.2.dist-info/RECORD,,
@@ -1,4 +0,0 @@
1
- [console_scripts]
2
- 2pngs=2pngs:main
3
- pngs2=pngs2:main
4
-