Skip to content

RobLoach/rimage

Repository files navigation

rimage

rimage provides basic image functions for loading and manipulating basic 2D bitmap data, forked from raylib's textures module.

Usage

#define SUPPORT_FILEFORMAT_PNG
#define RIMAGE_IMPLEMENTATION
#include "rimage.h"

int main() {
    Image image = LoadImage("cat.png");

    ImageDrawCircle(&image, 30, 10, 30, SKYBLUE);
    ImageDrawRectangle(&image, 100, 100, 100, 140, GREEN);
    ImageDrawLine(&image, 50, 50, 200, 80, ORANGE);
    ImageDrawRectangle(&image, 20, 150, 50, 80, RED);

    ExportImage(image, "out.png");

    UnloadImage(image);

    return 0;
}

Why Fork?

It would be great to be able to use the Image API within raylib without requiring a hard fork. See the discussion about it to see how you could help out.

License

rimage is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check LICENSE for further details.

raylib uses internally some libraries for window/graphics/inputs management and also to support different file formats loading, all those libraries are embedded with and are available in src/external directory. Check raylib dependencies LICENSES on raylib Wiki for details.

About

Use raylib's Image module by itself.

Topics

Resources

License

Stars

Watchers

Forks