Skip to content

Instantly share code, notes, and snippets.

@mickael-kerjean
Created November 9, 2023 12:50
Show Gist options
  • Save mickael-kerjean/4338e837cf85fe3b2513f9223420c9a3 to your computer and use it in GitHub Desktop.
Save mickael-kerjean/4338e837cf85fe3b2513f9223420c9a3 to your computer and use it in GitHub Desktop.
bench thumbnail
#include <stdio.h>
#include "image_png.h"
// gcc -o main.bin main.c image_png.c -lwebp -lpng
int main(int argc, char **argv) {
FILE* input = fopen("/home/mickael/Downloads/tmp/test.png", "rb");
FILE* output = fopen("/home/mickael/Downloads/tmp/test_c.webp", "wb");
return png_to_webp(fileno(input), fileno(output), 250);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment