numpyimage 3.5.0__tar.gz → 3.5.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numpyimage
3
- Version: 3.5.0
3
+ Version: 3.5.1
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
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- Functions for reading and writing videos.
3
+ Functions for reading and writing video files.
4
4
 
5
5
  Function list:
6
6
  - load_video(filename) -> np.ndarray
7
7
  - lazy_load_video(filename) -> Iterator[np.ndarray]
8
- - save_video(data, filename) -> Saves a (time, height, width[, channels])
9
- numpy array of pixel values as a video file.
8
+ - save_video(data, filename) -> None
9
+ Saves a numpy array of pixel values as a video file.
10
10
  Arguments for setting framerate, video bitrate, etc are provided.
11
11
 
12
12
  Class list:
@@ -137,10 +137,13 @@ def lazy_load_video(filename) -> Iterator[np.ndarray]:
137
137
  Video frame as a numpy array, shape (height, width, colors).
138
138
  """
139
139
  av = _import_av()
140
+ rotation = _get_rotation_from_metadata(filename)
140
141
  with av.open(Path(filename).expanduser()) as container:
141
142
  stream = container.streams.video[0]
142
143
  for frame in container.decode(stream):
143
144
  img = frame.to_ndarray(format='rgb24')
145
+ if rotation not in [None, '0', 0]:
146
+ img = np.rot90(img, k=-int(rotation) // 90)
144
147
  yield img
145
148
 
146
149
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numpyimage
3
- Version: 3.5.0
3
+ Version: 3.5.1
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.5.0'
7
+ version = '3.5.1'
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