Skip to content

koyashiro/PngChunkUtil

Repository files navigation

PngChunkUtil

Build and Test

PngChunkUtil

Convert PNG(byte[]) into chunks(Chunk[])

using System;
using System.IO;
using Koyashiro.PngChunkUtil;

byte[] png = File.ReadAllBytes("example.png");
Chunk[] chunks = PngReader.ReadBytes(png);

Convert chunks(Chunk[]) into PNG(byte[])

using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;

List<Chunk> chunks = PngReader.ReadBytes(File.ReadAllBytes("example.png")).ToList();
byte[] png = PngWriter.WriteBytes(CollectionsMarshal.AsSpan(chunks));

Example

ChunkReader

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages