PySSTV 0.5.5__tar.gz → 0.5.6__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 (30) hide show
  1. {PySSTV-0.5.5 → PySSTV-0.5.6}/PKG-INFO +8 -1
  2. {PySSTV-0.5.5 → PySSTV-0.5.6}/PySSTV.egg-info/PKG-INFO +8 -1
  3. {PySSTV-0.5.5 → PySSTV-0.5.6}/README.md +7 -0
  4. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/__main__.py +15 -2
  5. {PySSTV-0.5.5 → PySSTV-0.5.6}/setup.py +1 -1
  6. {PySSTV-0.5.5 → PySSTV-0.5.6}/LICENSE.txt +0 -0
  7. {PySSTV-0.5.5 → PySSTV-0.5.6}/MANIFEST.in +0 -0
  8. {PySSTV-0.5.5 → PySSTV-0.5.6}/PySSTV.egg-info/SOURCES.txt +0 -0
  9. {PySSTV-0.5.5 → PySSTV-0.5.6}/PySSTV.egg-info/dependency_links.txt +0 -0
  10. {PySSTV-0.5.5 → PySSTV-0.5.6}/PySSTV.egg-info/entry_points.txt +0 -0
  11. {PySSTV-0.5.5 → PySSTV-0.5.6}/PySSTV.egg-info/requires.txt +0 -0
  12. {PySSTV-0.5.5 → PySSTV-0.5.6}/PySSTV.egg-info/top_level.txt +0 -0
  13. {PySSTV-0.5.5 → PySSTV-0.5.6}/pyproject.toml +0 -0
  14. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/__init__.py +0 -0
  15. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/color.py +0 -0
  16. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/examples/__init__.py +0 -0
  17. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/examples/codegen.py +0 -0
  18. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/examples/get_floats.py +0 -0
  19. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/examples/get_freq_bits.py +0 -0
  20. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/examples/gimp-plugin.py +0 -0
  21. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/examples/overlay.py +0 -0
  22. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/examples/pyaudio_sstv.py +0 -0
  23. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/examples/repeater.py +0 -0
  24. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/grayscale.py +0 -0
  25. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/sstv.py +0 -0
  26. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/tests/__init__.py +0 -0
  27. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/tests/common.py +0 -0
  28. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/tests/test_color.py +0 -0
  29. {PySSTV-0.5.5 → PySSTV-0.5.6}/pysstv/tests/test_sstv.py +0 -0
  30. {PySSTV-0.5.5 → PySSTV-0.5.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySSTV
3
- Version: 0.5.5
3
+ Version: 0.5.6
4
4
  Summary: Python classes for generating Slow-scan Television transmissions
5
5
  Home-page: https://github.com/dnet/pySSTV
6
6
  Author: András Veres-Szentkirályi
@@ -52,6 +52,13 @@ Command line usage
52
52
  --vox add VOX tones at the beginning
53
53
  --fskid FSKID add FSKID at the end
54
54
  --chan CHAN number of channels (default: mono)
55
+ --resize resize the image to the correct size
56
+ --keep-aspect-ratio keep the original aspect ratio when resizing
57
+ (and cut off excess pixels)
58
+ --keep-aspect keep the original aspect ratio when resizing
59
+ (not cut off excess pixels)
60
+ --resample which resampling filter to use for resizing
61
+ (see Pillow documentation)
55
62
 
56
63
  Python interface
57
64
  ----------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySSTV
3
- Version: 0.5.5
3
+ Version: 0.5.6
4
4
  Summary: Python classes for generating Slow-scan Television transmissions
5
5
  Home-page: https://github.com/dnet/pySSTV
6
6
  Author: András Veres-Szentkirályi
@@ -52,6 +52,13 @@ Command line usage
52
52
  --vox add VOX tones at the beginning
53
53
  --fskid FSKID add FSKID at the end
54
54
  --chan CHAN number of channels (default: mono)
55
+ --resize resize the image to the correct size
56
+ --keep-aspect-ratio keep the original aspect ratio when resizing
57
+ (and cut off excess pixels)
58
+ --keep-aspect keep the original aspect ratio when resizing
59
+ (not cut off excess pixels)
60
+ --resample which resampling filter to use for resizing
61
+ (see Pillow documentation)
55
62
 
56
63
  Python interface
57
64
  ----------------
@@ -34,6 +34,13 @@ Command line usage
34
34
  --vox add VOX tones at the beginning
35
35
  --fskid FSKID add FSKID at the end
36
36
  --chan CHAN number of channels (default: mono)
37
+ --resize resize the image to the correct size
38
+ --keep-aspect-ratio keep the original aspect ratio when resizing
39
+ (and cut off excess pixels)
40
+ --keep-aspect keep the original aspect ratio when resizing
41
+ (not cut off excess pixels)
42
+ --resample which resampling filter to use for resizing
43
+ (see Pillow documentation)
37
44
 
38
45
  Python interface
39
46
  ----------------
@@ -34,6 +34,8 @@ def main():
34
34
  help='resize the image to the correct size')
35
35
  parser.add_argument('--keep-aspect-ratio', dest='keep_aspect_ratio', action='store_true',
36
36
  help='keep the original aspect ratio when resizing (and cut off excess pixels)')
37
+ parser.add_argument('--keep-aspect', dest='keep_aspect', action='store_true',
38
+ help='keep the original aspect ratio when resizing (not cut off excess pixels)')
37
39
  parser.add_argument('--resample', dest='resample', default='lanczos',
38
40
  choices=('nearest', 'bicubic', 'lanczos'),
39
41
  help='which resampling filter to use for resizing (see Pillow documentation)')
@@ -42,14 +44,17 @@ def main():
42
44
  mode = module_map[args.mode]
43
45
  if args.resize and any(i != m for i, m in zip(image.size, (mode.WIDTH, mode.HEIGHT))):
44
46
  resample = getattr(Image, args.resample.upper())
45
- if args.keep_aspect_ratio:
47
+ if args.keep_aspect_ratio or args.keep_aspect:
46
48
  orig_ratio = image.width / image.height
47
49
  mode_ratio = mode.WIDTH / mode.HEIGHT
48
50
  crop = orig_ratio != mode_ratio
49
51
  else:
50
52
  crop = False
51
53
  if crop:
52
- if orig_ratio < mode_ratio:
54
+ t = orig_ratio < mode_ratio
55
+ if args.keep_aspect:
56
+ t = orig_ratio > mode_ratio
57
+ if t:
53
58
  w = mode.WIDTH
54
59
  h = int(w / orig_ratio)
55
60
  else:
@@ -59,6 +64,14 @@ def main():
59
64
  w = mode.WIDTH
60
65
  h = mode.HEIGHT
61
66
  image = image.resize((w, h), resample)
67
+ if args.keep_aspect:
68
+ newbg = Image.new('RGB', (mode.WIDTH, mode.HEIGHT))
69
+ if t:
70
+ newbg.paste(image, (0, int((mode.HEIGHT/2)-(h/2))))
71
+ else:
72
+ newbg.paste(image, (int((mode.WIDTH/2)-(w/2)), 0))
73
+ image = newbg.copy()
74
+ crop = False
62
75
  if crop:
63
76
  x = (image.width - mode.WIDTH) / 2
64
77
  y = (image.height - mode.HEIGHT) / 2
@@ -4,7 +4,7 @@ from setuptools import setup
4
4
 
5
5
  setup(
6
6
  name='PySSTV',
7
- version='0.5.5',
7
+ version='0.5.6',
8
8
  description='Python classes for generating Slow-scan Television transmissions',
9
9
  author=u'András Veres-Szentkirályi',
10
10
  author_email='vsza@vsza.hu',
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
File without changes
File without changes