Git Product home page Git Product logo

canvas's Introduction

Canvas docs.rs: image-canvas Build Status

An allocated buffer suitable for image data. Compared to a Vec of all samples, it restricts the possible data types but on the other hand focusses on a more efficient interface to casting the data or rearranging the contents.

Why

After some discussion it was concluded that there is likely no safe way to reinterpret the allocation of a Vec<T> for a different Vec<U>, except in a very restricted set of cases. This includes grouping samples in logic pixel structs, even if those are annotated #[repr(C)] or alike. This is hardly the fault of Vec<_>, as images and the necessary transmutations of the representative binary data are far from general but Vec must be.

Not

This library is not yet ready for use, and mostly a reservation in crates.io for future use within the image-rs organization managing the image crate.

It is also not intended to provide nd-algebra or other matrix style operations. This firstly keeps the implementation complexity low, allows other implementation details, and separates concerns. If you nevertheless find it useful for such purposes, rest assured that we find this incredibly cool even though we may not accept PRs to introduce additional complexity motivated solely by such use. Rather, use the code and free license to shape it to those other needs.

Todo

  • Use alignment for SIMD iteration/transmutation/map-operation
  • Ensure core::mem::needs_drop is false to provide better semantics for values.

canvas's People

Contributors

atul9 avatar heroickatora avatar johntitor 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.