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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: castletool
3
- Version: 0.2.1
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.1
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.1"
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