chromatic-python 0.8.0__tar.gz → 0.8.1__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.
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/PKG-INFO +1 -1
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/_version.py +3 -3
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/image/_array.py +14 -21
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/PKG-INFO +1 -1
- chromatic_python-0.8.1/chromatic_python.egg-info/scm_version.json +8 -0
- chromatic_python-0.8.0/chromatic_python.egg-info/scm_version.json +0 -8
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/.gitattributes +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/.github/dependabot.yml +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/.github/workflows/docs.yml +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/.github/workflows/release.yml +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/.gitignore +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/README.md +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/banner.png +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/__init__.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/__init__.pyi +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/__main__.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/_typing.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/color/__init__.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/color/__init__.pyi +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/color/colorconv.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/color/colorconv.pyi +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/color/core.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/color/core.pyi +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/color/palette.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/color/palette.pyi +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/__init__.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/__init__.pyi +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/_fetchers.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/fonts/userfont.schema.json +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/fonts/vga437.ttf +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/images/butterfly.jpg +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/images/escher.png +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/images/goblin_virus.png +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/images/registry.json +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/userfont.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/data/userfont.pyi +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/demo.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/image/__init__.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/image/__init__.pyi +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/image/_curses.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic/image/_glyph.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/SOURCES.txt +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/dependency_links.txt +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/entry_points.txt +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/requires.txt +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/scm_file_list.json +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/top_level.txt +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/docs/api/chromatic.md +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/docs/api/color.md +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/docs/api/data.md +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/docs/api/image.md +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/docs/index.md +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/mkdocs.yml +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/pyproject.toml +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/setup.cfg +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/tests/__init__.py +0 -0
- {chromatic_python-0.8.0 → chromatic_python-0.8.1}/tests/test_color_str.py +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.8.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 8,
|
|
21
|
+
__version__ = version = '0.8.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 8, 1)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'ga30deae42'
|
|
@@ -399,7 +399,7 @@ class _ConversionHandler:
|
|
|
399
399
|
else:
|
|
400
400
|
arr = np.asarray(im.convert("RGB"), dtype=np.uint8)
|
|
401
401
|
elif _is_array(im):
|
|
402
|
-
arr =
|
|
402
|
+
arr = im.astype(np.uint8)
|
|
403
403
|
else:
|
|
404
404
|
raise TypeError
|
|
405
405
|
if not arr.size:
|
|
@@ -446,30 +446,23 @@ class _ConversionHandler:
|
|
|
446
446
|
rgb = rgb[None, :]
|
|
447
447
|
chars = self._chars()
|
|
448
448
|
ch, cw = _get_bbox_shape(self.font)
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
interp = np.empty((rgb.shape[0],
|
|
449
|
+
out_shape = (
|
|
450
|
+
int(self.factor / (rgb.shape[2] / rgb.shape[1]) / ceil(cw / ch)),
|
|
451
|
+
self.factor,
|
|
452
|
+
)
|
|
453
|
+
interp = np.empty((rgb.shape[0], *out_shape), dtype="<U1")
|
|
454
454
|
for i in range(rgb.shape[0]):
|
|
455
455
|
grey = cv.cvtColor(rgb[i], cv.COLOR_RGB2GRAY)
|
|
456
456
|
blur = grey.astype(np.float64) / 255.0
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
)
|
|
464
|
-
if (sx := (grey.shape[1] / out_w - 1) / 2) > 0:
|
|
465
|
-
blur = cv.filter2D(
|
|
466
|
-
blur,
|
|
467
|
-
-1,
|
|
468
|
-
cv.getGaussianKernel(2 * int(4.0 * sx + 0.5) + 1, sx).T,
|
|
469
|
-
borderType=cv.BORDER_REFLECT_101,
|
|
470
|
-
)
|
|
457
|
+
for t, (ax_in, ax_out) in enumerate(zip(grey.shape, out_shape)):
|
|
458
|
+
if (s := (ax_in / ax_out - 1) / 2) <= 0:
|
|
459
|
+
continue
|
|
460
|
+
k = cv.getGaussianKernel(2 * int(4.0 * s + 0.5) + 1, s)
|
|
461
|
+
if t:
|
|
462
|
+
k = k.T
|
|
463
|
+
blur = cv.filter2D(blur, -1, k, borderType=cv.BORDER_REFLECT_101)
|
|
471
464
|
grey = (
|
|
472
|
-
cv.resize(blur,
|
|
465
|
+
cv.resize(blur, out_shape[::-1], interpolation=cv.INTER_LINEAR) * 255.0
|
|
473
466
|
).astype(np.uint8)
|
|
474
467
|
interp[i] = chars[np.rint(grey / 255 * (chars.size - 1)).astype(np.intp)]
|
|
475
468
|
return interp[0] if is_single else interp
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{chromatic_python-0.8.0 → chromatic_python-0.8.1}/chromatic_python.egg-info/scm_file_list.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|