Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

can add a example to the project docs that how to insert a text chunk into a png image? #85

Open
cfh0081 opened this issue Nov 17, 2018 · 1 comment
Assignees

Comments

@cfh0081
Copy link

cfh0081 commented Nov 17, 2018

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

@lugui2009
Copy link

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'

someone can help me how to solve it .Thank you

@drj11 drj11 self-assigned this Dec 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants