Myosotis-Researches 0.0.5__tar.gz → 0.0.7__tar.gz
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.
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7/Myosotis_Researches.egg-info}/PKG-INFO +1 -1
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/Myosotis_Researches.egg-info/SOURCES.txt +2 -0
- {myosotis_researches-0.0.5/Myosotis_Researches.egg-info → myosotis_researches-0.0.7}/PKG-INFO +1 -1
- myosotis_researches-0.0.7/myosotis_researches/CcGAN/utils/__init__.py +5 -0
- myosotis_researches-0.0.7/myosotis_researches/CcGAN/utils/concat_image_horizontal.py +31 -0
- myosotis_researches-0.0.7/myosotis_researches/CcGAN/utils/concat_image_vertical.py +31 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/setup.py +1 -1
- myosotis_researches-0.0.5/myosotis_researches/CcGAN/utils/__init__.py +0 -3
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/LICENSE +0 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/Myosotis_Researches.egg-info/dependency_links.txt +0 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/Myosotis_Researches.egg-info/top_level.txt +0 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/README.md +0 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/myosotis_researches/CcGAN/__init__.py +0 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/myosotis_researches/CcGAN/utils/print_hdf5_structure.py +0 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/myosotis_researches/__init__.py +0 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/pyproject.toml +0 -0
- {myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/setup.cfg +0 -0
{myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/Myosotis_Researches.egg-info/SOURCES.txt
RENAMED
@@ -9,4 +9,6 @@ Myosotis_Researches.egg-info/top_level.txt
|
|
9
9
|
myosotis_researches/__init__.py
|
10
10
|
myosotis_researches/CcGAN/__init__.py
|
11
11
|
myosotis_researches/CcGAN/utils/__init__.py
|
12
|
+
myosotis_researches/CcGAN/utils/concat_image_horizontal.py
|
13
|
+
myosotis_researches/CcGAN/utils/concat_image_vertical.py
|
12
14
|
myosotis_researches/CcGAN/utils/print_hdf5_structure.py
|
@@ -0,0 +1,31 @@
|
|
1
|
+
from PIL import Image
|
2
|
+
|
3
|
+
def concat_image_horizontal(img_list: list[Image], gap = 2) -> Image:
|
4
|
+
N = len(img_list)
|
5
|
+
|
6
|
+
# Error 1: no images
|
7
|
+
if N == 0:
|
8
|
+
raise ValueError("The length of the image list is 0.")
|
9
|
+
|
10
|
+
# Error 2: Size differs
|
11
|
+
width = img_list[0].width
|
12
|
+
height = img_list[0].height
|
13
|
+
for i in range(1, N):
|
14
|
+
if img_list[i].width != width:
|
15
|
+
raise ValueError("All images should have the same width.")
|
16
|
+
if img_list[i].height != height:
|
17
|
+
raise ValueError("All images should have the same height.")
|
18
|
+
|
19
|
+
# Create concated image
|
20
|
+
concated_width = width * N + gap * (N+1)
|
21
|
+
concated_height = height * N + gap * 2
|
22
|
+
concated_image = Image.new("RGB", (concated_width, concated_height))
|
23
|
+
|
24
|
+
# Copy ans paste
|
25
|
+
for i in range(N):
|
26
|
+
concated_image.paste(img_list[i], (width * i + gap * (i+1), gap))
|
27
|
+
|
28
|
+
# return
|
29
|
+
return concated_image
|
30
|
+
|
31
|
+
__all__ = ["concat_image_horizontal"]
|
@@ -0,0 +1,31 @@
|
|
1
|
+
from PIL import Image
|
2
|
+
|
3
|
+
def concat_image_vertical(img_list: list[Image], gap = 2) -> Image:
|
4
|
+
N = len(img_list)
|
5
|
+
|
6
|
+
# Error 1: no images
|
7
|
+
if N == 0:
|
8
|
+
raise ValueError("The length of the image list is 0.")
|
9
|
+
|
10
|
+
# Error 2: Size differs
|
11
|
+
width = img_list[0].width
|
12
|
+
height = img_list[0].height
|
13
|
+
for i in range(1, N):
|
14
|
+
if img_list[i].width != width:
|
15
|
+
raise ValueError("All images should have the same width.")
|
16
|
+
if img_list[i].height != height:
|
17
|
+
raise ValueError("All images should have the same height.")
|
18
|
+
|
19
|
+
# Create concated image
|
20
|
+
concated_width = width * N + gap * 2
|
21
|
+
concated_height = height * N + gap * (N+1)
|
22
|
+
concated_image = Image.new("RGB", (concated_width, concated_height))
|
23
|
+
|
24
|
+
# Copy ans paste
|
25
|
+
for i in range(N):
|
26
|
+
concated_image.paste(img_list[i], (gap, height * i + gap * (i+1)))
|
27
|
+
|
28
|
+
# return
|
29
|
+
return concated_image
|
30
|
+
|
31
|
+
__all__ = ["concat_image_vertical"]
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="Myosotis-Researches",
|
5
|
-
version="0.0.
|
5
|
+
version="0.0.7",
|
6
6
|
description="A repository for storing my progress of researches.",
|
7
7
|
long_description=open("README.md").read(),
|
8
8
|
long_description_content_type="text/markdown",
|
File without changes
|
File without changes
|
{myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/Myosotis_Researches.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
{myosotis_researches-0.0.5 → myosotis_researches-0.0.7}/myosotis_researches/CcGAN/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|