apftool 1.2.3__tar.gz → 1.2.4__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: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: Encoder and decoder for Aperture Science Image Format (apf), Aperture Science Image Format 2 (apf2), Wireless Bitmap (wbmp), Over-The-Air Bitmap (otb), and FaceDev's .bruh format
5
5
  Author: Mari (kbity)
6
6
  Requires-Python: >=3.10
@@ -101,6 +101,8 @@ apftool provides many extensions tuples:
101
101
 
102
102
  ## changelog:
103
103
 
104
+ 1.2.4 - spec conformance [I swear I will release it soon], +1 bias for 95-level grayscale
105
+
104
106
  1.2.3 - add +1 bias for near-truecolor modes, reducing the darkening problem
105
107
 
106
108
  1.2.2 - add support for squeeze, improve handling for numpy/scipy not being installed. Signifigant performance improvement for Truecolor modes.
@@ -89,6 +89,8 @@ apftool provides many extensions tuples:
89
89
 
90
90
  ## changelog:
91
91
 
92
+ 1.2.4 - spec conformance [I swear I will release it soon], +1 bias for 95-level grayscale
93
+
92
94
  1.2.3 - add +1 bias for near-truecolor modes, reducing the darkening problem
93
95
 
94
96
  1.2.2 - add support for squeeze, improve handling for numpy/scipy not being installed. Signifigant performance improvement for Truecolor modes.
@@ -14,7 +14,7 @@ extensions_mqif = (".mqif", ".mqi")
14
14
 
15
15
  extensions_txt = (".txt", ".text") # txt is seen as a generic container for apf/apf2 because they're just txt files
16
16
 
17
- version = "1.2.3"
17
+ version = "1.2.4"
18
18
 
19
19
  extensions_all = []
20
20
  extensions_all.extend(extensions_apf+extensions_apf2+extensions_capf2+extensions_wbmp+extensions_otb+extensions_bruh+extensions_mqif)
@@ -339,6 +339,7 @@ def graypal(perfect: bool = False):
339
339
  for n in set(mapping):
340
340
  if not n in pal:
341
341
  pal[n] = (mapping_invert[n], mapping_invert[n], mapping_invert[n])
342
+ pal["~"] = (255, 255, 255)
342
343
  return pal
343
344
 
344
345
  def int_alpha_composit(l1: tuple, l2: tuple):
@@ -543,7 +544,7 @@ def decode(apf2: str | bytes, format: str = 'PNG', returnImageObject: bool = Fal
543
544
  if mode == 0:
544
545
  pals = apf_lines[2].split(".")
545
546
  if pals[0] == "":
546
- if transparency_mode:
547
+ if transparency_mode == 1:
547
548
  pals[0] = (0,0,0,0)
548
549
  else:
549
550
  pals[0] = (0,0,0)
@@ -914,7 +915,7 @@ def generate_runs_apf2_f(bitmap: list, lineskip: int, w: int, h: int, trans, com
914
915
  ind = chr(i1+32)+chr(i0+32)
915
916
  curpixval = ind
916
917
  else:
917
- v, _ = uint8_to_base95_with_corrector(pixtup)
918
+ v, _ = uint8_to_base95_with_corrector(pixtup+1) # +1 bias
918
919
  curpixval = v
919
920
 
920
921
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apftool
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: Encoder and decoder for Aperture Science Image Format (apf), Aperture Science Image Format 2 (apf2), Wireless Bitmap (wbmp), Over-The-Air Bitmap (otb), and FaceDev's .bruh format
5
5
  Author: Mari (kbity)
6
6
  Requires-Python: >=3.10
@@ -101,6 +101,8 @@ apftool provides many extensions tuples:
101
101
 
102
102
  ## changelog:
103
103
 
104
+ 1.2.4 - spec conformance [I swear I will release it soon], +1 bias for 95-level grayscale
105
+
104
106
  1.2.3 - add +1 bias for near-truecolor modes, reducing the darkening problem
105
107
 
106
108
  1.2.2 - add support for squeeze, improve handling for numpy/scipy not being installed. Signifigant performance improvement for Truecolor modes.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "apftool"
7
- version = "1.2.3"
7
+ version = "1.2.4"
8
8
  description = "Encoder and decoder for Aperture Science Image Format (apf), Aperture Science Image Format 2 (apf2), Wireless Bitmap (wbmp), Over-The-Air Bitmap (otb), and FaceDev's .bruh format"
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
File without changes
File without changes
File without changes
File without changes
File without changes