castletool 0.2.1__tar.gz → 0.2.2__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.1 → castletool-0.2.2}/PKG-INFO +1 -1
- {castletool-0.2.1 → castletool-0.2.2}/castletool/castletool.py +4 -1
- {castletool-0.2.1 → castletool-0.2.2}/castletool.egg-info/PKG-INFO +1 -1
- {castletool-0.2.1 → castletool-0.2.2}/pyproject.toml +1 -1
- {castletool-0.2.1 → castletool-0.2.2}/LICENSE +0 -0
- {castletool-0.2.1 → castletool-0.2.2}/README.md +0 -0
- {castletool-0.2.1 → castletool-0.2.2}/castletool/__init__.py +0 -0
- {castletool-0.2.1 → castletool-0.2.2}/castletool.egg-info/SOURCES.txt +0 -0
- {castletool-0.2.1 → castletool-0.2.2}/castletool.egg-info/dependency_links.txt +0 -0
- {castletool-0.2.1 → castletool-0.2.2}/castletool.egg-info/entry_points.txt +0 -0
- {castletool-0.2.1 → castletool-0.2.2}/castletool.egg-info/requires.txt +0 -0
- {castletool-0.2.1 → castletool-0.2.2}/castletool.egg-info/top_level.txt +0 -0
- {castletool-0.2.1 → castletool-0.2.2}/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.2
|
|
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
|
|
@@ -259,10 +259,13 @@ def extract_mp4_frames(path: Path, size: int, every_n: int = 1) -> tuple[list[by
|
|
|
259
259
|
|
|
260
260
|
effective_fps = fps / every_n
|
|
261
261
|
|
|
262
|
+
src_size = probe_video_size(path)
|
|
263
|
+
scale_flags = "neighbor" if size > src_size else "bicubic"
|
|
264
|
+
|
|
262
265
|
# Extract frames as PNG via pipe
|
|
263
266
|
result = subprocess.run(
|
|
264
267
|
["ffmpeg", "-i", str(path),
|
|
265
|
-
"-vf", f"select='not(mod(n\\,{every_n}))',scale={size}:{size}:force_original_aspect_ratio=decrease,pad={size}:{size}:(ow-iw)/2:(oh-ih)/2",
|
|
268
|
+
"-vf", f"select='not(mod(n\\,{every_n}))',scale={size}:{size}:force_original_aspect_ratio=decrease:flags={scale_flags},pad={size}:{size}:(ow-iw)/2:(oh-ih)/2",
|
|
266
269
|
"-vsync", "vfr",
|
|
267
270
|
"-f", "image2pipe", "-vcodec", "png", "-"],
|
|
268
271
|
capture_output=True
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: castletool
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
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.2"
|
|
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
|