numpyimage 3.6.2__tar.gz → 3.7.0__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.
Files changed (22) hide show
  1. {numpyimage-3.6.2/numpyimage.egg-info → numpyimage-3.7.0}/PKG-INFO +1 -1
  2. {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/vidio.py +6 -2
  3. {numpyimage-3.6.2 → numpyimage-3.7.0/numpyimage.egg-info}/PKG-INFO +1 -1
  4. {numpyimage-3.6.2 → numpyimage-3.7.0}/pyproject.toml +1 -1
  5. {numpyimage-3.6.2 → numpyimage-3.7.0}/LICENSE +0 -0
  6. {numpyimage-3.6.2 → numpyimage-3.7.0}/README.md +0 -0
  7. {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/__init__.py +0 -0
  8. {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/align.py +0 -0
  9. {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/graphics.py +0 -0
  10. {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/imageio.py +0 -0
  11. {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/nrrd_utils.py +0 -0
  12. {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/operations.py +0 -0
  13. {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/utils.py +0 -0
  14. {numpyimage-3.6.2 → numpyimage-3.7.0}/numpyimage.egg-info/SOURCES.txt +0 -0
  15. {numpyimage-3.6.2 → numpyimage-3.7.0}/numpyimage.egg-info/dependency_links.txt +0 -0
  16. {numpyimage-3.6.2 → numpyimage-3.7.0}/numpyimage.egg-info/requires.txt +0 -0
  17. {numpyimage-3.6.2 → numpyimage-3.7.0}/numpyimage.egg-info/top_level.txt +0 -0
  18. {numpyimage-3.6.2 → numpyimage-3.7.0}/setup.cfg +0 -0
  19. {numpyimage-3.6.2 → numpyimage-3.7.0}/tests/test_heic.py +0 -0
  20. {numpyimage-3.6.2 → numpyimage-3.7.0}/tests/test_pbm.py +0 -0
  21. {numpyimage-3.6.2 → numpyimage-3.7.0}/tests/test_video_streamer.py +0 -0
  22. {numpyimage-3.6.2 → numpyimage-3.7.0}/tests/test_video_writers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numpyimage
3
- Version: 3.6.2
3
+ Version: 3.7.0
4
4
  Summary: Load, save, & manipulate image files as numpy arrays
5
5
  Author-email: Jasper Phelps <jasper.s.phelps@gmail.com>
6
6
  License: MIT License
@@ -394,6 +394,10 @@ class VideoStreamer:
394
394
  return 'variable'
395
395
  return float(1.0 / self._framerate)
396
396
 
397
+ @property
398
+ def duration(self) -> float:
399
+ return float((self.frames_pts[-1] - self.frames_pts[0]) * self.time_base)
400
+
397
401
  def frame_number_to_pts(self, frame_number: int) -> int:
398
402
  if hasattr(frame_number, '__iter__'):
399
403
  return [self.frame_number_to_pts(n) for n in frame_number]
@@ -798,7 +802,8 @@ class FFmpegVideoWriter:
798
802
  # Check if width or height needs to be padded to an even value
799
803
  if (self._pixel_format_out == 'yuv420p'
800
804
  and (width % 2 != 0 or height % 2 != 0)):
801
- pad = [[0, 0], [0, 0], [0, 0]] # [h, w, c]
805
+ pad = [[0, 0], [0, 0]] # [h, w]
806
+ pad += [[0, 0]] if pixel_format_in == 'rgb24' else []
802
807
  if height % 2 != 0:
803
808
  print('INFO: Height must be even for yuv420p pixel format but image'
804
809
  f' has height {height}, so the bottom row will be duplicated.')
@@ -846,7 +851,6 @@ class FFmpegVideoWriter:
846
851
  )
847
852
  self._stdin = self._process.stdin
848
853
 
849
-
850
854
  def write(self, frame):
851
855
  """Write a frame to the video file"""
852
856
  if self._closed:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numpyimage
3
- Version: 3.6.2
3
+ Version: 3.7.0
4
4
  Summary: Load, save, & manipulate image files as numpy arrays
5
5
  Author-email: Jasper Phelps <jasper.s.phelps@gmail.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'
4
4
 
5
5
  [project]
6
6
  name = 'numpyimage'
7
- version = '3.6.2'
7
+ version = '3.7.0'
8
8
  description = 'Load, save, & manipulate image files as numpy arrays'
9
9
  readme.file = 'README.md'
10
10
  readme.content-type = 'text/markdown'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes