Tested a85 encoding
This commit is contained in:
@@ -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'))
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user