Coder Social home page Coder Social logo

openansible / lodepng-rust Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kornelski/lodepng-rust

0.0 2.0 0.0 1.27 MB

All-in-one PNG image encoder/decoder for Rust

Home Page: http://pornel.github.io/lodepng-rust/lodepng/

License: BSD 2-Clause "Simplified" License

Makefile 1.18% Rust 98.82%

lodepng-rust's Introduction

#LodePNG bindings for Rust

LodePNG is a stand-alone PNG image decoder and encoder (does not require zlib or libpng).

This package allows easy reading and writing of PNG files without any system dependencies.

The easiest way to use LodePNG is to simply include the lodepng crate. To do so, add this to your Cargo.toml:

[dependencies.lodepng]
git = "https://github.com/pornel/lodepng-rust.git"

To build the lodepng crate:

cargo build

It will produce liblodepng-โ€ฆ.rlib that you can import with extern crate lodepng.

API

See API documentation for details. The API mimics lodepng, so if something is unclear, see the original lodepng.h.

To load RGBA PNG file:

lodepng::decode32_file("in.png")

returns lodepng::Bitmap<lodepng::RGBA<u8>> with .width, .height, and .buffer.

To save RGBA PNG file:

lodepng::encode32_file("out.png", buffer.as_slice(), width, height)

lodepng-rust's People

Contributors

caspark avatar durka avatar kornelski avatar markoflark avatar nukep avatar porglezomp avatar ruuda avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.