Crate pngv

Crate pngv 

Source
Expand description

§pngv

A library for converting PNG images to color matrices and reconstructing them as PNG or SVG files with 1x1 pixel vectors.

§Features

  • Encode: Convert PNG images to JSON color matrices (.pngv format)
  • Decode: Reconstruct PNG images from .pngv files
  • SVG Export: Generate SVG files with 1x1 vector pixels from .pngv files

§Example

use pngv::{encode_to_pngv, decode_from_pngv, decode_to_svg};

// Encode a PNG to .pngv format
encode_to_pngv("image.png", "image.pngv").unwrap();

// Decode back to PNG
decode_from_pngv("image.pngv", "output.png").unwrap();

// Export to SVG
decode_to_svg("image.pngv", "output.svg").unwrap();

Functions§

decode_from_pngv
Decodes a .pngv file and reconstructs it as a PNG image
decode_to_svg
Decodes a .pngv file and generates an SVG with 1x1 vector pixels
encode_to_pngv
Encodes a PNG image to a .pngv color matrix file