Skip to content

kroct/image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

a C wrapper library to load image files

Example

#define IMAGE_IMP
#include "image/image.h"
#include <stdio.h>

int
main(void) {
    Image *img = load_image("cats.png");
    if(!img)
        return 1;
    printf("width: %d\n", img->w);
    printf("height: %d\n", img->h);
    printf("first pixels RGB value is: %06x\n", img->bitmap[0] & img->bitmap[1] << 8 & img->bitmap[2] << 16);
    return 0;
}

link with

cc main.c -lpng -lwebp -lturbojpeg

dependencies:

  • libpng
  • libwebp
  • libturbojpeg

About

C wrapper library around libpng, libjpeg-turbo, libwebp, qoi

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages