Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
276 views
in Technique[技术] by (71.8m points)

.net - Using Chunks in a PNG

I'm looking for a way to get and set those oddball chunks in a PNG file, namely in my case, the 'zTXt' chunk. Is there anything built into the .Net framework, or any other known assembly, that provides access this data? I'd like to avoid having to write an entire PNG reader/writer for this purpose if it has already been done.

Thank you!

Progress update: After more searching, there appears to be nothing pre-made for what I want to accomplish. I'm attempting to read through the file myself now, but am having trouble with the compressed part of the data. I've asked another question for this particular issue here: How do you use a DeflateStream on part of a file?

Once I get this working, I'll post the code here as an answer myself. (Unless someone else beats me to it of course.)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The following should work: http://sourceforge.net/projects/pngnet/ Check it out using Subversion. It's a library for low-level access to png files and a small C# example.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...