You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.
when excuting that example , png.write_chunks( ) function encountered an error when using python 3
File "pyChunk_v1.py", line 59, in main
png.write_chunks(dst_file,chunk_list)
File "/usr/local/lib/python3.5/dist-packages/png.py", line 979, in write_chunks
write_chunk(out, *chunk)
File "/usr/local/lib/python3.5/dist-packages/png.py", line 966, in write_chunk
outfile.write(tag)
TypeError: a bytes-like object is required, not 'str'
I wanted to insert a text chunk into a png image, but i did't find the code example, so i wrote one. I hope the author of pypng can add this example to the project docs, so other people in need can be more conveniently obtained it. The example link is below(the part answered by cfh008):
https://stackoverflow.com/questions/9036152/insert-a-text-chunk-into-a-png-image/51058689?noredirect=1#comment93319814_51058689
The text was updated successfully, but these errors were encountered: