Tested a85 encoding

This commit is contained in:
Kenwood 2021-07-15 10:47:57 -04:00
parent 6106c46bd8
commit 151853b1d3
9 changed files with 15 additions and 0 deletions

View File

@ -1,4 +1,5 @@
from PIL import Image
import base64
im = Image.open('still.jpg')
@ -7,3 +8,9 @@ for i in range(8, 0, -1):
out = im.convert('P', palette=Image.ADAPTIVE, colors=i)
out.save(f'out_{i}_bits.png')
with open(f'out_{i}_bits.png', 'rb') as image_file:
encoded_string = base64.a85encode(image_file.read())
with open(f'out_{i}_bits.txt', 'w') as f:
f.write(encoded_string.decode('UTF-8'))

View File

@ -0,0 +1 @@
M,6r;%14!\!!!!.8Ou6I!!!)I!!!&X#Qk&,!4s2MScA`m!)Q?g7DXb@zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz!$+G>p](9o%V8a6Akbu".KBGK#QOi)zdSl>0!!-\'6pXdsSF+-I!<<*"_P$QtD$r"izzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz!!!"D(e?.W!V_LqE<#t=!(fUS7'8jaJc

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long