libspng is a C library for reading and writing PNG format files with a focus on security and ease of use.

Overview

Gitter Financial Contributors on Open Collective GitLab CI Fuzzing Status Coverity coverage tag

libspng

libspng (simple png) is a C library for reading and writing Portable Network Graphics (PNG) format files with a focus on security and ease of use.

libspng is an alternative to libpng, the projects are separate and the APIs are not compatible.

Motivation

The goal is to provide a fast PNG library with a simpler API than libpng, it outperforms the reference implementation in common use cases.

Performance

Features

Feature spng libpng stb_image lodepng
Decode from stream
Gamma correction
No known security bugs[1]
Progressive image read
Parses all standard chunks
Doesn't require zlib[2]
Encoding
Animated PNG Planned [3]

[1] The project is fuzz tested on OSS-Fuzz and vulnerabilities are fixed before they become public.

[2] Building with miniz is supported.

[3] With a 3rd party patch

Getting spng

Download the latest release and include spng.c/spng.h in your project, you can also build with CMake or Meson, refer to the documentation for details.

Usage

#include <spng.h>

/* Create a decoder context */
spng_ctx *ctx = spng_ctx_new(0);

/* Set an input buffer */
spng_set_png_buffer(ctx, buf, buf_size);

/* Determine output image size */
spng_decoded_image_size(ctx, SPNG_FMT_RGBA8, &out_size);

/* Decode to 8-bit RGBA */
spng_decode_image(ctx, out, out_size, SPNG_FMT_RGBA8, 0);

/* Free context memory */
spng_ctx_free(ctx);


/* Creating an encoder context requires a flag */
spng_ctx *enc = spng_ctx_new(SPNG_CTX_ENCODER);

/* Encode to internal buffer managed by the library */
spng_set_option(enc, SPNG_ENCODE_TO_BUFFER, 1);

/* Specify image dimensions, PNG format */
struct spng_ihdr ihdr =
{
    .height = height,
    .width = width,
    .bit_depth = 8,
    .color_type = SPNG_COLOR_TYPE_TRUECOLOR_ALPHA
};

/* Image will be encoded according to ihdr.color_type, .bit_depth */
spng_set_ihdr(enc, &ihdr);

/* SPNG_FMT_PNG is a special value that matches the format in ihdr,
   SPNG_ENCODE_FINALIZE will finalize the PNG with the end-of-file marker */
spng_encode_image(enc, image, image_size, SPNG_FMT_PNG, SPNG_ENCODE_FINALIZE);

/* PNG is written to an internal buffer by default */
void *png = spng_get_png_buffer(enc, &png_size, &error);

/* User owns the buffer after a successful call */
free(png);

/* Free context memory */
spng_ctx_free(enc);

See example.c.

License

Code is licensed under the BSD 2-clause "Simplified" License.

The project contains optimizations and test images from libpng, these are licensed under the PNG Reference Library License version 2.

Security & Testing

Code is written according to the rules of the CERT C Coding Standard. All integer arithmetic is checked for overflow and all error conditions are handled gracefully.

The library is continuously fuzzed by OSS-Fuzz, code is also scanned with Clang Static Analyzer, Coverity Scan and PVS-Studio.

The test suite consists of over 1000 test cases, 175 test images are decoded with all possible output format and flag combinations and compared against libpng for correctness.

Versioning

Releases follow the semantic versioning scheme with additional guarantees:

  • Releases from 0.4.0 to 0.8.x are stable
  • If 1.0.0 will introduce breaking changes then 0.8.x will be maintained as a separate stable branch

Currently 1.0.0 is planned to be compatible.

Documentation

Online documentation is available at libspng.org/docs.

Known Issues

  • Decoding to SPNG_FMT_G8, SPNG_FMT_GA8 and SPNG_FMT_GA16 output formats is not supported for all PNG color type and bit depth combinations, see documentation for details.
  • Gamma correction is not implemented for SPNG_FMT_PNG, SPNG_FMT_G8, SPNG_FMT_GA8 and SPNG_FMT_GA16 output formats.

Supporting spng

You can sponsor development through OpenCollective, funds will be used for maintenance and further development according to the roadmap.

OpenCollective backers

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Comments
  • Implement read format SPNG_FMT_RAW

    Implement read format SPNG_FMT_RAW

    Read the data "as is" from disk after decompression and deinterlacing. In this form when the pixel size is less than 8 bits rows will be byte-packed and multiple values will exist inside a single byte. 16bit data will be left in big endian format.

    This output format will be compatible with the "zerocopy" flag for non-interlaced images when it is implemented.

    Future work could include adding a flag that will retain the "on disk" format but upscale 1, 2 and 4 bits data to 8 bits and byte swap 16bit data if needed for ease of use (name TBD).

    TODO:

    • [x] Implement initial code support
    • [x] Update testsuite code
    • [x] Update docs

    Fixes #24

    enhancement API 
    opened by stadelmanma 21
  • Unexpected result in libopenui

    Unexpected result in libopenui

    libspng allows progressive load of png files. I have tried to replace stb_image by libspng. It works very well, malloc are far less big (we use RGB565 or ARGB4444 internally).

    The only issue is the speed, it's around 2 times slower than stb_image!

    Any idea why it is slower? Perhaps files are read in smaller chunks?

    Link to the commit (unfinished): https://github.com/opentx/libopenui/commit/942e67525d5e0495d876eae4f248864679d6953f

    question performance 
    opened by bsongis 8
  • Unindexing indexed pngs

    Unindexing indexed pngs

    There is no example for unindexing images, is there a preimplemented function I didn't see?

    I found that to obtain the color map I should do:

    	struct spng_plte color_map;
    	spng_get_plte(ctx, &color_map);
    

    But how do I know the size of each channel and the amount of channels? There is such info in spng_plte.

    opened by EmmanuelMess 7
  • New image format - PNG / RAW

    New image format - PNG / RAW

    PNG

    SPNG_FMT_PNG would match the context's PNG image format in host-endian, 16-bit RGBA/GRAY images are converted to host endianness when decoding, indexed color images are unmodified palette indices, even if they're 1/2/4-bit, the same applies for >8-bit grayscale images.

    Indexed color images could be handled multiple ways:

    1. output the palette indices, TRNS, GAMMA could be applied to a user-supplied palette

    Other options which would break the simplicity of calculating the output image size based on just the format and dimensions: 2. expand to 8-bit RGB, only GAMMA has an effect and the transparency value becomes useless 3. default to palette indices, add a separate function to override the format 4. expand to 8-bit RGB, gamma correction would work and the TRNS flag would expand it to RGBA, this changes the output format with a flag and would only expand to 8-bit

    Gamma correction (SPNG_DECODE_GAMMA) is supported with this format.

    RAW

    SPNG_FMT_RAW is the big-endian version of SPNG_FMT_PNG.

    Gamma correction is not supported with this format.

    Progress:

    • [x] SPNG_FMT_RAW
    • [x] SPNG_FMT_PNG
    enhancement API 
    opened by randy408 7
  • munmap_chunk(): invalid pointer with

    munmap_chunk(): invalid pointer with "paletted" PNG on arm64

    When trying to decode a "paletted" PNG on arm64 it aborts with munmap_chunk(): invalid pointer

    using the example binary from the compilation

    bash-4.2# ./example foo.png
    width: 68
    height: 68
    bit depth: 8
    color type: 3 - indexed color
    compression method: 0
    filter method: 0
    interlace method: 0
    palette entries: 256
    munmap_chunk(): invalid pointer
    Aborted
    

    It happens with 0.7.0 and latest master. It works with 0.6.3

    Example Image: Example Image

    Reporting this on the proper project, initially reported here https://github.com/libvips/libvips/issues/2549

    bug confirmed 
    opened by chregu 6
  • Red and Blue bytes swapped

    Red and Blue bytes swapped

    I've noticed that when viewing images, red and blue are swapped. An example image was taken from wikipedia (test_image.png). It is a single red pixel.

    When I decode the image with libspng, the first 3 bytes are if FF 00 00 when I expected them to be flipped to 00 00 FF. The difference obviously being a blue dot vs a red dot. And for comparison, imlib2/libpng has the expected value.

    I'm decoding via spng_decode_image(ctx, image, size, SPNG_FMT_RGBA8, 0)

    Wondering if I'm using the library wrong or if this is expected behavior.

    opened by TAAPArthur 6
  • Tests error on s390x: invalid gamma correction

    Tests error on s390x: invalid gamma correction

    Some tests issues specifically happening on s390x:

    + /usr/bin/meson test -C s390x-redhat-linux-gnu --num-processes 4 --print-errorlogs
    ninja: Entering directory `/builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu'
    ninja: no work to do.
      1/203 info                                    OK       0.03 s 
      2/203 cpp_test                                OK       0.01 s 
      3/203 basi0g01                                OK       0.03 s 
      4/203 basi0g02                                OK       0.03 s 
      5/203 basi0g04                                OK       0.02 s 
      6/203 basi0g08                                OK       0.02 s 
      7/203 basi0g16                                EXPECTEDFAIL 0.01 s 
      8/203 basi2c08                                OK       0.01 s 
      9/203 basi2c16                                FAIL     0.01 s (exit status 1)
     10/203 basi3p01                                OK       0.01 s 
     11/203 basi3p02                                OK       0.02 s 
     12/203 basi3p04                                OK       0.02 s 
     13/203 basi3p08                                OK       0.02 s 
     14/203 basi4a08                                OK       0.01 s 
     15/203 basi4a16                                FAIL     0.02 s (exit status 1)
     16/203 basi6a08                                OK       0.01 s 
     17/203 basi6a16                                FAIL     0.02 s (exit status 1)
     18/203 basn0g01                                OK       0.01 s 
     19/203 basn0g02                                OK       0.01 s 
     20/203 basn0g04                                OK       0.01 s 
     21/203 basn0g08                                OK       0.01 s 
     22/203 basn0g16                                EXPECTEDFAIL 0.02 s 
     23/203 basn2c08                                OK       0.01 s 
     24/203 basn2c16                                FAIL     0.01 s (exit status 1)
     25/203 basn3p01                                OK       0.01 s 
     26/203 basn3p02                                OK       0.01 s 
     27/203 basn3p04                                OK       0.02 s 
     28/203 basn3p08                                OK       0.01 s 
     29/203 basn4a08                                OK       0.02 s 
     30/203 basn4a16                                FAIL     0.02 s (exit status 1)
     31/203 basn6a08                                OK       0.01 s 
     32/203 basn6a16                                FAIL     0.03 s (exit status 1)
     33/203 bgai4a08                                OK       0.01 s 
     34/203 bgai4a16                                FAIL     0.01 s (exit status 1)
     35/203 bgan6a08                                OK       0.01 s 
     36/203 bgan6a16                                FAIL     0.02 s (exit status 1)
     37/203 bgbn4a08                                OK       0.01 s 
     38/203 bggn4a16                                FAIL     0.01 s (exit status 1)
     39/203 bgwn6a08                                OK       0.02 s 
     40/203 bgyn6a16                                FAIL     0.02 s (exit status 1)
     41/203 ccwn2c08                                OK       0.02 s 
     42/203 ccwn3p08                                OK       0.02 s 
     43/203 cdfn2c08                                OK       0.01 s 
     44/203 cdhn2c08                                OK       0.02 s 
     45/203 cdsn2c08                                OK       0.01 s 
     46/203 cdun2c08                                OK       0.01 s 
     47/203 ch1n3p04                                OK       0.01 s 
     48/203 ch2n3p08                                OK       0.02 s 
     49/203 cm0n0g04                                OK       0.01 s 
     50/203 cm7n0g04                                OK       0.01 s 
     51/203 cm9n0g04                                OK       0.01 s 
     52/203 cs3n2c16                                FAIL     0.01 s (exit status 1)
     53/203 cs3n3p08                                OK       0.01 s 
     54/203 cs5n2c08                                OK       0.01 s 
     55/203 cs5n3p08                                OK       0.01 s 
     56/203 cs8n2c08                                OK       0.01 s 
     57/203 cs8n3p08                                OK       0.02 s 
     58/203 ct0n0g04                                OK       0.01 s 
     59/203 ct1n0g04                                OK       0.01 s 
     60/203 cten0g04                                OK       0.01 s 
     61/203 ctfn0g04                                OK       0.01 s 
     62/203 ctgn0g04                                OK       0.01 s 
     63/203 cthn0g04                                OK       0.02 s 
     64/203 ctjn0g04                                OK       0.02 s 
     65/203 ctzn0g04                                OK       0.01 s 
     66/203 exif2c08                                OK       0.01 s 
     67/203 f00n0g08                                OK       0.01 s 
     68/203 f00n2c08                                OK       0.01 s 
     69/203 f01n0g08                                OK       0.01 s 
     70/203 f01n2c08                                OK       0.01 s 
     71/203 f02n0g08                                OK       0.01 s 
     72/203 f02n2c08                                OK       0.01 s 
     73/203 f03n0g08                                OK       0.01 s 
     74/203 f03n2c08                                OK       0.01 s 
     75/203 f04n0g08                                OK       0.01 s 
     76/203 f04n2c08                                OK       0.01 s 
     77/203 f99n0g04                                OK       0.01 s 
     78/203 g03n0g16                                FAIL     0.01 s (exit status 1)
     79/203 g03n2c08                                OK       0.02 s 
     80/203 g03n3p04                                OK       0.01 s 
     81/203 g04n0g16                                OK       0.01 s 
     82/203 g04n2c08                                OK       0.02 s 
     83/203 g04n3p04                                OK       0.01 s 
     84/203 g05n0g16                                FAIL     0.02 s (exit status 1)
     85/203 g05n2c08                                OK       0.01 s 
     86/203 g05n3p04                                OK       0.01 s 
     87/203 g07n0g16                                FAIL     0.02 s (exit status 1)
     88/203 g07n2c08                                OK       0.01 s 
     89/203 g07n3p04                                OK       0.01 s 
     90/203 g10n0g16                                FAIL     0.02 s (exit status 1)
     91/203 g10n2c08                                OK       0.01 s 
     92/203 g10n3p04                                OK       0.01 s 
     93/203 g25n0g16                                FAIL     0.01 s (exit status 1)
     94/203 g25n2c08                                OK       0.01 s 
     95/203 g25n3p04                                OK       0.01 s 
     96/203 oi1n0g16                                EXPECTEDFAIL 0.01 s 
     97/203 oi1n2c16                                FAIL     0.02 s (exit status 1)
     98/203 oi2n0g16                                EXPECTEDFAIL 0.01 s 
     99/203 oi2n2c16                                FAIL     0.02 s (exit status 1)
    100/203 oi4n0g16                                EXPECTEDFAIL 0.02 s 
    101/203 oi4n2c16                                FAIL     0.02 s (exit status 1)
    102/203 oi9n0g16                                EXPECTEDFAIL 0.02 s 
    103/203 oi9n2c16                                FAIL     0.02 s (exit status 1)
    104/203 pp0n2c16                                FAIL     0.02 s (exit status 1)
    105/203 pp0n6a08                                OK       0.01 s 
    106/203 ps1n0g08                                OK       0.01 s 
    107/203 ps1n2c16                                FAIL     0.02 s (exit status 1)
    108/203 ps2n0g08                                OK       0.02 s 
    109/203 ps2n2c16                                FAIL     0.02 s (exit status 1)
    110/203 s01i3p01                                OK       0.01 s 
    111/203 s01n3p01                                OK       0.02 s 
    112/203 s02i3p01                                OK       0.02 s 
    113/203 s02n3p01                                OK       0.02 s 
    114/203 s03i3p01                                OK       0.01 s 
    115/203 s03n3p01                                OK       0.01 s 
    116/203 s04i3p01                                OK       0.02 s 
    117/203 s04n3p01                                OK       0.01 s 
    118/203 s05i3p02                                OK       0.02 s 
    119/203 s05n3p02                                OK       0.01 s 
    120/203 s06i3p02                                OK       0.01 s 
    121/203 s06n3p02                                OK       0.01 s 
    122/203 s07i3p02                                OK       0.01 s 
    123/203 s07n3p02                                OK       0.02 s 
    124/203 s08i3p02                                OK       0.02 s 
    125/203 s08n3p02                                OK       0.01 s 
    126/203 s09i3p02                                OK       0.01 s 
    127/203 s09n3p02                                OK       0.01 s 
    128/203 s32i3p04                                OK       0.02 s 
    129/203 s32n3p04                                OK       0.02 s 
    130/203 s33i3p04                                OK       0.01 s 
    131/203 s33n3p04                                OK       0.02 s 
    132/203 s34i3p04                                OK       0.01 s 
    133/203 s34n3p04                                OK       0.01 s 
    134/203 s35i3p04                                OK       0.01 s 
    135/203 s35n3p04                                OK       0.02 s 
    136/203 s36i3p04                                OK       0.01 s 
    137/203 s36n3p04                                OK       0.01 s 
    138/203 s37i3p04                                OK       0.01 s 
    139/203 s37n3p04                                OK       0.01 s 
    140/203 s38i3p04                                OK       0.01 s 
    141/203 s38n3p04                                OK       0.01 s 
    142/203 s39i3p04                                OK       0.02 s 
    143/203 s39n3p04                                OK       0.02 s 
    144/203 s40i3p04                                OK       0.01 s 
    145/203 s40n3p04                                OK       0.01 s 
    146/203 tbbn0g04                                OK       0.02 s 
    147/203 tbbn2c16                                FAIL     0.01 s (exit status 1)
    148/203 tbbn3p08                                FAIL     0.01 s (exit status 1)
    149/203 tbgn2c16                                FAIL     0.02 s (exit status 1)
    150/203 tbgn3p08                                FAIL     0.01 s (exit status 1)
    151/203 tbrn2c08                                OK       0.01 s 
    152/203 tbwn0g16                                FAIL     0.02 s (exit status 1)
    153/203 tbwn3p08                                OK       0.01 s 
    154/203 tbyn3p08                                FAIL     0.01 s (exit status 1)
    155/203 tm3n3p02                                OK       0.01 s 
    156/203 tp0n0g08                                OK       0.02 s 
    157/203 tp0n2c08                                OK       0.01 s 
    158/203 tp0n3p08                                OK       0.02 s 
    159/203 tp1n3p08                                OK       0.02 s 
    160/203 xc1n0g08                                EXPECTEDFAIL 0.01 s 
    161/203 xc9n2c08                                EXPECTEDFAIL 0.01 s 
    162/203 xcrn0g04                                EXPECTEDFAIL 0.01 s 
    163/203 xcsn0g01                                EXPECTEDFAIL 0.01 s 
    164/203 xd0n2c08                                EXPECTEDFAIL 0.01 s 
    165/203 xd3n2c08                                EXPECTEDFAIL 0.01 s 
    166/203 xd9n2c08                                EXPECTEDFAIL 0.01 s 
    167/203 xdtn0g01                                EXPECTEDFAIL 0.01 s 
    168/203 xhdn0g08                                EXPECTEDFAIL 0.01 s 
    169/203 xlfn0g04                                EXPECTEDFAIL 0.01 s 
    170/203 xs1n0g01                                EXPECTEDFAIL 0.01 s 
    171/203 xs2n0g01                                EXPECTEDFAIL 0.01 s 
    172/203 xs4n0g01                                EXPECTEDFAIL 0.01 s 
    173/203 xs7n0g01                                EXPECTEDFAIL 0.02 s 
    174/203 z00n2c08                                OK       0.01 s 
    175/203 z03n2c08                                OK       0.01 s 
    176/203 z06n2c08                                OK       0.02 s 
    177/203 z09n2c08                                OK       0.01 s 
    178/203 badadler                                EXPECTEDFAIL 0.02 s 
    179/203 badcrc                                  EXPECTEDFAIL 0.01 s 
    180/203 bad_iccp                                EXPECTEDFAIL 0.01 s 
    181/203 empty_ancillary                         EXPECTEDFAIL 0.01 s 
    182/203 huge_bkgd                               EXPECTEDFAIL 0.01 s 
    183/203 huge_chrm                               EXPECTEDFAIL 0.01 s 
    184/203 huge_exif                               EXPECTEDFAIL 0.01 s 
    185/203 huge_gama                               EXPECTEDFAIL 0.02 s 
    186/203 huge_hist                               EXPECTEDFAIL 0.01 s 
    187/203 huge_iccp                               EXPECTEDFAIL 0.01 s 
    188/203 huge_idat                               EXPECTEDFAIL 0.01 s 
    189/203 huge_itxt                               EXPECTEDFAIL 0.01 s 
    190/203 huge_junk_safe_to_copy                  EXPECTEDFAIL 0.01 s 
    191/203 huge_junk_unsafe_to_copy                EXPECTEDFAIL 0.01 s 
    192/203 huge_pcal                               EXPECTEDFAIL 0.01 s 
    193/203 huge_phys                               EXPECTEDFAIL 0.01 s 
    194/203 huge_scal                               EXPECTEDFAIL 0.01 s 
    195/203 huge_splt                               EXPECTEDFAIL 0.02 s 
    196/203 huge_srgb                               EXPECTEDFAIL 0.01 s 
    197/203 huge_ster                               EXPECTEDFAIL 0.02 s 
    198/203 huge_text                               EXPECTEDFAIL 0.01 s 
    199/203 huge_time                               EXPECTEDFAIL 0.01 s 
    200/203 huge_ztxt                               EXPECTEDFAIL 0.01 s 
    201/203 zero_width                              EXPECTEDFAIL 0.01 s 
    202/203 zero_gama                               EXPECTEDFAIL 0.01 s 
    203/203 invalid_gray_alpha_sbit                 EXPECTEDFAIL 0.01 s 
    Ok:                  128
    Expected Fail:        46
    Fail:                 29
    Unexpected Pass:       0
    Skipped:               0
    Timeout:               0
    The output from 10 first failed tests:
      9/203 basi2c16                                FAIL     0.01 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/basi2c16.png
    --- Listing only the last 100 lines from a long log. ---
    invalid gamma correction at x: 28 y:28, spng: 22670 22670 59430 png: 36440 36440 9960
    invalid gamma correction at x: 29 y:28, spng: 18854 22670 60499 png: 42569 36440 21484
    invalid gamma correction at x: 30 y:28, spng: 13758 22670 61546 png: 48949 36440 27376
    invalid gamma correction at x: 31 y:28, spng: 0 22670 62572 png: 0 36440 27892
    invalid gamma correction at x: 0 y:29, spng: 65535 18854 0 png: 65535 42569 0
    invalid gamma correction at x: 1 y:29, spng: 64565 18854 0 png: 13820 42569 0
    invalid gamma correction at x: 2 y:29, spng: 63578 18854 0 png: 23288 42569 0
    invalid gamma correction at x: 3 y:29, spng: 62572 18854 13758 png: 27892 42569 48949
    invalid gamma correction at x: 4 y:29, spng: 61546 18854 18854 png: 27376 42569 42569
    invalid gamma correction at x: 5 y:29, spng: 60499 18854 22670 png: 21484 42569 36440
    invalid gamma correction at x: 6 y:29, spng: 59430 18854 25837 png: 9960 42569 60772
    invalid gamma correction at x: 7 y:29, spng: 58337 18854 28595 png: 58083 42569 45935
    invalid gamma correction at x: 8 y:29, spng: 57220 18854 31065 png: 34015 42569 23161
    invalid gamma correction at x: 9 y:29, spng: 56075 18854 33320 png: 3291 42569 10370
    invalid gamma correction at x: 10 y:29, spng: 54902 18854 35405 png: 30422 42569 20106
    invalid gamma correction at x: 11 y:29, spng: 53698 18854 37352 png: 49873 42569 59793
    invalid gamma correction at x: 12 y:29, spng: 52460 18854 39185 png: 60876 42569 4505
    invalid gamma correction at x: 13 y:29, spng: 51187 18854 40920 png: 62407 42569 55455
    invalid gamma correction at x: 14 y:29, spng: 49874 18854 42571 png: 53954 42569 19366
    invalid gamma correction at x: 15 y:29, spng: 48518 18854 44148 png: 34749 42569 29868
    invalid gamma correction at x: 16 y:29, spng: 47115 18854 45661 png: 3256 42569 23986
    invalid gamma correction at x: 17 y:29, spng: 45661 18854 47115 png: 23986 42569 3256
    invalid gamma correction at x: 18 y:29, spng: 44148 18854 48518 png: 29868 42569 34749
    invalid gamma correction at x: 19 y:29, spng: 42571 18854 49874 png: 19366 42569 53954
    invalid gamma correction at x: 20 y:29, spng: 40920 18854 51187 png: 55455 42569 62407
    invalid gamma correction at x: 21 y:29, spng: 39185 18854 52460 png: 4505 42569 60876
    invalid gamma correction at x: 22 y:29, spng: 37352 18854 53698 png: 59793 42569 49873
    invalid gamma correction at x: 23 y:29, spng: 35405 18854 54902 png: 20106 42569 30422
    invalid gamma correction at x: 24 y:29, spng: 33320 18854 56075 png: 10370 42569 3291
    invalid gamma correction at x: 25 y:29, spng: 31065 18854 57220 png: 23161 42569 34015
    invalid gamma correction at x: 26 y:29, spng: 28595 18854 58337 png: 45935 42569 58083
    invalid gamma correction at x: 27 y:29, spng: 25837 18854 59430 png: 60772 42569 9960
    invalid gamma correction at x: 28 y:29, spng: 22670 18854 60499 png: 36440 42569 21484
    invalid gamma correction at x: 29 y:29, spng: 18854 18854 61546 png: 42569 42569 27376
    invalid gamma correction at x: 30 y:29, spng: 13758 18854 62572 png: 48949 42569 27892
    invalid gamma correction at x: 31 y:29, spng: 0 18854 63578 png: 0 42569 23288
    invalid gamma correction at x: 0 y:30, spng: 65535 13758 0 png: 65535 48949 0
    invalid gamma correction at x: 1 y:30, spng: 64565 13758 0 png: 13820 48949 0
    invalid gamma correction at x: 2 y:30, spng: 63578 13758 13758 png: 23288 48949 48949
    invalid gamma correction at x: 3 y:30, spng: 62572 13758 18854 png: 27892 48949 42569
    invalid gamma correction at x: 4 y:30, spng: 61546 13758 22670 png: 27376 48949 36440
    invalid gamma correction at x: 5 y:30, spng: 60499 13758 25837 png: 21484 48949 60772
    invalid gamma correction at x: 6 y:30, spng: 59430 13758 28595 png: 9960 48949 45935
    invalid gamma correction at x: 7 y:30, spng: 58337 13758 31065 png: 58083 48949 23161
    invalid gamma correction at x: 8 y:30, spng: 57220 13758 33320 png: 34015 48949 10370
    invalid gamma correction at x: 9 y:30, spng: 56075 13758 35405 png: 3291 48949 20106
    invalid gamma correction at x: 10 y:30, spng: 54902 13758 37352 png: 30422 48949 59793
    invalid gamma correction at x: 11 y:30, spng: 53698 13758 39185 png: 49873 48949 4505
    invalid gamma correction at x: 12 y:30, spng: 52460 13758 40920 png: 60876 48949 55455
    invalid gamma correction at x: 13 y:30, spng: 51187 13758 42571 png: 62407 48949 19366
    invalid gamma correction at x: 14 y:30, spng: 49874 13758 44148 png: 53954 48949 29868
    invalid gamma correction at x: 15 y:30, spng: 48518 13758 45661 png: 34749 48949 23986
    invalid gamma correction at x: 16 y:30, spng: 47115 13758 47115 png: 3256 48949 3256
    invalid gamma correction at x: 17 y:30, spng: 45661 13758 48518 png: 23986 48949 34749
    invalid gamma correction at x: 18 y:30, spng: 44148 13758 49874 png: 29868 48949 53954
    invalid gamma correction at x: 19 y:30, spng: 42571 13758 51187 png: 19366 48949 62407
    invalid gamma correction at x: 20 y:30, spng: 40920 13758 52460 png: 55455 48949 60876
    invalid gamma correction at x: 21 y:30, spng: 39185 13758 53698 png: 4505 48949 49873
    invalid gamma correction at x: 22 y:30, spng: 37352 13758 54902 png: 59793 48949 30422
    invalid gamma correction at x: 23 y:30, spng: 35405 13758 56075 png: 20106 48949 3291
    invalid gamma correction at x: 24 y:30, spng: 33320 13758 57220 png: 10370 48949 34015
    invalid gamma correction at x: 25 y:30, spng: 31065 13758 58337 png: 23161 48949 58083
    invalid gamma correction at x: 26 y:30, spng: 28595 13758 59430 png: 45935 48949 9960
    invalid gamma correction at x: 27 y:30, spng: 25837 13758 60499 png: 60772 48949 21484
    invalid gamma correction at x: 28 y:30, spng: 22670 13758 61546 png: 36440 48949 27376
    invalid gamma correction at x: 29 y:30, spng: 18854 13758 62572 png: 42569 48949 27892
    invalid gamma correction at x: 30 y:30, spng: 13758 13758 63578 png: 48949 48949 23288
    invalid gamma correction at x: 31 y:30, spng: 0 13758 64565 png: 0 48949 13820
    invalid gamma correction at x: 1 y:31, spng: 64565 0 13758 png: 13820 0 48949
    invalid gamma correction at x: 2 y:31, spng: 63578 0 18854 png: 23288 0 42569
    invalid gamma correction at x: 3 y:31, spng: 62572 0 22670 png: 27892 0 36440
    invalid gamma correction at x: 4 y:31, spng: 61546 0 25837 png: 27376 0 60772
    invalid gamma correction at x: 5 y:31, spng: 60499 0 28595 png: 21484 0 45935
    invalid gamma correction at x: 6 y:31, spng: 59430 0 31065 png: 9960 0 23161
    invalid gamma correction at x: 7 y:31, spng: 58337 0 33320 png: 58083 0 10370
    invalid gamma correction at x: 8 y:31, spng: 57220 0 35405 png: 34015 0 20106
    invalid gamma correction at x: 9 y:31, spng: 56075 0 37352 png: 3291 0 59793
    invalid gamma correction at x: 10 y:31, spng: 54902 0 39185 png: 30422 0 4505
    invalid gamma correction at x: 11 y:31, spng: 53698 0 40920 png: 49873 0 55455
    invalid gamma correction at x: 12 y:31, spng: 52460 0 42571 png: 60876 0 19366
    invalid gamma correction at x: 13 y:31, spng: 51187 0 44148 png: 62407 0 29868
    invalid gamma correction at x: 14 y:31, spng: 49874 0 45661 png: 53954 0 23986
    invalid gamma correction at x: 15 y:31, spng: 48518 0 47115 png: 34749 0 3256
    invalid gamma correction at x: 16 y:31, spng: 47115 0 48518 png: 3256 0 34749
    invalid gamma correction at x: 17 y:31, spng: 45661 0 49874 png: 23986 0 53954
    invalid gamma correction at x: 18 y:31, spng: 44148 0 51187 png: 29868 0 62407
    invalid gamma correction at x: 19 y:31, spng: 42571 0 52460 png: 19366 0 60876
    invalid gamma correction at x: 20 y:31, spng: 40920 0 53698 png: 55455 0 49873
    invalid gamma correction at x: 21 y:31, spng: 39185 0 54902 png: 4505 0 30422
    invalid gamma correction at x: 22 y:31, spng: 37352 0 56075 png: 59793 0 3291
    invalid gamma correction at x: 23 y:31, spng: 35405 0 57220 png: 20106 0 34015
    invalid gamma correction at x: 24 y:31, spng: 33320 0 58337 png: 10370 0 58083
    invalid gamma correction at x: 25 y:31, spng: 31065 0 59430 png: 23161 0 9960
    invalid gamma correction at x: 26 y:31, spng: 28595 0 60499 png: 45935 0 21484
    invalid gamma correction at x: 27 y:31, spng: 25837 0 61546 png: 60772 0 27376
    invalid gamma correction at x: 28 y:31, spng: 22670 0 62572 png: 36440 0 27892
    invalid gamma correction at x: 29 y:31, spng: 18854 0 63578 png: 42569 0 23288
    invalid gamma correction at x: 30 y:31, spng: 13758 0 64565 png: 48949 0 13820
    -------
     15/203 basi4a16                                FAIL     0.02 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/basi4a16.png
    --- Listing only the last 100 lines from a long log. ---
    alpha mismatch at x:24 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 24 y:29, spng: 41725 41725 41725 png: 64930 64930 64930
    alpha mismatch at x:25 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 25 y:29, spng: 37699 37699 37699 png: 17555 17555 17555
    alpha mismatch at x:26 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 26 y:29, spng: 33079 33079 33079 png: 14209 14209 14209
    alpha mismatch at x:27 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 27 y:29, spng: 27510 27510 27510 png: 30315 30315 30315
    alpha mismatch at x:28 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 28 y:29, spng: 20075 20075 20075 png: 27470 27470 27470
    alpha mismatch at x:29 y:29, spng: 8457 png: 2337
    alpha mismatch at x:30 y:29, spng: 4229 png: 34064
    invalid gamma correction at x: 30 y:29, spng: 19433 19433 19433 png: 59723 59723 59723
    invalid gamma correction at x: 31 y:29, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 0 y:30, spng: 18854 18854 18854 png: 42569 42569 42569
    alpha mismatch at x:1 y:30, spng: 4229 png: 34064
    alpha mismatch at x:2 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 2 y:30, spng: 19433 19433 19433 png: 59723 59723 59723
    alpha mismatch at x:3 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 3 y:30, spng: 26632 26632 26632 png: 2152 2152 2152
    alpha mismatch at x:4 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 4 y:30, spng: 32021 32021 32021 png: 5501 5501 5501
    alpha mismatch at x:5 y:30, spng: 4229 png: 34064
    alpha mismatch at x:6 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 6 y:30, spng: 40391 40391 40391 png: 51101 51101 51101
    alpha mismatch at x:7 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 7 y:30, spng: 43881 43881 43881 png: 27051 27051 27051
    alpha mismatch at x:8 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 8 y:30, spng: 47066 47066 47066 png: 55991 55991 55991
    alpha mismatch at x:9 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 9 y:30, spng: 50011 50011 50011 png: 23747 23747 23747
    alpha mismatch at x:10 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 10 y:30, spng: 52761 52761 52761 png: 6862 6862 6862
    alpha mismatch at x:11 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 11 y:30, spng: 55350 55350 55350 png: 14040 14040 14040
    alpha mismatch at x:12 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 12 y:30, spng: 57801 57801 57801 png: 51681 51681 51681
    alpha mismatch at x:13 y:30, spng: 4229 png: 34064
    alpha mismatch at x:14 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 14 y:30, spng: 62361 62361 62361 png: 39411 39411 39411
    alpha mismatch at x:15 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 15 y:30, spng: 64497 64497 64497 png: 62203 62203 62203
    alpha mismatch at x:16 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 16 y:30, spng: 64497 64497 64497 png: 62203 62203 62203
    alpha mismatch at x:17 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 17 y:30, spng: 62361 62361 62361 png: 39411 39411 39411
    alpha mismatch at x:18 y:30, spng: 4229 png: 34064
    alpha mismatch at x:19 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 19 y:30, spng: 57801 57801 57801 png: 51681 51681 51681
    alpha mismatch at x:20 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 20 y:30, spng: 55350 55350 55350 png: 14040 14040 14040
    alpha mismatch at x:21 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 21 y:30, spng: 52761 52761 52761 png: 6862 6862 6862
    alpha mismatch at x:22 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 22 y:30, spng: 50011 50011 50011 png: 23747 23747 23747
    alpha mismatch at x:23 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 23 y:30, spng: 47066 47066 47066 png: 55991 55991 55991
    alpha mismatch at x:24 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 24 y:30, spng: 43881 43881 43881 png: 27051 27051 27051
    alpha mismatch at x:25 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 25 y:30, spng: 40391 40391 40391 png: 51101 51101 51101
    alpha mismatch at x:26 y:30, spng: 4229 png: 34064
    alpha mismatch at x:27 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 27 y:30, spng: 32021 32021 32021 png: 5501 5501 5501
    alpha mismatch at x:28 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 28 y:30, spng: 26632 26632 26632 png: 2152 2152 2152
    alpha mismatch at x:29 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 29 y:30, spng: 19433 19433 19433 png: 59723 59723 59723
    alpha mismatch at x:30 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 31 y:30, spng: 18854 18854 18854 png: 42569 42569 42569
    invalid gamma correction at x: 1 y:31, spng: 18854 18854 18854 png: 42569 42569 42569
    invalid gamma correction at x: 2 y:31, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 3 y:31, spng: 31065 31065 31065 png: 23161 23161 23161
    invalid gamma correction at x: 4 y:31, spng: 35405 35405 35405 png: 20106 20106 20106
    invalid gamma correction at x: 5 y:31, spng: 39185 39185 39185 png: 4505 4505 4505
    invalid gamma correction at x: 6 y:31, spng: 42571 42571 42571 png: 19366 19366 19366
    invalid gamma correction at x: 7 y:31, spng: 45661 45661 45661 png: 23986 23986 23986
    invalid gamma correction at x: 8 y:31, spng: 48518 48518 48518 png: 34493 34493 34493
    invalid gamma correction at x: 9 y:31, spng: 51186 51186 51186 png: 62407 62407 62407
    invalid gamma correction at x: 10 y:31, spng: 53697 53697 53697 png: 49873 49873 49873
    invalid gamma correction at x: 11 y:31, spng: 56075 56075 56075 png: 3035 3035 3035
    invalid gamma correction at x: 13 y:31, spng: 60499 60499 60499 png: 21484 21484 21484
    invalid gamma correction at x: 14 y:31, spng: 62571 62571 62571 png: 27892 27892 27892
    invalid gamma correction at x: 15 y:31, spng: 64565 64565 64565 png: 13820 13820 13820
    invalid gamma correction at x: 16 y:31, spng: 64565 64565 64565 png: 13820 13820 13820
    invalid gamma correction at x: 17 y:31, spng: 62571 62571 62571 png: 27892 27892 27892
    invalid gamma correction at x: 18 y:31, spng: 60499 60499 60499 png: 21484 21484 21484
    invalid gamma correction at x: 20 y:31, spng: 56075 56075 56075 png: 3035 3035 3035
    invalid gamma correction at x: 21 y:31, spng: 53697 53697 53697 png: 49873 49873 49873
    invalid gamma correction at x: 22 y:31, spng: 51186 51186 51186 png: 62407 62407 62407
    invalid gamma correction at x: 23 y:31, spng: 48518 48518 48518 png: 34493 34493 34493
    invalid gamma correction at x: 24 y:31, spng: 45661 45661 45661 png: 23986 23986 23986
    invalid gamma correction at x: 25 y:31, spng: 42571 42571 42571 png: 19366 19366 19366
    invalid gamma correction at x: 26 y:31, spng: 39185 39185 39185 png: 4505 4505 4505
    invalid gamma correction at x: 27 y:31, spng: 35405 35405 35405 png: 20106 20106 20106
    invalid gamma correction at x: 28 y:31, spng: 31065 31065 31065 png: 23161 23161 23161
    invalid gamma correction at x: 29 y:31, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 30 y:31, spng: 18854 18854 18854 png: 42569 42569 42569
    -------
     17/203 basi6a16                                FAIL     0.02 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/basi6a16.png
    --- Listing only the last 100 lines from a long log. ---
    alpha mismatch at x:27 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 27 y:29, spng: 20075 0 63281 png: 27470 0 13047
    alpha mismatch at x:28 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 28 y:29, spng: 14649 0 64419 png: 14905 0 42235
    alpha mismatch at x:29 y:29, spng: 8457 png: 2337
    alpha mismatch at x:30 y:29, spng: 4229 png: 34064
    invalid gamma correction at x: 30 y:29, spng: 0 14179 64497 png: 0 25655 62203
    invalid gamma correction at x: 31 y:29, spng: 0 18854 63577 png: 0 42569 23288
    invalid gamma correction at x: 0 y:30, spng: 65535 13758 0 png: 65535 48949 0
    alpha mismatch at x:1 y:30, spng: 4229 png: 34064
    alpha mismatch at x:2 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 2 y:30, spng: 64497 0 14179 png: 62203 0 25655
    alpha mismatch at x:3 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 3 y:30, spng: 63440 0 19433 png: 53495 0 59723
    alpha mismatch at x:4 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 4 y:30, spng: 62361 0 23367 png: 39411 0 18267
    alpha mismatch at x:5 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 5 y:30, spng: 61259 0 26632 png: 19439 0 2152
    alpha mismatch at x:6 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 6 y:30, spng: 60132 0 29475 png: 58858 0 9075
    alpha mismatch at x:7 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 7 y:30, spng: 58981 0 32021 png: 26086 0 5501
    alpha mismatch at x:8 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 8 y:30, spng: 57801 0 34345 png: 51681 0 10630
    alpha mismatch at x:9 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 9 y:30, spng: 56591 0 36495 png: 4317 0 36750
    alpha mismatch at x:10 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 10 y:30, spng: 55350 0 38502 png: 14040 0 26262
    alpha mismatch at x:11 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 11 y:30, spng: 54074 0 40391 png: 15315 0 51101
    alpha mismatch at x:12 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 12 y:30, spng: 52761 0 42179 png: 6862 0 50340
    alpha mismatch at x:13 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 13 y:30, spng: 51409 0 43881 png: 53704 0 27051
    alpha mismatch at x:14 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 14 y:30, spng: 50011 0 45507 png: 23747 0 50097
    alpha mismatch at x:15 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 15 y:30, spng: 48565 0 47066 png: 46781 0 55991
    alpha mismatch at x:16 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 16 y:30, spng: 47066 0 48565 png: 55991 0 46781
    alpha mismatch at x:17 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 17 y:30, spng: 45507 0 50011 png: 50097 0 23747
    alpha mismatch at x:18 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 18 y:30, spng: 43881 0 51409 png: 27051 0 53704
    alpha mismatch at x:19 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 19 y:30, spng: 42179 0 52761 png: 50340 0 6862
    alpha mismatch at x:20 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 20 y:30, spng: 40391 0 54074 png: 51101 0 15315
    alpha mismatch at x:21 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 21 y:30, spng: 38502 0 55350 png: 26262 0 14040
    alpha mismatch at x:22 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 22 y:30, spng: 36495 0 56591 png: 36750 0 4317
    alpha mismatch at x:23 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 23 y:30, spng: 34345 0 57801 png: 10630 0 51681
    alpha mismatch at x:24 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 24 y:30, spng: 32021 0 58981 png: 5501 0 26086
    alpha mismatch at x:25 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 25 y:30, spng: 29475 0 60132 png: 9075 0 58858
    alpha mismatch at x:26 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 26 y:30, spng: 26632 0 61259 png: 2152 0 19439
    alpha mismatch at x:27 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 27 y:30, spng: 23367 0 62361 png: 18267 0 39411
    alpha mismatch at x:28 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 28 y:30, spng: 19433 0 63440 png: 59723 0 53495
    alpha mismatch at x:29 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 29 y:30, spng: 14179 0 64497 png: 25655 0 62203
    alpha mismatch at x:30 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 31 y:30, spng: 0 13758 64565 png: 0 48949 13820
    invalid gamma correction at x: 1 y:31, spng: 64565 0 13758 png: 13820 0 48949
    invalid gamma correction at x: 2 y:31, spng: 63577 0 18854 png: 23288 0 42569
    invalid gamma correction at x: 3 y:31, spng: 62571 0 22670 png: 27892 0 36440
    invalid gamma correction at x: 4 y:31, spng: 61545 0 25837 png: 27376 0 60772
    invalid gamma correction at x: 5 y:31, spng: 60499 0 28595 png: 21484 0 45935
    invalid gamma correction at x: 6 y:31, spng: 59430 0 31065 png: 9960 0 23161
    invalid gamma correction at x: 7 y:31, spng: 58337 0 33320 png: 57827 0 10370
    invalid gamma correction at x: 8 y:31, spng: 57219 0 35405 png: 34015 0 20106
    invalid gamma correction at x: 9 y:31, spng: 56075 0 37352 png: 3035 0 59793
    invalid gamma correction at x: 10 y:31, spng: 54901 0 39185 png: 30422 0 4505
    invalid gamma correction at x: 11 y:31, spng: 53697 0 40920 png: 49873 0 55455
    invalid gamma correction at x: 12 y:31, spng: 52460 0 42571 png: 60620 0 19366
    invalid gamma correction at x: 13 y:31, spng: 51186 0 44148 png: 62407 0 29868
    invalid gamma correction at x: 14 y:31, spng: 49873 0 45661 png: 53954 0 23986
    invalid gamma correction at x: 15 y:31, spng: 48518 0 47115 png: 34493 0 3256
    invalid gamma correction at x: 16 y:31, spng: 47115 0 48518 png: 3256 0 34493
    invalid gamma correction at x: 17 y:31, spng: 45661 0 49873 png: 23986 0 53954
    invalid gamma correction at x: 18 y:31, spng: 44148 0 51186 png: 29868 0 62407
    invalid gamma correction at x: 19 y:31, spng: 42571 0 52460 png: 19366 0 60620
    invalid gamma correction at x: 20 y:31, spng: 40920 0 53697 png: 55455 0 49873
    invalid gamma correction at x: 21 y:31, spng: 39185 0 54901 png: 4505 0 30422
    invalid gamma correction at x: 22 y:31, spng: 37352 0 56075 png: 59793 0 3035
    invalid gamma correction at x: 23 y:31, spng: 35405 0 57219 png: 20106 0 34015
    invalid gamma correction at x: 24 y:31, spng: 33320 0 58337 png: 10370 0 57827
    invalid gamma correction at x: 25 y:31, spng: 31065 0 59430 png: 23161 0 9960
    invalid gamma correction at x: 26 y:31, spng: 28595 0 60499 png: 45935 0 21484
    invalid gamma correction at x: 27 y:31, spng: 25837 0 61545 png: 60772 0 27376
    invalid gamma correction at x: 28 y:31, spng: 22670 0 62571 png: 36440 0 27892
    invalid gamma correction at x: 29 y:31, spng: 18854 0 63577 png: 42569 0 23288
    invalid gamma correction at x: 30 y:31, spng: 13758 0 64565 png: 48949 0 13820
    -------
     24/203 basn2c16                                FAIL     0.01 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/basn2c16.png
    --- Listing only the last 100 lines from a long log. ---
    invalid gamma correction at x: 28 y:28, spng: 22670 22670 59430 png: 36440 36440 9960
    invalid gamma correction at x: 29 y:28, spng: 18854 22670 60499 png: 42569 36440 21484
    invalid gamma correction at x: 30 y:28, spng: 13758 22670 61546 png: 48949 36440 27376
    invalid gamma correction at x: 31 y:28, spng: 0 22670 62572 png: 0 36440 27892
    invalid gamma correction at x: 0 y:29, spng: 65535 18854 0 png: 65535 42569 0
    invalid gamma correction at x: 1 y:29, spng: 64565 18854 0 png: 13820 42569 0
    invalid gamma correction at x: 2 y:29, spng: 63578 18854 0 png: 23288 42569 0
    invalid gamma correction at x: 3 y:29, spng: 62572 18854 13758 png: 27892 42569 48949
    invalid gamma correction at x: 4 y:29, spng: 61546 18854 18854 png: 27376 42569 42569
    invalid gamma correction at x: 5 y:29, spng: 60499 18854 22670 png: 21484 42569 36440
    invalid gamma correction at x: 6 y:29, spng: 59430 18854 25837 png: 9960 42569 60772
    invalid gamma correction at x: 7 y:29, spng: 58337 18854 28595 png: 58083 42569 45935
    invalid gamma correction at x: 8 y:29, spng: 57220 18854 31065 png: 34015 42569 23161
    invalid gamma correction at x: 9 y:29, spng: 56075 18854 33320 png: 3291 42569 10370
    invalid gamma correction at x: 10 y:29, spng: 54902 18854 35405 png: 30422 42569 20106
    invalid gamma correction at x: 11 y:29, spng: 53698 18854 37352 png: 49873 42569 59793
    invalid gamma correction at x: 12 y:29, spng: 52460 18854 39185 png: 60876 42569 4505
    invalid gamma correction at x: 13 y:29, spng: 51187 18854 40920 png: 62407 42569 55455
    invalid gamma correction at x: 14 y:29, spng: 49874 18854 42571 png: 53954 42569 19366
    invalid gamma correction at x: 15 y:29, spng: 48518 18854 44148 png: 34749 42569 29868
    invalid gamma correction at x: 16 y:29, spng: 47115 18854 45661 png: 3256 42569 23986
    invalid gamma correction at x: 17 y:29, spng: 45661 18854 47115 png: 23986 42569 3256
    invalid gamma correction at x: 18 y:29, spng: 44148 18854 48518 png: 29868 42569 34749
    invalid gamma correction at x: 19 y:29, spng: 42571 18854 49874 png: 19366 42569 53954
    invalid gamma correction at x: 20 y:29, spng: 40920 18854 51187 png: 55455 42569 62407
    invalid gamma correction at x: 21 y:29, spng: 39185 18854 52460 png: 4505 42569 60876
    invalid gamma correction at x: 22 y:29, spng: 37352 18854 53698 png: 59793 42569 49873
    invalid gamma correction at x: 23 y:29, spng: 35405 18854 54902 png: 20106 42569 30422
    invalid gamma correction at x: 24 y:29, spng: 33320 18854 56075 png: 10370 42569 3291
    invalid gamma correction at x: 25 y:29, spng: 31065 18854 57220 png: 23161 42569 34015
    invalid gamma correction at x: 26 y:29, spng: 28595 18854 58337 png: 45935 42569 58083
    invalid gamma correction at x: 27 y:29, spng: 25837 18854 59430 png: 60772 42569 9960
    invalid gamma correction at x: 28 y:29, spng: 22670 18854 60499 png: 36440 42569 21484
    invalid gamma correction at x: 29 y:29, spng: 18854 18854 61546 png: 42569 42569 27376
    invalid gamma correction at x: 30 y:29, spng: 13758 18854 62572 png: 48949 42569 27892
    invalid gamma correction at x: 31 y:29, spng: 0 18854 63578 png: 0 42569 23288
    invalid gamma correction at x: 0 y:30, spng: 65535 13758 0 png: 65535 48949 0
    invalid gamma correction at x: 1 y:30, spng: 64565 13758 0 png: 13820 48949 0
    invalid gamma correction at x: 2 y:30, spng: 63578 13758 13758 png: 23288 48949 48949
    invalid gamma correction at x: 3 y:30, spng: 62572 13758 18854 png: 27892 48949 42569
    invalid gamma correction at x: 4 y:30, spng: 61546 13758 22670 png: 27376 48949 36440
    invalid gamma correction at x: 5 y:30, spng: 60499 13758 25837 png: 21484 48949 60772
    invalid gamma correction at x: 6 y:30, spng: 59430 13758 28595 png: 9960 48949 45935
    invalid gamma correction at x: 7 y:30, spng: 58337 13758 31065 png: 58083 48949 23161
    invalid gamma correction at x: 8 y:30, spng: 57220 13758 33320 png: 34015 48949 10370
    invalid gamma correction at x: 9 y:30, spng: 56075 13758 35405 png: 3291 48949 20106
    invalid gamma correction at x: 10 y:30, spng: 54902 13758 37352 png: 30422 48949 59793
    invalid gamma correction at x: 11 y:30, spng: 53698 13758 39185 png: 49873 48949 4505
    invalid gamma correction at x: 12 y:30, spng: 52460 13758 40920 png: 60876 48949 55455
    invalid gamma correction at x: 13 y:30, spng: 51187 13758 42571 png: 62407 48949 19366
    invalid gamma correction at x: 14 y:30, spng: 49874 13758 44148 png: 53954 48949 29868
    invalid gamma correction at x: 15 y:30, spng: 48518 13758 45661 png: 34749 48949 23986
    invalid gamma correction at x: 16 y:30, spng: 47115 13758 47115 png: 3256 48949 3256
    invalid gamma correction at x: 17 y:30, spng: 45661 13758 48518 png: 23986 48949 34749
    invalid gamma correction at x: 18 y:30, spng: 44148 13758 49874 png: 29868 48949 53954
    invalid gamma correction at x: 19 y:30, spng: 42571 13758 51187 png: 19366 48949 62407
    invalid gamma correction at x: 20 y:30, spng: 40920 13758 52460 png: 55455 48949 60876
    invalid gamma correction at x: 21 y:30, spng: 39185 13758 53698 png: 4505 48949 49873
    invalid gamma correction at x: 22 y:30, spng: 37352 13758 54902 png: 59793 48949 30422
    invalid gamma correction at x: 23 y:30, spng: 35405 13758 56075 png: 20106 48949 3291
    invalid gamma correction at x: 24 y:30, spng: 33320 13758 57220 png: 10370 48949 34015
    invalid gamma correction at x: 25 y:30, spng: 31065 13758 58337 png: 23161 48949 58083
    invalid gamma correction at x: 26 y:30, spng: 28595 13758 59430 png: 45935 48949 9960
    invalid gamma correction at x: 27 y:30, spng: 25837 13758 60499 png: 60772 48949 21484
    invalid gamma correction at x: 28 y:30, spng: 22670 13758 61546 png: 36440 48949 27376
    invalid gamma correction at x: 29 y:30, spng: 18854 13758 62572 png: 42569 48949 27892
    invalid gamma correction at x: 30 y:30, spng: 13758 13758 63578 png: 48949 48949 23288
    invalid gamma correction at x: 31 y:30, spng: 0 13758 64565 png: 0 48949 13820
    invalid gamma correction at x: 1 y:31, spng: 64565 0 13758 png: 13820 0 48949
    invalid gamma correction at x: 2 y:31, spng: 63578 0 18854 png: 23288 0 42569
    invalid gamma correction at x: 3 y:31, spng: 62572 0 22670 png: 27892 0 36440
    invalid gamma correction at x: 4 y:31, spng: 61546 0 25837 png: 27376 0 60772
    invalid gamma correction at x: 5 y:31, spng: 60499 0 28595 png: 21484 0 45935
    invalid gamma correction at x: 6 y:31, spng: 59430 0 31065 png: 9960 0 23161
    invalid gamma correction at x: 7 y:31, spng: 58337 0 33320 png: 58083 0 10370
    invalid gamma correction at x: 8 y:31, spng: 57220 0 35405 png: 34015 0 20106
    invalid gamma correction at x: 9 y:31, spng: 56075 0 37352 png: 3291 0 59793
    invalid gamma correction at x: 10 y:31, spng: 54902 0 39185 png: 30422 0 4505
    invalid gamma correction at x: 11 y:31, spng: 53698 0 40920 png: 49873 0 55455
    invalid gamma correction at x: 12 y:31, spng: 52460 0 42571 png: 60876 0 19366
    invalid gamma correction at x: 13 y:31, spng: 51187 0 44148 png: 62407 0 29868
    invalid gamma correction at x: 14 y:31, spng: 49874 0 45661 png: 53954 0 23986
    invalid gamma correction at x: 15 y:31, spng: 48518 0 47115 png: 34749 0 3256
    invalid gamma correction at x: 16 y:31, spng: 47115 0 48518 png: 3256 0 34749
    invalid gamma correction at x: 17 y:31, spng: 45661 0 49874 png: 23986 0 53954
    invalid gamma correction at x: 18 y:31, spng: 44148 0 51187 png: 29868 0 62407
    invalid gamma correction at x: 19 y:31, spng: 42571 0 52460 png: 19366 0 60876
    invalid gamma correction at x: 20 y:31, spng: 40920 0 53698 png: 55455 0 49873
    invalid gamma correction at x: 21 y:31, spng: 39185 0 54902 png: 4505 0 30422
    invalid gamma correction at x: 22 y:31, spng: 37352 0 56075 png: 59793 0 3291
    invalid gamma correction at x: 23 y:31, spng: 35405 0 57220 png: 20106 0 34015
    invalid gamma correction at x: 24 y:31, spng: 33320 0 58337 png: 10370 0 58083
    invalid gamma correction at x: 25 y:31, spng: 31065 0 59430 png: 23161 0 9960
    invalid gamma correction at x: 26 y:31, spng: 28595 0 60499 png: 45935 0 21484
    invalid gamma correction at x: 27 y:31, spng: 25837 0 61546 png: 60772 0 27376
    invalid gamma correction at x: 28 y:31, spng: 22670 0 62572 png: 36440 0 27892
    invalid gamma correction at x: 29 y:31, spng: 18854 0 63578 png: 42569 0 23288
    invalid gamma correction at x: 30 y:31, spng: 13758 0 64565 png: 48949 0 13820
    -------
     30/203 basn4a16                                FAIL     0.02 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/basn4a16.png
    --- Listing only the last 100 lines from a long log. ---
    alpha mismatch at x:24 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 24 y:29, spng: 41725 41725 41725 png: 64930 64930 64930
    alpha mismatch at x:25 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 25 y:29, spng: 37699 37699 37699 png: 17555 17555 17555
    alpha mismatch at x:26 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 26 y:29, spng: 33079 33079 33079 png: 14209 14209 14209
    alpha mismatch at x:27 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 27 y:29, spng: 27510 27510 27510 png: 30315 30315 30315
    alpha mismatch at x:28 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 28 y:29, spng: 20075 20075 20075 png: 27470 27470 27470
    alpha mismatch at x:29 y:29, spng: 8457 png: 2337
    alpha mismatch at x:30 y:29, spng: 4229 png: 34064
    invalid gamma correction at x: 30 y:29, spng: 19433 19433 19433 png: 59723 59723 59723
    invalid gamma correction at x: 31 y:29, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 0 y:30, spng: 18854 18854 18854 png: 42569 42569 42569
    alpha mismatch at x:1 y:30, spng: 4229 png: 34064
    alpha mismatch at x:2 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 2 y:30, spng: 19433 19433 19433 png: 59723 59723 59723
    alpha mismatch at x:3 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 3 y:30, spng: 26632 26632 26632 png: 2152 2152 2152
    alpha mismatch at x:4 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 4 y:30, spng: 32021 32021 32021 png: 5501 5501 5501
    alpha mismatch at x:5 y:30, spng: 4229 png: 34064
    alpha mismatch at x:6 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 6 y:30, spng: 40391 40391 40391 png: 51101 51101 51101
    alpha mismatch at x:7 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 7 y:30, spng: 43881 43881 43881 png: 27051 27051 27051
    alpha mismatch at x:8 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 8 y:30, spng: 47066 47066 47066 png: 55991 55991 55991
    alpha mismatch at x:9 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 9 y:30, spng: 50011 50011 50011 png: 23747 23747 23747
    alpha mismatch at x:10 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 10 y:30, spng: 52761 52761 52761 png: 6862 6862 6862
    alpha mismatch at x:11 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 11 y:30, spng: 55350 55350 55350 png: 14040 14040 14040
    alpha mismatch at x:12 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 12 y:30, spng: 57801 57801 57801 png: 51681 51681 51681
    alpha mismatch at x:13 y:30, spng: 4229 png: 34064
    alpha mismatch at x:14 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 14 y:30, spng: 62361 62361 62361 png: 39411 39411 39411
    alpha mismatch at x:15 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 15 y:30, spng: 64497 64497 64497 png: 62203 62203 62203
    alpha mismatch at x:16 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 16 y:30, spng: 64497 64497 64497 png: 62203 62203 62203
    alpha mismatch at x:17 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 17 y:30, spng: 62361 62361 62361 png: 39411 39411 39411
    alpha mismatch at x:18 y:30, spng: 4229 png: 34064
    alpha mismatch at x:19 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 19 y:30, spng: 57801 57801 57801 png: 51681 51681 51681
    alpha mismatch at x:20 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 20 y:30, spng: 55350 55350 55350 png: 14040 14040 14040
    alpha mismatch at x:21 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 21 y:30, spng: 52761 52761 52761 png: 6862 6862 6862
    alpha mismatch at x:22 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 22 y:30, spng: 50011 50011 50011 png: 23747 23747 23747
    alpha mismatch at x:23 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 23 y:30, spng: 47066 47066 47066 png: 55991 55991 55991
    alpha mismatch at x:24 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 24 y:30, spng: 43881 43881 43881 png: 27051 27051 27051
    alpha mismatch at x:25 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 25 y:30, spng: 40391 40391 40391 png: 51101 51101 51101
    alpha mismatch at x:26 y:30, spng: 4229 png: 34064
    alpha mismatch at x:27 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 27 y:30, spng: 32021 32021 32021 png: 5501 5501 5501
    alpha mismatch at x:28 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 28 y:30, spng: 26632 26632 26632 png: 2152 2152 2152
    alpha mismatch at x:29 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 29 y:30, spng: 19433 19433 19433 png: 59723 59723 59723
    alpha mismatch at x:30 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 31 y:30, spng: 18854 18854 18854 png: 42569 42569 42569
    invalid gamma correction at x: 1 y:31, spng: 18854 18854 18854 png: 42569 42569 42569
    invalid gamma correction at x: 2 y:31, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 3 y:31, spng: 31065 31065 31065 png: 23161 23161 23161
    invalid gamma correction at x: 4 y:31, spng: 35405 35405 35405 png: 20106 20106 20106
    invalid gamma correction at x: 5 y:31, spng: 39185 39185 39185 png: 4505 4505 4505
    invalid gamma correction at x: 6 y:31, spng: 42571 42571 42571 png: 19366 19366 19366
    invalid gamma correction at x: 7 y:31, spng: 45661 45661 45661 png: 23986 23986 23986
    invalid gamma correction at x: 8 y:31, spng: 48518 48518 48518 png: 34493 34493 34493
    invalid gamma correction at x: 9 y:31, spng: 51186 51186 51186 png: 62407 62407 62407
    invalid gamma correction at x: 10 y:31, spng: 53697 53697 53697 png: 49873 49873 49873
    invalid gamma correction at x: 11 y:31, spng: 56075 56075 56075 png: 3035 3035 3035
    invalid gamma correction at x: 13 y:31, spng: 60499 60499 60499 png: 21484 21484 21484
    invalid gamma correction at x: 14 y:31, spng: 62571 62571 62571 png: 27892 27892 27892
    invalid gamma correction at x: 15 y:31, spng: 64565 64565 64565 png: 13820 13820 13820
    invalid gamma correction at x: 16 y:31, spng: 64565 64565 64565 png: 13820 13820 13820
    invalid gamma correction at x: 17 y:31, spng: 62571 62571 62571 png: 27892 27892 27892
    invalid gamma correction at x: 18 y:31, spng: 60499 60499 60499 png: 21484 21484 21484
    invalid gamma correction at x: 20 y:31, spng: 56075 56075 56075 png: 3035 3035 3035
    invalid gamma correction at x: 21 y:31, spng: 53697 53697 53697 png: 49873 49873 49873
    invalid gamma correction at x: 22 y:31, spng: 51186 51186 51186 png: 62407 62407 62407
    invalid gamma correction at x: 23 y:31, spng: 48518 48518 48518 png: 34493 34493 34493
    invalid gamma correction at x: 24 y:31, spng: 45661 45661 45661 png: 23986 23986 23986
    invalid gamma correction at x: 25 y:31, spng: 42571 42571 42571 png: 19366 19366 19366
    invalid gamma correction at x: 26 y:31, spng: 39185 39185 39185 png: 4505 4505 4505
    invalid gamma correction at x: 27 y:31, spng: 35405 35405 35405 png: 20106 20106 20106
    invalid gamma correction at x: 28 y:31, spng: 31065 31065 31065 png: 23161 23161 23161
    invalid gamma correction at x: 29 y:31, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 30 y:31, spng: 18854 18854 18854 png: 42569 42569 42569
    -------
     32/203 basn6a16                                FAIL     0.03 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/basn6a16.png
    --- Listing only the last 100 lines from a long log. ---
    alpha mismatch at x:27 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 27 y:29, spng: 20075 0 63281 png: 27470 0 13047
    alpha mismatch at x:28 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 28 y:29, spng: 14649 0 64419 png: 14905 0 42235
    alpha mismatch at x:29 y:29, spng: 8457 png: 2337
    alpha mismatch at x:30 y:29, spng: 4229 png: 34064
    invalid gamma correction at x: 30 y:29, spng: 0 14179 64497 png: 0 25655 62203
    invalid gamma correction at x: 31 y:29, spng: 0 18854 63577 png: 0 42569 23288
    invalid gamma correction at x: 0 y:30, spng: 65535 13758 0 png: 65535 48949 0
    alpha mismatch at x:1 y:30, spng: 4229 png: 34064
    alpha mismatch at x:2 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 2 y:30, spng: 64497 0 14179 png: 62203 0 25655
    alpha mismatch at x:3 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 3 y:30, spng: 63440 0 19433 png: 53495 0 59723
    alpha mismatch at x:4 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 4 y:30, spng: 62361 0 23367 png: 39411 0 18267
    alpha mismatch at x:5 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 5 y:30, spng: 61259 0 26632 png: 19439 0 2152
    alpha mismatch at x:6 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 6 y:30, spng: 60132 0 29475 png: 58858 0 9075
    alpha mismatch at x:7 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 7 y:30, spng: 58981 0 32021 png: 26086 0 5501
    alpha mismatch at x:8 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 8 y:30, spng: 57801 0 34345 png: 51681 0 10630
    alpha mismatch at x:9 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 9 y:30, spng: 56591 0 36495 png: 4317 0 36750
    alpha mismatch at x:10 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 10 y:30, spng: 55350 0 38502 png: 14040 0 26262
    alpha mismatch at x:11 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 11 y:30, spng: 54074 0 40391 png: 15315 0 51101
    alpha mismatch at x:12 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 12 y:30, spng: 52761 0 42179 png: 6862 0 50340
    alpha mismatch at x:13 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 13 y:30, spng: 51409 0 43881 png: 53704 0 27051
    alpha mismatch at x:14 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 14 y:30, spng: 50011 0 45507 png: 23747 0 50097
    alpha mismatch at x:15 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 15 y:30, spng: 48565 0 47066 png: 46781 0 55991
    alpha mismatch at x:16 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 16 y:30, spng: 47066 0 48565 png: 55991 0 46781
    alpha mismatch at x:17 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 17 y:30, spng: 45507 0 50011 png: 50097 0 23747
    alpha mismatch at x:18 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 18 y:30, spng: 43881 0 51409 png: 27051 0 53704
    alpha mismatch at x:19 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 19 y:30, spng: 42179 0 52761 png: 50340 0 6862
    alpha mismatch at x:20 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 20 y:30, spng: 40391 0 54074 png: 51101 0 15315
    alpha mismatch at x:21 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 21 y:30, spng: 38502 0 55350 png: 26262 0 14040
    alpha mismatch at x:22 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 22 y:30, spng: 36495 0 56591 png: 36750 0 4317
    alpha mismatch at x:23 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 23 y:30, spng: 34345 0 57801 png: 10630 0 51681
    alpha mismatch at x:24 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 24 y:30, spng: 32021 0 58981 png: 5501 0 26086
    alpha mismatch at x:25 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 25 y:30, spng: 29475 0 60132 png: 9075 0 58858
    alpha mismatch at x:26 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 26 y:30, spng: 26632 0 61259 png: 2152 0 19439
    alpha mismatch at x:27 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 27 y:30, spng: 23367 0 62361 png: 18267 0 39411
    alpha mismatch at x:28 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 28 y:30, spng: 19433 0 63440 png: 59723 0 53495
    alpha mismatch at x:29 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 29 y:30, spng: 14179 0 64497 png: 25655 0 62203
    alpha mismatch at x:30 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 31 y:30, spng: 0 13758 64565 png: 0 48949 13820
    invalid gamma correction at x: 1 y:31, spng: 64565 0 13758 png: 13820 0 48949
    invalid gamma correction at x: 2 y:31, spng: 63577 0 18854 png: 23288 0 42569
    invalid gamma correction at x: 3 y:31, spng: 62571 0 22670 png: 27892 0 36440
    invalid gamma correction at x: 4 y:31, spng: 61545 0 25837 png: 27376 0 60772
    invalid gamma correction at x: 5 y:31, spng: 60499 0 28595 png: 21484 0 45935
    invalid gamma correction at x: 6 y:31, spng: 59430 0 31065 png: 9960 0 23161
    invalid gamma correction at x: 7 y:31, spng: 58337 0 33320 png: 57827 0 10370
    invalid gamma correction at x: 8 y:31, spng: 57219 0 35405 png: 34015 0 20106
    invalid gamma correction at x: 9 y:31, spng: 56075 0 37352 png: 3035 0 59793
    invalid gamma correction at x: 10 y:31, spng: 54901 0 39185 png: 30422 0 4505
    invalid gamma correction at x: 11 y:31, spng: 53697 0 40920 png: 49873 0 55455
    invalid gamma correction at x: 12 y:31, spng: 52460 0 42571 png: 60620 0 19366
    invalid gamma correction at x: 13 y:31, spng: 51186 0 44148 png: 62407 0 29868
    invalid gamma correction at x: 14 y:31, spng: 49873 0 45661 png: 53954 0 23986
    invalid gamma correction at x: 15 y:31, spng: 48518 0 47115 png: 34493 0 3256
    invalid gamma correction at x: 16 y:31, spng: 47115 0 48518 png: 3256 0 34493
    invalid gamma correction at x: 17 y:31, spng: 45661 0 49873 png: 23986 0 53954
    invalid gamma correction at x: 18 y:31, spng: 44148 0 51186 png: 29868 0 62407
    invalid gamma correction at x: 19 y:31, spng: 42571 0 52460 png: 19366 0 60620
    invalid gamma correction at x: 20 y:31, spng: 40920 0 53697 png: 55455 0 49873
    invalid gamma correction at x: 21 y:31, spng: 39185 0 54901 png: 4505 0 30422
    invalid gamma correction at x: 22 y:31, spng: 37352 0 56075 png: 59793 0 3035
    invalid gamma correction at x: 23 y:31, spng: 35405 0 57219 png: 20106 0 34015
    invalid gamma correction at x: 24 y:31, spng: 33320 0 58337 png: 10370 0 57827
    invalid gamma correction at x: 25 y:31, spng: 31065 0 59430 png: 23161 0 9960
    invalid gamma correction at x: 26 y:31, spng: 28595 0 60499 png: 45935 0 21484
    invalid gamma correction at x: 27 y:31, spng: 25837 0 61545 png: 60772 0 27376
    invalid gamma correction at x: 28 y:31, spng: 22670 0 62571 png: 36440 0 27892
    invalid gamma correction at x: 29 y:31, spng: 18854 0 63577 png: 42569 0 23288
    invalid gamma correction at x: 30 y:31, spng: 13758 0 64565 png: 48949 0 13820
    -------
     34/203 bgai4a16                                FAIL     0.01 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/bgai4a16.png
    --- Listing only the last 100 lines from a long log. ---
    alpha mismatch at x:24 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 24 y:29, spng: 41725 41725 41725 png: 64930 64930 64930
    alpha mismatch at x:25 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 25 y:29, spng: 37699 37699 37699 png: 17555 17555 17555
    alpha mismatch at x:26 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 26 y:29, spng: 33079 33079 33079 png: 14209 14209 14209
    alpha mismatch at x:27 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 27 y:29, spng: 27510 27510 27510 png: 30315 30315 30315
    alpha mismatch at x:28 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 28 y:29, spng: 20075 20075 20075 png: 27470 27470 27470
    alpha mismatch at x:29 y:29, spng: 8457 png: 2337
    alpha mismatch at x:30 y:29, spng: 4229 png: 34064
    invalid gamma correction at x: 30 y:29, spng: 19433 19433 19433 png: 59723 59723 59723
    invalid gamma correction at x: 31 y:29, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 0 y:30, spng: 18854 18854 18854 png: 42569 42569 42569
    alpha mismatch at x:1 y:30, spng: 4229 png: 34064
    alpha mismatch at x:2 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 2 y:30, spng: 19433 19433 19433 png: 59723 59723 59723
    alpha mismatch at x:3 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 3 y:30, spng: 26632 26632 26632 png: 2152 2152 2152
    alpha mismatch at x:4 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 4 y:30, spng: 32021 32021 32021 png: 5501 5501 5501
    alpha mismatch at x:5 y:30, spng: 4229 png: 34064
    alpha mismatch at x:6 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 6 y:30, spng: 40391 40391 40391 png: 51101 51101 51101
    alpha mismatch at x:7 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 7 y:30, spng: 43881 43881 43881 png: 27051 27051 27051
    alpha mismatch at x:8 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 8 y:30, spng: 47066 47066 47066 png: 55991 55991 55991
    alpha mismatch at x:9 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 9 y:30, spng: 50011 50011 50011 png: 23747 23747 23747
    alpha mismatch at x:10 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 10 y:30, spng: 52761 52761 52761 png: 6862 6862 6862
    alpha mismatch at x:11 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 11 y:30, spng: 55350 55350 55350 png: 14040 14040 14040
    alpha mismatch at x:12 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 12 y:30, spng: 57801 57801 57801 png: 51681 51681 51681
    alpha mismatch at x:13 y:30, spng: 4229 png: 34064
    alpha mismatch at x:14 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 14 y:30, spng: 62361 62361 62361 png: 39411 39411 39411
    alpha mismatch at x:15 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 15 y:30, spng: 64497 64497 64497 png: 62203 62203 62203
    alpha mismatch at x:16 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 16 y:30, spng: 64497 64497 64497 png: 62203 62203 62203
    alpha mismatch at x:17 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 17 y:30, spng: 62361 62361 62361 png: 39411 39411 39411
    alpha mismatch at x:18 y:30, spng: 4229 png: 34064
    alpha mismatch at x:19 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 19 y:30, spng: 57801 57801 57801 png: 51681 51681 51681
    alpha mismatch at x:20 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 20 y:30, spng: 55350 55350 55350 png: 14040 14040 14040
    alpha mismatch at x:21 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 21 y:30, spng: 52761 52761 52761 png: 6862 6862 6862
    alpha mismatch at x:22 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 22 y:30, spng: 50011 50011 50011 png: 23747 23747 23747
    alpha mismatch at x:23 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 23 y:30, spng: 47066 47066 47066 png: 55991 55991 55991
    alpha mismatch at x:24 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 24 y:30, spng: 43881 43881 43881 png: 27051 27051 27051
    alpha mismatch at x:25 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 25 y:30, spng: 40391 40391 40391 png: 51101 51101 51101
    alpha mismatch at x:26 y:30, spng: 4229 png: 34064
    alpha mismatch at x:27 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 27 y:30, spng: 32021 32021 32021 png: 5501 5501 5501
    alpha mismatch at x:28 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 28 y:30, spng: 26632 26632 26632 png: 2152 2152 2152
    alpha mismatch at x:29 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 29 y:30, spng: 19433 19433 19433 png: 59723 59723 59723
    alpha mismatch at x:30 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 31 y:30, spng: 18854 18854 18854 png: 42569 42569 42569
    invalid gamma correction at x: 1 y:31, spng: 18854 18854 18854 png: 42569 42569 42569
    invalid gamma correction at x: 2 y:31, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 3 y:31, spng: 31065 31065 31065 png: 23161 23161 23161
    invalid gamma correction at x: 4 y:31, spng: 35405 35405 35405 png: 20106 20106 20106
    invalid gamma correction at x: 5 y:31, spng: 39185 39185 39185 png: 4505 4505 4505
    invalid gamma correction at x: 6 y:31, spng: 42571 42571 42571 png: 19366 19366 19366
    invalid gamma correction at x: 7 y:31, spng: 45661 45661 45661 png: 23986 23986 23986
    invalid gamma correction at x: 8 y:31, spng: 48518 48518 48518 png: 34493 34493 34493
    invalid gamma correction at x: 9 y:31, spng: 51186 51186 51186 png: 62407 62407 62407
    invalid gamma correction at x: 10 y:31, spng: 53697 53697 53697 png: 49873 49873 49873
    invalid gamma correction at x: 11 y:31, spng: 56075 56075 56075 png: 3035 3035 3035
    invalid gamma correction at x: 13 y:31, spng: 60499 60499 60499 png: 21484 21484 21484
    invalid gamma correction at x: 14 y:31, spng: 62571 62571 62571 png: 27892 27892 27892
    invalid gamma correction at x: 15 y:31, spng: 64565 64565 64565 png: 13820 13820 13820
    invalid gamma correction at x: 16 y:31, spng: 64565 64565 64565 png: 13820 13820 13820
    invalid gamma correction at x: 17 y:31, spng: 62571 62571 62571 png: 27892 27892 27892
    invalid gamma correction at x: 18 y:31, spng: 60499 60499 60499 png: 21484 21484 21484
    invalid gamma correction at x: 20 y:31, spng: 56075 56075 56075 png: 3035 3035 3035
    invalid gamma correction at x: 21 y:31, spng: 53697 53697 53697 png: 49873 49873 49873
    invalid gamma correction at x: 22 y:31, spng: 51186 51186 51186 png: 62407 62407 62407
    invalid gamma correction at x: 23 y:31, spng: 48518 48518 48518 png: 34493 34493 34493
    invalid gamma correction at x: 24 y:31, spng: 45661 45661 45661 png: 23986 23986 23986
    invalid gamma correction at x: 25 y:31, spng: 42571 42571 42571 png: 19366 19366 19366
    invalid gamma correction at x: 26 y:31, spng: 39185 39185 39185 png: 4505 4505 4505
    invalid gamma correction at x: 27 y:31, spng: 35405 35405 35405 png: 20106 20106 20106
    invalid gamma correction at x: 28 y:31, spng: 31065 31065 31065 png: 23161 23161 23161
    invalid gamma correction at x: 29 y:31, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 30 y:31, spng: 18854 18854 18854 png: 42569 42569 42569
    -------
     36/203 bgan6a16                                FAIL     0.02 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/bgan6a16.png
    --- Listing only the last 100 lines from a long log. ---
    alpha mismatch at x:27 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 27 y:29, spng: 20075 0 63281 png: 27470 0 13047
    alpha mismatch at x:28 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 28 y:29, spng: 14649 0 64419 png: 14905 0 42235
    alpha mismatch at x:29 y:29, spng: 8457 png: 2337
    alpha mismatch at x:30 y:29, spng: 4229 png: 34064
    invalid gamma correction at x: 30 y:29, spng: 0 14179 64497 png: 0 25655 62203
    invalid gamma correction at x: 31 y:29, spng: 0 18854 63577 png: 0 42569 23288
    invalid gamma correction at x: 0 y:30, spng: 65535 13758 0 png: 65535 48949 0
    alpha mismatch at x:1 y:30, spng: 4229 png: 34064
    alpha mismatch at x:2 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 2 y:30, spng: 64497 0 14179 png: 62203 0 25655
    alpha mismatch at x:3 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 3 y:30, spng: 63440 0 19433 png: 53495 0 59723
    alpha mismatch at x:4 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 4 y:30, spng: 62361 0 23367 png: 39411 0 18267
    alpha mismatch at x:5 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 5 y:30, spng: 61259 0 26632 png: 19439 0 2152
    alpha mismatch at x:6 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 6 y:30, spng: 60132 0 29475 png: 58858 0 9075
    alpha mismatch at x:7 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 7 y:30, spng: 58981 0 32021 png: 26086 0 5501
    alpha mismatch at x:8 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 8 y:30, spng: 57801 0 34345 png: 51681 0 10630
    alpha mismatch at x:9 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 9 y:30, spng: 56591 0 36495 png: 4317 0 36750
    alpha mismatch at x:10 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 10 y:30, spng: 55350 0 38502 png: 14040 0 26262
    alpha mismatch at x:11 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 11 y:30, spng: 54074 0 40391 png: 15315 0 51101
    alpha mismatch at x:12 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 12 y:30, spng: 52761 0 42179 png: 6862 0 50340
    alpha mismatch at x:13 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 13 y:30, spng: 51409 0 43881 png: 53704 0 27051
    alpha mismatch at x:14 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 14 y:30, spng: 50011 0 45507 png: 23747 0 50097
    alpha mismatch at x:15 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 15 y:30, spng: 48565 0 47066 png: 46781 0 55991
    alpha mismatch at x:16 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 16 y:30, spng: 47066 0 48565 png: 55991 0 46781
    alpha mismatch at x:17 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 17 y:30, spng: 45507 0 50011 png: 50097 0 23747
    alpha mismatch at x:18 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 18 y:30, spng: 43881 0 51409 png: 27051 0 53704
    alpha mismatch at x:19 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 19 y:30, spng: 42179 0 52761 png: 50340 0 6862
    alpha mismatch at x:20 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 20 y:30, spng: 40391 0 54074 png: 51101 0 15315
    alpha mismatch at x:21 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 21 y:30, spng: 38502 0 55350 png: 26262 0 14040
    alpha mismatch at x:22 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 22 y:30, spng: 36495 0 56591 png: 36750 0 4317
    alpha mismatch at x:23 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 23 y:30, spng: 34345 0 57801 png: 10630 0 51681
    alpha mismatch at x:24 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 24 y:30, spng: 32021 0 58981 png: 5501 0 26086
    alpha mismatch at x:25 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 25 y:30, spng: 29475 0 60132 png: 9075 0 58858
    alpha mismatch at x:26 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 26 y:30, spng: 26632 0 61259 png: 2152 0 19439
    alpha mismatch at x:27 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 27 y:30, spng: 23367 0 62361 png: 18267 0 39411
    alpha mismatch at x:28 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 28 y:30, spng: 19433 0 63440 png: 59723 0 53495
    alpha mismatch at x:29 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 29 y:30, spng: 14179 0 64497 png: 25655 0 62203
    alpha mismatch at x:30 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 31 y:30, spng: 0 13758 64565 png: 0 48949 13820
    invalid gamma correction at x: 1 y:31, spng: 64565 0 13758 png: 13820 0 48949
    invalid gamma correction at x: 2 y:31, spng: 63577 0 18854 png: 23288 0 42569
    invalid gamma correction at x: 3 y:31, spng: 62571 0 22670 png: 27892 0 36440
    invalid gamma correction at x: 4 y:31, spng: 61545 0 25837 png: 27376 0 60772
    invalid gamma correction at x: 5 y:31, spng: 60499 0 28595 png: 21484 0 45935
    invalid gamma correction at x: 6 y:31, spng: 59430 0 31065 png: 9960 0 23161
    invalid gamma correction at x: 7 y:31, spng: 58337 0 33320 png: 57827 0 10370
    invalid gamma correction at x: 8 y:31, spng: 57219 0 35405 png: 34015 0 20106
    invalid gamma correction at x: 9 y:31, spng: 56075 0 37352 png: 3035 0 59793
    invalid gamma correction at x: 10 y:31, spng: 54901 0 39185 png: 30422 0 4505
    invalid gamma correction at x: 11 y:31, spng: 53697 0 40920 png: 49873 0 55455
    invalid gamma correction at x: 12 y:31, spng: 52460 0 42571 png: 60620 0 19366
    invalid gamma correction at x: 13 y:31, spng: 51186 0 44148 png: 62407 0 29868
    invalid gamma correction at x: 14 y:31, spng: 49873 0 45661 png: 53954 0 23986
    invalid gamma correction at x: 15 y:31, spng: 48518 0 47115 png: 34493 0 3256
    invalid gamma correction at x: 16 y:31, spng: 47115 0 48518 png: 3256 0 34493
    invalid gamma correction at x: 17 y:31, spng: 45661 0 49873 png: 23986 0 53954
    invalid gamma correction at x: 18 y:31, spng: 44148 0 51186 png: 29868 0 62407
    invalid gamma correction at x: 19 y:31, spng: 42571 0 52460 png: 19366 0 60620
    invalid gamma correction at x: 20 y:31, spng: 40920 0 53697 png: 55455 0 49873
    invalid gamma correction at x: 21 y:31, spng: 39185 0 54901 png: 4505 0 30422
    invalid gamma correction at x: 22 y:31, spng: 37352 0 56075 png: 59793 0 3035
    invalid gamma correction at x: 23 y:31, spng: 35405 0 57219 png: 20106 0 34015
    invalid gamma correction at x: 24 y:31, spng: 33320 0 58337 png: 10370 0 57827
    invalid gamma correction at x: 25 y:31, spng: 31065 0 59430 png: 23161 0 9960
    invalid gamma correction at x: 26 y:31, spng: 28595 0 60499 png: 45935 0 21484
    invalid gamma correction at x: 27 y:31, spng: 25837 0 61545 png: 60772 0 27376
    invalid gamma correction at x: 28 y:31, spng: 22670 0 62571 png: 36440 0 27892
    invalid gamma correction at x: 29 y:31, spng: 18854 0 63577 png: 42569 0 23288
    invalid gamma correction at x: 30 y:31, spng: 13758 0 64565 png: 48949 0 13820
    -------
     38/203 bggn4a16                                FAIL     0.01 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/bggn4a16.png
    --- Listing only the last 100 lines from a long log. ---
    alpha mismatch at x:24 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 24 y:29, spng: 41725 41725 41725 png: 64930 64930 64930
    alpha mismatch at x:25 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 25 y:29, spng: 37699 37699 37699 png: 17555 17555 17555
    alpha mismatch at x:26 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 26 y:29, spng: 33079 33079 33079 png: 14209 14209 14209
    alpha mismatch at x:27 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 27 y:29, spng: 27510 27510 27510 png: 30315 30315 30315
    alpha mismatch at x:28 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 28 y:29, spng: 20075 20075 20075 png: 27470 27470 27470
    alpha mismatch at x:29 y:29, spng: 8457 png: 2337
    alpha mismatch at x:30 y:29, spng: 4229 png: 34064
    invalid gamma correction at x: 30 y:29, spng: 19433 19433 19433 png: 59723 59723 59723
    invalid gamma correction at x: 31 y:29, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 0 y:30, spng: 18854 18854 18854 png: 42569 42569 42569
    alpha mismatch at x:1 y:30, spng: 4229 png: 34064
    alpha mismatch at x:2 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 2 y:30, spng: 19433 19433 19433 png: 59723 59723 59723
    alpha mismatch at x:3 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 3 y:30, spng: 26632 26632 26632 png: 2152 2152 2152
    alpha mismatch at x:4 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 4 y:30, spng: 32021 32021 32021 png: 5501 5501 5501
    alpha mismatch at x:5 y:30, spng: 4229 png: 34064
    alpha mismatch at x:6 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 6 y:30, spng: 40391 40391 40391 png: 51101 51101 51101
    alpha mismatch at x:7 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 7 y:30, spng: 43881 43881 43881 png: 27051 27051 27051
    alpha mismatch at x:8 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 8 y:30, spng: 47066 47066 47066 png: 55991 55991 55991
    alpha mismatch at x:9 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 9 y:30, spng: 50011 50011 50011 png: 23747 23747 23747
    alpha mismatch at x:10 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 10 y:30, spng: 52761 52761 52761 png: 6862 6862 6862
    alpha mismatch at x:11 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 11 y:30, spng: 55350 55350 55350 png: 14040 14040 14040
    alpha mismatch at x:12 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 12 y:30, spng: 57801 57801 57801 png: 51681 51681 51681
    alpha mismatch at x:13 y:30, spng: 4229 png: 34064
    alpha mismatch at x:14 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 14 y:30, spng: 62361 62361 62361 png: 39411 39411 39411
    alpha mismatch at x:15 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 15 y:30, spng: 64497 64497 64497 png: 62203 62203 62203
    alpha mismatch at x:16 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 16 y:30, spng: 64497 64497 64497 png: 62203 62203 62203
    alpha mismatch at x:17 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 17 y:30, spng: 62361 62361 62361 png: 39411 39411 39411
    alpha mismatch at x:18 y:30, spng: 4229 png: 34064
    alpha mismatch at x:19 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 19 y:30, spng: 57801 57801 57801 png: 51681 51681 51681
    alpha mismatch at x:20 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 20 y:30, spng: 55350 55350 55350 png: 14040 14040 14040
    alpha mismatch at x:21 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 21 y:30, spng: 52761 52761 52761 png: 6862 6862 6862
    alpha mismatch at x:22 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 22 y:30, spng: 50011 50011 50011 png: 23747 23747 23747
    alpha mismatch at x:23 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 23 y:30, spng: 47066 47066 47066 png: 55991 55991 55991
    alpha mismatch at x:24 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 24 y:30, spng: 43881 43881 43881 png: 27051 27051 27051
    alpha mismatch at x:25 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 25 y:30, spng: 40391 40391 40391 png: 51101 51101 51101
    alpha mismatch at x:26 y:30, spng: 4229 png: 34064
    alpha mismatch at x:27 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 27 y:30, spng: 32021 32021 32021 png: 5501 5501 5501
    alpha mismatch at x:28 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 28 y:30, spng: 26632 26632 26632 png: 2152 2152 2152
    alpha mismatch at x:29 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 29 y:30, spng: 19433 19433 19433 png: 59723 59723 59723
    alpha mismatch at x:30 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 31 y:30, spng: 18854 18854 18854 png: 42569 42569 42569
    invalid gamma correction at x: 1 y:31, spng: 18854 18854 18854 png: 42569 42569 42569
    invalid gamma correction at x: 2 y:31, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 3 y:31, spng: 31065 31065 31065 png: 23161 23161 23161
    invalid gamma correction at x: 4 y:31, spng: 35405 35405 35405 png: 20106 20106 20106
    invalid gamma correction at x: 5 y:31, spng: 39185 39185 39185 png: 4505 4505 4505
    invalid gamma correction at x: 6 y:31, spng: 42571 42571 42571 png: 19366 19366 19366
    invalid gamma correction at x: 7 y:31, spng: 45661 45661 45661 png: 23986 23986 23986
    invalid gamma correction at x: 8 y:31, spng: 48518 48518 48518 png: 34493 34493 34493
    invalid gamma correction at x: 9 y:31, spng: 51186 51186 51186 png: 62407 62407 62407
    invalid gamma correction at x: 10 y:31, spng: 53697 53697 53697 png: 49873 49873 49873
    invalid gamma correction at x: 11 y:31, spng: 56075 56075 56075 png: 3035 3035 3035
    invalid gamma correction at x: 13 y:31, spng: 60499 60499 60499 png: 21484 21484 21484
    invalid gamma correction at x: 14 y:31, spng: 62571 62571 62571 png: 27892 27892 27892
    invalid gamma correction at x: 15 y:31, spng: 64565 64565 64565 png: 13820 13820 13820
    invalid gamma correction at x: 16 y:31, spng: 64565 64565 64565 png: 13820 13820 13820
    invalid gamma correction at x: 17 y:31, spng: 62571 62571 62571 png: 27892 27892 27892
    invalid gamma correction at x: 18 y:31, spng: 60499 60499 60499 png: 21484 21484 21484
    invalid gamma correction at x: 20 y:31, spng: 56075 56075 56075 png: 3035 3035 3035
    invalid gamma correction at x: 21 y:31, spng: 53697 53697 53697 png: 49873 49873 49873
    invalid gamma correction at x: 22 y:31, spng: 51186 51186 51186 png: 62407 62407 62407
    invalid gamma correction at x: 23 y:31, spng: 48518 48518 48518 png: 34493 34493 34493
    invalid gamma correction at x: 24 y:31, spng: 45661 45661 45661 png: 23986 23986 23986
    invalid gamma correction at x: 25 y:31, spng: 42571 42571 42571 png: 19366 19366 19366
    invalid gamma correction at x: 26 y:31, spng: 39185 39185 39185 png: 4505 4505 4505
    invalid gamma correction at x: 27 y:31, spng: 35405 35405 35405 png: 20106 20106 20106
    invalid gamma correction at x: 28 y:31, spng: 31065 31065 31065 png: 23161 23161 23161
    invalid gamma correction at x: 29 y:31, spng: 25837 25837 25837 png: 60772 60772 60772
    invalid gamma correction at x: 30 y:31, spng: 18854 18854 18854 png: 42569 42569 42569
    -------
     40/203 bgyn6a16                                FAIL     0.02 s (exit status 1)
    --- command ---
    /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/tests/testsuite /builddir/build/BUILD/libspng-0.5.0/s390x-redhat-linux-gnu/../tests/images/bgyn6a16.png
    --- Listing only the last 100 lines from a long log. ---
    alpha mismatch at x:27 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 27 y:29, spng: 20075 0 63281 png: 27470 0 13047
    alpha mismatch at x:28 y:29, spng: 8457 png: 2337
    invalid gamma correction at x: 28 y:29, spng: 14649 0 64419 png: 14905 0 42235
    alpha mismatch at x:29 y:29, spng: 8457 png: 2337
    alpha mismatch at x:30 y:29, spng: 4229 png: 34064
    invalid gamma correction at x: 30 y:29, spng: 0 14179 64497 png: 0 25655 62203
    invalid gamma correction at x: 31 y:29, spng: 0 18854 63577 png: 0 42569 23288
    invalid gamma correction at x: 0 y:30, spng: 65535 13758 0 png: 65535 48949 0
    alpha mismatch at x:1 y:30, spng: 4229 png: 34064
    alpha mismatch at x:2 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 2 y:30, spng: 64497 0 14179 png: 62203 0 25655
    alpha mismatch at x:3 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 3 y:30, spng: 63440 0 19433 png: 53495 0 59723
    alpha mismatch at x:4 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 4 y:30, spng: 62361 0 23367 png: 39411 0 18267
    alpha mismatch at x:5 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 5 y:30, spng: 61259 0 26632 png: 19439 0 2152
    alpha mismatch at x:6 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 6 y:30, spng: 60132 0 29475 png: 58858 0 9075
    alpha mismatch at x:7 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 7 y:30, spng: 58981 0 32021 png: 26086 0 5501
    alpha mismatch at x:8 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 8 y:30, spng: 57801 0 34345 png: 51681 0 10630
    alpha mismatch at x:9 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 9 y:30, spng: 56591 0 36495 png: 4317 0 36750
    alpha mismatch at x:10 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 10 y:30, spng: 55350 0 38502 png: 14040 0 26262
    alpha mismatch at x:11 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 11 y:30, spng: 54074 0 40391 png: 15315 0 51101
    alpha mismatch at x:12 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 12 y:30, spng: 52761 0 42179 png: 6862 0 50340
    alpha mismatch at x:13 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 13 y:30, spng: 51409 0 43881 png: 53704 0 27051
    alpha mismatch at x:14 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 14 y:30, spng: 50011 0 45507 png: 23747 0 50097
    alpha mismatch at x:15 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 15 y:30, spng: 48565 0 47066 png: 46781 0 55991
    alpha mismatch at x:16 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 16 y:30, spng: 47066 0 48565 png: 55991 0 46781
    alpha mismatch at x:17 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 17 y:30, spng: 45507 0 50011 png: 50097 0 23747
    alpha mismatch at x:18 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 18 y:30, spng: 43881 0 51409 png: 27051 0 53704
    alpha mismatch at x:19 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 19 y:30, spng: 42179 0 52761 png: 50340 0 6862
    alpha mismatch at x:20 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 20 y:30, spng: 40391 0 54074 png: 51101 0 15315
    alpha mismatch at x:21 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 21 y:30, spng: 38502 0 55350 png: 26262 0 14040
    alpha mismatch at x:22 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 22 y:30, spng: 36495 0 56591 png: 36750 0 4317
    alpha mismatch at x:23 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 23 y:30, spng: 34345 0 57801 png: 10630 0 51681
    alpha mismatch at x:24 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 24 y:30, spng: 32021 0 58981 png: 5501 0 26086
    alpha mismatch at x:25 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 25 y:30, spng: 29475 0 60132 png: 9075 0 58858
    alpha mismatch at x:26 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 26 y:30, spng: 26632 0 61259 png: 2152 0 19439
    alpha mismatch at x:27 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 27 y:30, spng: 23367 0 62361 png: 18267 0 39411
    alpha mismatch at x:28 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 28 y:30, spng: 19433 0 63440 png: 59723 0 53495
    alpha mismatch at x:29 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 29 y:30, spng: 14179 0 64497 png: 25655 0 62203
    alpha mismatch at x:30 y:30, spng: 4229 png: 34064
    invalid gamma correction at x: 31 y:30, spng: 0 13758 64565 png: 0 48949 13820
    invalid gamma correction at x: 1 y:31, spng: 64565 0 13758 png: 13820 0 48949
    invalid gamma correction at x: 2 y:31, spng: 63577 0 18854 png: 23288 0 42569
    invalid gamma correction at x: 3 y:31, spng: 62571 0 22670 png: 27892 0 36440
    invalid gamma correction at x: 4 y:31, spng: 61545 0 25837 png: 27376 0 60772
    invalid gamma correction at x: 5 y:31, spng: 60499 0 28595 png: 21484 0 45935
    invalid gamma correction at x: 6 y:31, spng: 59430 0 31065 png: 9960 0 23161
    invalid gamma correction at x: 7 y:31, spng: 58337 0 33320 png: 57827 0 10370
    invalid gamma correction at x: 8 y:31, spng: 57219 0 35405 png: 34015 0 20106
    invalid gamma correction at x: 9 y:31, spng: 56075 0 37352 png: 3035 0 59793
    invalid gamma correction at x: 10 y:31, spng: 54901 0 39185 png: 30422 0 4505
    invalid gamma correction at x: 11 y:31, spng: 53697 0 40920 png: 49873 0 55455
    invalid gamma correction at x: 12 y:31, spng: 52460 0 42571 png: 60620 0 19366
    invalid gamma correction at x: 13 y:31, spng: 51186 0 44148 png: 62407 0 29868
    invalid gamma correction at x: 14 y:31, spng: 49873 0 45661 png: 53954 0 23986
    invalid gamma correction at x: 15 y:31, spng: 48518 0 47115 png: 34493 0 3256
    invalid gamma correction at x: 16 y:31, spng: 47115 0 48518 png: 3256 0 34493
    invalid gamma correction at x: 17 y:31, spng: 45661 0 49873 png: 23986 0 53954
    invalid gamma correction at x: 18 y:31, spng: 44148 0 51186 png: 29868 0 62407
    invalid gamma correction at x: 19 y:31, spng: 42571 0 52460 png: 19366 0 60620
    invalid gamma correction at x: 20 y:31, spng: 40920 0 53697 png: 55455 0 49873
    invalid gamma correction at x: 21 y:31, spng: 39185 0 54901 png: 4505 0 30422
    invalid gamma correction at x: 22 y:31, spng: 37352 0 56075 png: 59793 0 3035
    invalid gamma correction at x: 23 y:31, spng: 35405 0 57219 png: 20106 0 34015
    invalid gamma correction at x: 24 y:31, spng: 33320 0 58337 png: 10370 0 57827
    invalid gamma correction at x: 25 y:31, spng: 31065 0 59430 png: 23161 0 9960
    invalid gamma correction at x: 26 y:31, spng: 28595 0 60499 png: 45935 0 21484
    invalid gamma correction at x: 27 y:31, spng: 25837 0 61545 png: 60772 0 27376
    invalid gamma correction at x: 28 y:31, spng: 22670 0 62571 png: 36440 0 27892
    invalid gamma correction at x: 29 y:31, spng: 18854 0 63577 png: 42569 0 23288
    invalid gamma correction at x: 30 y:31, spng: 13758 0 64565 png: 48949 0 13820
    

    Logs: https://koji.fedoraproject.org/koji/taskinfo?taskID=37290442

    bug testsuite 
    opened by eclipseo 6
  • spng_encode_image() creating invalid png file

    spng_encode_image() creating invalid png file

    Describe the bug I am trying to create a PNG image from an array of pixels, in the format:

    typedef struct {
    	uint8_t r;
    	uint8_t g;
    	uint8_t b;
    	uint8_t a;
    } bitmap_pixel_t;
    
    typedef struct {
    	size_t width;
    	size_t height;
    	bitmap_pixel_t pixels[];
    } bitmap_t;
    

    After encoding the pixel data with spng_encode_image(), an invalid PNG file was produced.

    To Reproduce The code used is here: https://github.com/Somebody8331/spng_test/blob/main/main.c

    Expected behavior A PNG image of size 75x50px should be generated, its contents being fully red.

    Platform (please complete the following information):

    • Architecture: x86-64
    • OS: Windows
    • Version: The latest commit's code

    Additional context libspng was built with miniz

    bug invalid 
    opened by Somebody8331 5
  • A PNG libspng can't read

    A PNG libspng can't read

    Hello again,

    We've had a file reported on libvips which libspng can't read:

    https://github.com/libvips/libvips/issues/1930

    It seems to have a text chunk of almost 100MB (!!) containing a truncated zlib stream. With 0.6.1 and git master libspng I see:

    $ vipsheader huge.png 
    huge.png: 1200x800 uchar, 4 bands, srgb, pngload
    $ vips copy huge.png x.jpg
    pngload: non-recoverable state
    

    Obviously skipping the outrageous text chunk (perhaps with a warning?) would be the best solution for us.

    libpng compat 
    opened by jcupitt 5
  • New grayscale formats for libpng compatibility

    New grayscale formats for libpng compatibility

    To implement the functionality of png_set_tRNS_to_alpha() from libpng we need versions of all PNG formats with an added alpha channel:

    • [x] SPNG_FMT_GA8 - conversion from all <=8bit grayscale formats without an alpha channel

    • [x] SPNG_FMT_GA16 - ~same as above~ conversion from 16-bit grayscale only

    For implementing png_set_expand_gray_1_2_4_to_8():

    • [x] SPNG_FMT_G8 - conversion from all <=8bit grayscale formats without an alpha channel

    This leaves out SPNG_FMT_G16 for now, this can be added later.

    The enums which haven't been shipped in a stable release will change values:

    enum spng_format
    {
        SPNG_FMT_RGBA8 = 1,
        SPNG_FMT_RGBA16 = 2,
        SPNG_FMT_RGB8 = 4,
        SPNG_FMT_RGB16 = 8,
    
        SPNG_FMT_GA8 = 16,
        SPNG_FMT_GA16 = 32,
        SPNG_FMT_G8 = 64,
        SPNG_FMT_G16 = 128,
    
        SPNG_FMT_PNG = 256,
        SPNG_FMT_RAW = 512
    };
    
    enhancement API 
    opened by randy408 5
  • Is this a bug or for algorithm purpose?

    Is this a bug or for algorithm purpose?

    Hi, Randy @randy408

    I notice this line: https://github.com/randy408/libspng/blob/e26770d44b900ceaa80df936792b5b4fb0ffd564/spng/spng.c#L490

    which is in this function: https://github.com/randy408/libspng/blob/e26770d44b900ceaa80df936792b5b4fb0ffd564/spng/spng.c#L486-L498

    But the definition use uint8_t , instead of uint32_t type: https://github.com/randy408/libspng/blob/e26770d44b900ceaa80df936792b5b4fb0ffd564/spng/spng.c#L200-L206

    Is this a bug in L490?

    opened by zchrissirhcz 4
  • Clang: error: type '_Float32' (aka 'float') in generic association compatible with previously specified type 'float'

    Clang: error: type '_Float32' (aka 'float') in generic association compatible with previously specified type 'float'

    Describe the bug Trying compile libspng 0.7.3 for OpenMandriva Cooker using Clang 15.0.6 but then compilation failing due:

    ../spng/spng.c:3798:23: error: type '_Float32' (aka 'float') in generic association compatible with previously specified type 'float'
    DEBUG util.py:445:          if(FP_ZERO == fpclassify(exponent)) return decode_err(ctx, SPNG_EGAMA);
    

    Full build log: https://file-store.openmandriva.org/api/v1/file_stores/ccd393ecfd1257da1281363cc8dec49a0ce36864.log?show=true

    Worth to add that compilation works fine with GCC.

    To Reproduce Try compile with Clang 15.0.6

    Expected behavior Build with Clang works.

    Platform (please complete the following information):

    • Architecture: [all]
    • OS: [Linux OpenMandriva Cooker]
    • Version [v0.7.3]
    bug 
    opened by AngryPenguinPL 1
  • Add palette index check support

    Add palette index check support

    • [x] Add option enum

    • [x] Implement check (encode & decode)

    • [x] Update documentation (encode, decode, migration guide)

    • [ ] Test file(s)

    • [ ] Unit test(s)

    • [ ] Update fuzz targets

    Fixes #234 #233

    opened by randy408 0
  • Debian packaging

    Debian packaging

    Hi! I'm looking into packaging this library for Debian as it looks really interesting :)

    I've noticed that you already have a debian/ directory containing some partial packaging files; could you please drop it, or move it to a separate branch? I appreciate your efforts, but having a debian/ directory upstream slightly complicates things for downstream.

    Also, what buildsystem would you recommend me to use? I was thinking to use Meson, as I usually have a good experience with it, but let me know if CMake is the "official" one.

    packaging 
    opened by Tachi107 11
  • spng_encode_image doesn't fail if a pixel index is bigger than spng_plte::n_entries

    spng_encode_image doesn't fail if a pixel index is bigger than spng_plte::n_entries

    Describe the bug

    When calling spng_encode_image with spng_set_plte where the pal n_entries is 255 but the image data contains an index that is exactly 255 it gets clamped to 254 instead of failing.

    To Reproduce

    See the following code that saves a PNG:

    (https://github.com/paulsapps/alive_reversing/blob/36ed9e560207e88afac77ba0694377ba50258820/Source/relive_lib/data_conversion/PNGFile.cpp#L351)

    Specifically that a pal is set with 255 entries and that the source image data has at least 1 pixel with an index value of 255.

    Expected behavior spng_encode_image should fail due to one of the source image index values being outside of the range of the pal n_entries.

    Platform (please complete the following information):

    Additional context This auto clamping to max pal value resulted in an annoying rendering bug that took a while to track down to this :). Would have been much faster to find if the png encode failed due to the pal index being out of bounds.

    bug 
    opened by paulsapps 1
  • TRUECOLOR vs RGB8

    TRUECOLOR vs RGB8

    In the following struct,

    struct spng_ihdr
    {
        uint32_t width;
        uint32_t height;
        uint8_t bit_depth;
        uint8_t color_type;
        uint8_t compression_method;
        uint8_t filter_method;
        uint8_t interlace_method;
    };
    

    Shouldn't color_type be of type enum spng_color_type rather than uint8_t ?

    Also maybe this isn't a bug but it's worth noting that it's pretty confusing to have two different types enum spng_color_type and enum spng_format that have names with identical meaning, but different enum values such as SPNG_COLOR_TYPE_TRUECOLOR_ALPHA and SPNG_FMT_RGBA8. The reason I mention this is because it is often tempting to do something like: int fmt = ihdr.color_type But alas, you cannot and it takes awhile getting familiar with the API before you realize why it doesn't work.

    question 
    opened by GhostCore07 4
Releases(v0.7.3)
  • v0.7.3(Dec 8, 2022)

    Fixes

    • Fixed includes when used as CMake subproject (@benediktschmitt)
    • Make finding zlib in-tree easier for CMake (@michaelmalonenz)
    • Fixed Meson build under mingw32 (@neheb)
    • Fixed -Wshadow warning (@Loobinex, @xtremeqg)
    • Fixed references, typos in documentation (@ocpalo, @danieljennings, @timgates42)
    • Other minor fixes and cleanup

    Other

    • Updated Meson zlib wrap to v1.2.13
    • Removed debian subdirectory with outdated files
    Source code(tar.gz)
    Source code(zip)
  • v0.7.2(Feb 11, 2022)

    Fixes

    • Re-enabled ARM NEON optimizations for indexed color images
    • Fixed encoder options set with spng_set_option() not being respected in some cases
    • Fixed spng_get_png_buffer() not setting an error code in some cases
    • Fixed encoder heap overflow with specially crafted images (https://github.com/randy408/libspng/issues/196)
    • Fixed 4GB progressive decode/encode limitation on 32-bit (https://github.com/randy408/libspng/issues/198)
    • Updated error string for SPNG_EBUFSIZ

    New

    • Decoder now exposes an estimate of image compression level through SPNG_IMG_COMPRESSION_LEVEL, see Decode options
    • Added documentation for all decode and encode options, added notes on encoder configuration

    Other

    • Added encode fuzzer to ensure robustness of code; Fuzzer will run on PR's and continuously on OSS-Fuzz alongside the decode fuzzer
    • Updated example code
    Source code(tar.gz)
    Source code(zip)
  • v0.7.1(Nov 24, 2021)

  • v0.7.0(Sep 28, 2021)

    This release is funded by NLNet!

    To support further development consider sponsoring the project on OpenCollective.

    New

    • Encode support with interlacing for all bit depths and color types

    • Progressive image encoding API

    • Adaptive filtering, custom filter selection

    • Chunk write support for all standard chunks including oFFs and eXIf extensions

    • Added functions for configuring the encoder, decoder: spng_set_option(), spng_get_option()

    • Added options to configure zlib, chunk count limit and handling of unknown chunks

    • Added spng_get_gama_int(), spng_set_gama_int(), spng_decode_chunks()

    • Read and write support for unknown chunks

    Decoder

    • Filter- and palette expansions optimizations using ARM NEON intrinsics, improved decode performance for common use cases:

    • ~30% faster with true color and 19% faster with indexed color images (details)

    • NEON optimizations are enabled by default on ARM64

    Changes

    • Unknown chunks are now ignored by default, this can be configured with spng_set_option()

    • Introduced a default chunk count limit of 1000, this is independent of other limits

    Changes - v0.7.0-rc3

    • Encoder no longer writes to an internal buffer by default, the SPNG_ENCODE_TO_BUFFER option must be set

    Fixes

    • bKGD, tRNS chunk high bits are now preserved

    • Force cdecl calling convention for allocator callbacks on Windows (@danielkrupinski)

    Improved

    • Expanded testsuite to verify chunk data, encoding of PNG's against libpng

    • Expanded documentation, added libpng migration guide

    Source code(tar.gz)
    Source code(zip)
  • v0.7.0-rc3(Jul 29, 2021)

    This release is funded by NLNet!

    This is a release candidate, the API may change for the stable release!

    Share your feedback on the API here or on Gitter!

    New

    • Encode support with interlacing for all bit depths and color types

    • Progressive image encoding

    • Encode to a stream, file or buffer managed by the library

    • Low overhead adaptive filtering, custom filter selection

    • Chunk write support for all standard chunks including oFFs and eXIf extensions, unknown chunks

    • ARM NEON decoder optimizations (since v0.7.0-rc2)

    • Added spng_get_png_buffer(), this function returns the encoded PNG buffer if no output stream or file is set.

    • Added functions for configuring the encoder, decoder: spng_set_option(), spng_get_option()

    • Added location field to struct spng_unknown_chunk, this specifies the relative location of the chunk (new since v0.7.0-rc1)

    • Added spng_get_gama_int(), spng_set_gama_int()

    • Added spng_encode_chunks()

    Changes

    • Unknown chunks are now ignored by default, this can be configured with spng_set_option().

    Fixes

    • bKGD, tRNS chunk high bits are now preserved

    Improved

    • Expanded testsuite to verify chunk data, encoding of PNG's against libpng
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0-rc2(May 10, 2021)

    This release is funded by NLNet!

    This is a release candidate, the API may change for the stable release!

    Share your feedback on the API here or on Gitter!

    New

    • Filter- and palette expansions optimizations using ARM NEON intrinsics, improved decode performance for common use cases:

    • ~30% faster with true color and 19% faster with indexed color images (details)

    • The new optimizations are enabled by default on ARM64

    Source code(tar.gz)
    Source code(zip)
  • v0.7.0-rc1(May 4, 2021)

  • v0.6.3(Apr 23, 2021)

    This release is funded by NLNet!

    Improved

    • Improved decoder robustness, malformed images are less likely to cause a decoder error

    • Expanded documentation on decoder error handling

    • Expanded testsuite, code cleanups

    • Fixed MSVC warnings

    Upcoming features

    The next minor release is v0.7.0 and will include:

    • Unknown chunk support

    • ARM NEON optimizations

    • Encode support

    Source code(tar.gz)
    Source code(zip)
  • v0.6.2(Jan 28, 2021)

    New

    • The CRC action SPNG_CRC_DISCARD is now supported

    Bugfixes

    • Fixed handling of SPNG_CTX_IGNORE_ADLER32
    • Introduced a workaround for a miniz bug that can lead to an infinite loop - #150
    • Fixed spng_get_text/splt() not reading chunks before setting n_text/n_splt

    Changes

    • Dropped use of fmin() for DJGPP compatibility
    • Dropped use of #warning in favor of #pragma message
    • spng_get_<chunk>() functions will read chunks before checking all arguments

    Changes to the default behavior were made for libpng compatibility:

    • Changed the default CRC action for ancillary chunks from SPNG_CRC_ERROR to SPNG_CRC_DISCARD
    • Setting SPNG_CRC_USE now also ignores checksums in DEFLATE streams
    • Ancillary chunks with zlib data errors are discarded by default
    • Ignore sBIT chunk length for truecolor alpha images - #130
    • Ignore bKGD chunk length for truecolor (alpha) images - #156

    Known issues

    • Non-critical errors may still cause an image to not load - #132
    Source code(tar.gz)
    Source code(zip)
  • v0.6.1(Sep 16, 2020)

    Bugfixes

    • Fixed return value in example.c for valid images
    • Fixed MSVC build with miniz (Matthew Albrecht)
    • Fixed argument types for spng__zalloc()
    • Fixed some signedness warnings

    Changes

    Changes to the default behavior were made for libpng compatibility:

    • Ignore tRNS chunks for grayscale alpha / truecolor alpha images - #118
    • Do not check the text field of tEXt, zTXt chunks - #123
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Jul 13, 2020)

    This release is backward compatible.

    New

    • Progressive image decode support, added new functions:

      • spng_decode_scanline() - Decodes a single scanline
      • spng_decode_row() - Decodes and deinterlaces a scanline
      • spng_get_row_info() - Get current scanline, row information
    • Added support for reading tEXt, iTXt, zTXt and iCCP color profile chunks, all standard chunks are supported in this release.

    • Added support for building with miniz, spng.c/h and miniz.c/h can be used together without additional dependencies

    • Added output format SPNG_FMT_PNG, it represents the PNG's format in host-endian (thanks to Matthew Stadelman for initial implementation)

    • Added output format SPNG_FMT_RAW, it represents the PNG's format in big-endian (Matthew Stadelman)

    • Added output format SPNG_FMT_RGB8, conversion is supported from any color type and bit depth

    • Added grayscale output formats SPNG_FMT_G8, SPNG_FMT_GA8 and SPNG_FMT_GA16, in this release conversion is only supported from a subset of grayscale and bit depth combinations, see documentation for details

    • Added support for decoding from a FILE* with spng_set_png_file()

    • Added SPNG_CTX_IGNORE_ADLER32 context flag to ignore checksums in DEFLATE streams

    • Added enums for filter types and interlace method

    • Added Meson option use_miniz and compiler option SPNG_USE_MINIZ for building with miniz

    • Added Meson option benchmarks to run benchmarks provided by spngt, this requires Git LFS.

    • Added Meson option static_zlib to link the static version of zlib

    • Multiversioned defilter_up() function (enabled for GCC + glibc)

    Changes

    • spng_decode_image() takes a void* for the output buffer (was unsigned char*)

    • Reaching chunk size- or cache limits is now handled as an out-of-memory error

    • Out-of-range palette indices are handled as black opaque pixels when decoding, this matches libpng's default behavior

    • PNG image row length and output row length is now limited to 2^32-1 (UINT32_MAX)

    Bugfixes

    • Fixed an IDAT streaming bug (Mathieu Mallet)
    • Fixed CMake install issues
    • Fixed bKGD handling and a testsuite issue on big-endian
    • Fixed setting of PLTE presence bit (Matthew Stadelman)
    • Added missing error condition for indexed images without a palette
    • Fixed zlib constness warnings
    • Fixed ordering checks for tRNS, hIST and bKGD chunks

    Known issues

    • Decoding to SPNG_FMT_G8, SPNG_FMT_GA8 and SPNG_FMT_GA16 output formats is not supported for all PNG color type and bit depth combinations, see documentation for details
    • Gamma correction is not implemented for SPNG_FMT_PNG, SPNG_FMT_G8, SPNG_FMT_GA8 and SPNG_FMT_GA16
    • spng_crc_set_action() is partially implemented, SPNG_CRC_DISCARD has no effect
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0-rc1(May 13, 2020)

    This is a release candidate, the API may change for the stable release! Share your feedback on the API here or on Gitter!

    UPDATE: This release is broken, use https://github.com/randy408/libspng/commit/a0b7323558e0f45e899cd7b5f8ddde2e18c9709e for testing progressive decode functionality with SPNG_FMT_PNG.

    New features:

    • Progressive image decode support, added new functions:
      • spng_decode_scanline() - decodes a single scanline
      • spng_decode_row() - decodes and deinterlaces a scanline
      • spng_get_row_info() - get scanline/row info including the filter type
    • New output format SPNG_FMT_RGB8, conversion is supported from any color type and bit depth
    • New output format SPNG_FMT_PNG, this always matches the PNG's format in host-endian
    • Added support for decoding from a FILE* via spng_set_png_file()
    • Added SPNG_CTX_IGNORE_ADLER32 context flag to ignore checksums in DEFLATE streams
    • Enums for filter types, interlace method
    • New Meson option benchmarks to run benchmarks provided by spngt, this requires Git LFS.
    • New Meson option to link the static version of zlib: static_zlib
    • Multiversioned defilter_up() function (enabled for GCC + glibc)

    Documentation:

    • Added notes on build optimization level
    • Added section on decoding arbitrary files

    Bugfixes:

    • Fixed an IDAT streaming bug (Mathieu Mallet)
    • Fixed CMake install issues
    • Fixed bKGD handling and a testsuite issue on big-endian (Robert-André Mauchin)
    • Fixed setting of PLTE presence bit (Matthew Stadelman)
    • Added missing error condition for indexed images without a palette
    • Fixed zlib constness warnings
    • Fixed ordering checks for tRNS, hIST and bKGD chunks
    Source code(tar.gz)
    Source code(zip)
An image and texture viewer for tga, png, apng, exr, dds, gif, hdr, jpg, tif, ico, webp, and bmp files

An image and texture viewer for tga, png, apng, exr, dds, gif, hdr, jpg, tif, ico, webp, and bmp files. Uses Dear ImGui, OpenGL, and Tacent. Useful for game devs as it displays information like the presence of an alpha channel and querying specific pixels for their colour.

Tristan Grimmer 159 Dec 31, 2022
Arduino PNG image decoder library

An 'embedded-friendly' (aka Arduino) PNG image decoding library

Larry Bank 102 Jan 6, 2023
PNG encoder and decoder in C and C++.

PNG encoder and decoder in C and C++, without dependencies

Lode Vandevenne 1.7k Dec 25, 2022
pngtostl is a program that converts a PNG image into STL 3D models

pngtostl is a program that converts a PNG image into a litophane, in STL format, suitable to be printed by entry level 3D printers.

Salvatore Sanfilippo 157 Dec 17, 2022
Simple, generally spec-compliant, hacky PNG Decoder written in C99.

Simple, generally spec-compliant, hacky PNG Decoder written in C99.

cristei 2 Nov 2, 2021
Very fast C++ .PNG writer for 24/32bpp images.

fpng Very fast C++ .PNG writer for 24/32bpp images. fpng.cpp was written to see just how fast you can write .PNG's without sacrificing too much compre

Rich Geldreich 639 Dec 25, 2022
Demo of a fast PNG encoder.

Fast PNG Encoder This is a proof-of-concept fast PNG encoder that uses AVX2 and a special Huffman table to encode images faster. Speed on a single cor

Luca Versari 58 Dec 27, 2022
Rate-Distortion Optimized Lossy PNG Encoding Tool

rdopng is a command line tool which uses LZ match optimization, Lagrangian multiplier rate distortion optimization (RDO), a simple perceptual error tolerance model, and Oklab-based colorspace error metrics to encode 24/32bpp PNG files which are 30-80% smaller relative to lodepng/libpng.

Rich Geldreich 40 Dec 24, 2022
Fast streaming PNG<->QOI converter with some compression-improving extensions

QOIG Fast streaming PNG<->QOI converter with some compression-improving extensions. Can achieve 1%-10% better compression than QOI without sacrificing

David Rutter 3 Oct 3, 2022
Dear IMGUI + Render + Window handling, amalgamation in two files ready to use

imgui-app Imgui-app is an amalgamation of two amazing projects Dear Imgui and Sokol libraries into two files to make it very easy to start working wit

PpluX 138 Jan 8, 2023
An AV1 Image (AVIF) file format plug-in for Adobe® Photoshop®

avif-format An AV1 Image (AVIF) file format plug-in for Adobe® Photoshop®. Single images can be loaded and saved using 8, 10 or 12 bits-per-channel, i

Nicholas Hayes 100 Dec 20, 2022
The “Quite OK Image” format for fast, lossless image compression

The “Quite OK Image” format for fast, lossless image compression

Dominic Szablewski 6k Dec 30, 2022
QOY - The "Quite OK YCbCr420A" format for fast, lossless image compression

QOY - The "Quite OK YCbCr420A" format for fast, lossless* image compression ( * colorspace conversion to/from RGBA is lossy, if used ) Single-file MIT

Chainfire 19 Oct 1, 2022
This program converts APNG animations into animated GIF format

apng2gif This project has been in disrepair for long time. Recently, there is need to change the number of loops in apng file. So I used it to modify

Ted Zyzsdy 2 Oct 27, 2022
Python envelope for the popular C library libjpeg for handling JPEG files.

jpeglib Python envelope for the popular C library libjpeg for handling JPEG files. libjpeg offers full control over compression and decompression and

Martin Benes 8 Dec 21, 2022
A utility to fix intentionally corrupted UPX packed files.

UPX Fixer Some C code to repair corrupt p_info header on UPX! packed malware. It fixes two variants I found that were pretty common. There are many ot

Larry W. Cashdollar 52 Oct 14, 2022
Embed image data directly to HTML files.

compact_html Welcome! Embed image data directly to HTML files. Thanks: cpp-base64: Base64 encoding and decoding with c++. cpprestsdk: The C++ REST SDK

Frost Sigh 43 Aug 21, 2022
You can use this to compile the code and output images into a word doc for assignment purposes

Code_n_Ouput_to_docx You can use this to compile the code and output images into a word doc for assignment purposes Basic requirements: Python 3.7 or

Aaditya Prabu K 0 Aug 21, 2022