Coder Social home page Coder Social logo

qoif-d's Introduction

QOIF-D

Implementation of the "Quite OK Image format" in D Language. The implementation is based off the QOIF specification and does not rely on the reference en-/decoder.

The goal of this library is to add a simple and easy-to-use way for encoding or decoding QOIF images that could be used in D

Usage

Decoding is done using the encode function:

auto originalImage = cast(ubyte[]) read("test_data/kodim10.qoi");
QoifImage decoded = decode(originalImage);

Encoding is done in a similar fashion:

auto imageData = [Pixel(255, 0, 0), Pixel(0, 255, 0), Pixel(0, 0, 255), Pixel(255, 255, 255)];
auto encodedImage = encode(image, 2, 2);

qoif-d's People

Contributors

morozov-5f avatar

Stargazers

Greg Sheppard avatar  avatar  avatar

Watchers

 avatar Greg Sheppard avatar  avatar

qoif-d's Issues

Add documentation to public API

Public API lacks any documentation - this should be added. As part of this task it makes sense to enhance the README - make it more detailed, provide instruction how to add the package to the project and how to build it.

Make sure the code is portable

There might be problems due to the way decoder accesses the memory. As it just performs the cast there might be some problems with endianess and bitfield layout. Need to confirm that this is not an issue and the code is portable.

@nogc suitable decode and encode

Need to make a @nogc versions of decode and encode functions that don't require memory allocation but rely on the externally provided buffer instead.

We also need some kind of convenience API that can parse the header only from the buffer so that the user can tell how much pixels to allocate.

Enhance the test suite

Would be good to enhance the test suite to verify formal specification requirements, such as

A valid encoder must not issue 2 or more consecutive QOI_OP_INDEX
chunks to the same index. QOI_OP_RUN should be used instead.

Need to review the spec and identify those corner cases and convert them to tests to make sure the encoder is behaving within the spec.

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.