File: test.cpp

package info (click to toggle)
libspng 0.7.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,532 kB
  • sloc: ansic: 7,896; sh: 39; makefile: 22; cpp: 14
file content (19 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <spng.h>
#include <iostream>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    unsigned char buf[30] = {0};
    spng_ctx *ctx = spng_ctx_new(0);

    spng_set_png_buffer(ctx, buf, 30);

    struct spng_plte plte;
    int e = spng_get_plte(ctx, &plte);
    std::cout << spng_strerror(e);

    spng_ctx_free(ctx);

    return 0;
}