apftool 0.4.0__tar.gz → 0.4.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: apftool
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Encoder and decoder for Aperture Science Image Format (apf), Aperture Science Image Format 2 (apf2), Wireless Bitmap (wbmp), and Over-The-Air Bitmap (otb)
5
5
  Author: Mari (kbity)
6
6
  Requires-Python: >=3.10
@@ -44,6 +44,24 @@ pngObject = apftool.decodeapf(apfString) # turns apf string object into image by
44
44
 
45
45
  `decodeotab(otab: bytes, format: str = 'PNG', returnImageObject: bool = False)` hi i have the same usage as decodewbmp but for .otb images
46
46
 
47
+ ### misc:
48
+
49
+ apftool provides many extensions tuples:
50
+
51
+ `extensions` - apf/apf2 extensions
52
+
53
+ `extensions_apf` - apf extensions
54
+
55
+ `extensions_apf2` - apf2 extensions
56
+
57
+ `extensions_wbmp` - wbmp extensions
58
+
59
+ `extensions_otab` - otb extensions
60
+
61
+ `extensions_txt` - txt extensions, useful for weeding out generic apf
62
+
63
+ `extensions_all` - all supported apftool extensions, useful for decodeany
64
+
47
65
  ## dependancies
48
66
 
49
67
  `PIL, io, textwrap, math` (apftool)
@@ -52,6 +70,10 @@ most of these a builtins but you may need to install PIL seperately
52
70
 
53
71
  ## changelog:
54
72
 
73
+ 0.4.1 - improve otb quality
74
+
75
+ 0.4.1 - improve readme.md, fix otb encoder skuing
76
+
55
77
  0.4.0 - add support for otb images, improve readme.md, and add decodeany to decode all suported formats automatically
56
78
 
57
79
  0.3.3 - make the af2 decoder more lenient
@@ -33,6 +33,24 @@ pngObject = apftool.decodeapf(apfString) # turns apf string object into image by
33
33
 
34
34
  `decodeotab(otab: bytes, format: str = 'PNG', returnImageObject: bool = False)` hi i have the same usage as decodewbmp but for .otb images
35
35
 
36
+ ### misc:
37
+
38
+ apftool provides many extensions tuples:
39
+
40
+ `extensions` - apf/apf2 extensions
41
+
42
+ `extensions_apf` - apf extensions
43
+
44
+ `extensions_apf2` - apf2 extensions
45
+
46
+ `extensions_wbmp` - wbmp extensions
47
+
48
+ `extensions_otab` - otb extensions
49
+
50
+ `extensions_txt` - txt extensions, useful for weeding out generic apf
51
+
52
+ `extensions_all` - all supported apftool extensions, useful for decodeany
53
+
36
54
  ## dependancies
37
55
 
38
56
  `PIL, io, textwrap, math` (apftool)
@@ -41,6 +59,10 @@ most of these a builtins but you may need to install PIL seperately
41
59
 
42
60
  ## changelog:
43
61
 
62
+ 0.4.1 - improve otb quality
63
+
64
+ 0.4.1 - improve readme.md, fix otb encoder skuing
65
+
44
66
  0.4.0 - add support for otb images, improve readme.md, and add decodeany to decode all suported formats automatically
45
67
 
46
68
  0.3.3 - make the af2 decoder more lenient
@@ -10,8 +10,8 @@ def bitstring_to_bytes(s):
10
10
  def encodeotab(img: Image, width=255, height=255):
11
11
  if width > 255 or height > 255:
12
12
  raise Exception("Invalid Resolution")
13
- img = img.convert("1")
14
13
  res = img.size
14
+ img = img.convert("1")
15
15
 
16
16
  # don't upscale
17
17
  if width > res[0]:
@@ -40,11 +40,10 @@ def encodeotab(img: Image, width=255, height=255):
40
40
  if len(collection) == 8:
41
41
  payload += bitstring_to_bytes(collection)
42
42
  collection = ""
43
- if cat == width:
44
- if collection:
45
- payload += bitstring_to_bytes(collection)
46
- collection = ""
47
- cat = 0
43
+ if collection:
44
+ payload += bitstring_to_bytes(collection)
45
+ collection = ""
46
+ cat = 0
48
47
 
49
48
  return payload
50
49
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apftool
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Encoder and decoder for Aperture Science Image Format (apf), Aperture Science Image Format 2 (apf2), Wireless Bitmap (wbmp), and Over-The-Air Bitmap (otb)
5
5
  Author: Mari (kbity)
6
6
  Requires-Python: >=3.10
@@ -44,6 +44,24 @@ pngObject = apftool.decodeapf(apfString) # turns apf string object into image by
44
44
 
45
45
  `decodeotab(otab: bytes, format: str = 'PNG', returnImageObject: bool = False)` hi i have the same usage as decodewbmp but for .otb images
46
46
 
47
+ ### misc:
48
+
49
+ apftool provides many extensions tuples:
50
+
51
+ `extensions` - apf/apf2 extensions
52
+
53
+ `extensions_apf` - apf extensions
54
+
55
+ `extensions_apf2` - apf2 extensions
56
+
57
+ `extensions_wbmp` - wbmp extensions
58
+
59
+ `extensions_otab` - otb extensions
60
+
61
+ `extensions_txt` - txt extensions, useful for weeding out generic apf
62
+
63
+ `extensions_all` - all supported apftool extensions, useful for decodeany
64
+
47
65
  ## dependancies
48
66
 
49
67
  `PIL, io, textwrap, math` (apftool)
@@ -52,6 +70,10 @@ most of these a builtins but you may need to install PIL seperately
52
70
 
53
71
  ## changelog:
54
72
 
73
+ 0.4.1 - improve otb quality
74
+
75
+ 0.4.1 - improve readme.md, fix otb encoder skuing
76
+
55
77
  0.4.0 - add support for otb images, improve readme.md, and add decodeany to decode all suported formats automatically
56
78
 
57
79
  0.3.3 - make the af2 decoder more lenient
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "apftool"
7
- version = "0.4.0"
7
+ version = "0.4.2"
8
8
  description = "Encoder and decoder for Aperture Science Image Format (apf), Aperture Science Image Format 2 (apf2), Wireless Bitmap (wbmp), and Over-The-Air Bitmap (otb)"
9
9
  authors = [{name = "Mari (kbity)"}]
10
10
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes