Code Monkey home page Code Monkey logo

fluid's Introduction

Overview

FLUID (Fast Lightweight Universal Image Decoder) is a very lightweight and easy to integrate (single file) universal image decoder.

Supported image formats:

  • PNG (All visible chunks except gamma, support interlaced)
  • JPEG (JFIF/Baseline, no progressive JPEG)
  • PSD (Raw RGB only)

Currently fluid is perfect for game developments. Support for other popular formats are planned and will be done when I get time (and request).

Usage

/*
 * fluid_decode: Decode an image
 * @data: [in] The image data
 * @size: [in] Size of the data in bytes
 * @width: [out] Width of the image in pixels
 * @height: [out] Height of the image in pixels
 * Return: Raw RGBA data, or NULL if failed
 */
char *fluid_decode(const char *data, int size, int *width, int *height);

Install

Integrating fluid to your project is very simple. You just grab fluid.c and fluid.h to anywhere in your project, add it to the build system, and you're done.

Viewer

The project contains a basic image viewer based on fluid. It is used to test the functionality during development and placed here for your interest. To build and run it, use the supplied Visual Studio project.

License

I decided to place fluid in the public domain. So you can do whatever you want with it, without concerning about licensing.

Contribution

As I want to keep fluid a public domain project, every contributor must agree this. As the method used in SQLite copyright notice, any new contributions must be accompanied with the following statements:

The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this code under copyright law.

If you don't do this your contribution won't be merged. Plus if you make changes as an employee, due to the complexity mentioned in the above document I won't accept any contributions.

However, bug reports and reasonsable feature requests are highly appreciated, as usual.

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.