castletool 0.2.0__tar.gz → 0.2.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.
- {castletool-0.2.0 → castletool-0.2.1}/PKG-INFO +1 -1
- {castletool-0.2.0 → castletool-0.2.1}/castletool/castletool.py +3 -2
- {castletool-0.2.0 → castletool-0.2.1}/castletool.egg-info/PKG-INFO +1 -1
- {castletool-0.2.0 → castletool-0.2.1}/pyproject.toml +1 -1
- {castletool-0.2.0 → castletool-0.2.1}/LICENSE +0 -0
- {castletool-0.2.0 → castletool-0.2.1}/README.md +0 -0
- {castletool-0.2.0 → castletool-0.2.1}/castletool/__init__.py +0 -0
- {castletool-0.2.0 → castletool-0.2.1}/castletool.egg-info/SOURCES.txt +0 -0
- {castletool-0.2.0 → castletool-0.2.1}/castletool.egg-info/dependency_links.txt +0 -0
- {castletool-0.2.0 → castletool-0.2.1}/castletool.egg-info/entry_points.txt +0 -0
- {castletool-0.2.0 → castletool-0.2.1}/castletool.egg-info/requires.txt +0 -0
- {castletool-0.2.0 → castletool-0.2.1}/castletool.egg-info/top_level.txt +0 -0
- {castletool-0.2.0 → castletool-0.2.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: castletool
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Interactive Castle deck editor for injecting images/GIFs and MIDI into Castle blueprint JSON files.
|
|
5
5
|
Author-email: Your Name <your.email@example.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -192,10 +192,11 @@ def find_blueprints(card: Path) -> list[Path]:
|
|
|
192
192
|
|
|
193
193
|
def load_image_frames(path: Path, size: int):
|
|
194
194
|
img = Image.open(path)
|
|
195
|
+
resample = Image.NEAREST if size > max(img.size) else Image.LANCZOS
|
|
195
196
|
|
|
196
197
|
# Normal image
|
|
197
198
|
if not getattr(img, "is_animated", False):
|
|
198
|
-
frame = img.convert("RGBA").resize((size, size),
|
|
199
|
+
frame = img.convert("RGBA").resize((size, size), resample)
|
|
199
200
|
buf = io.BytesIO()
|
|
200
201
|
frame.save(buf, format="PNG")
|
|
201
202
|
return [buf.getvalue()], 1.0
|
|
@@ -206,7 +207,7 @@ def load_image_frames(path: Path, size: int):
|
|
|
206
207
|
|
|
207
208
|
try:
|
|
208
209
|
while True:
|
|
209
|
-
frame = img.convert("RGBA").resize((size, size),
|
|
210
|
+
frame = img.convert("RGBA").resize((size, size), resample)
|
|
210
211
|
buf = io.BytesIO()
|
|
211
212
|
frame.save(buf, format="PNG")
|
|
212
213
|
frames.append(buf.getvalue())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: castletool
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Interactive Castle deck editor for injecting images/GIFs and MIDI into Castle blueprint JSON files.
|
|
5
5
|
Author-email: Your Name <your.email@example.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "castletool"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "Interactive Castle deck editor for injecting images/GIFs and MIDI into Castle blueprint JSON files."
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Your Name", email = "your.email@example.com" }
|
|
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
|