Image decoding library SAIL 0.9.0-pre12 release

Several major updates to the SAIL image decoding library have been published, providing a C re-branding of codecs from the long-deprecated KSquirrel image viewer, but with a high-level abstract API and numerous improvements. The library is ready for use, but is still being continuously improved. Binary and API compatibility is not yet guaranteed. Demonstration.

SAIL Features

  • Fast and easy to use library;
  • Written in C11 with C++17 bindings;
  • Support for image formats is implemented by dynamically loaded codecs that can be removed and added regardless of the client side;
  • Reading from a file, memory, own sources;
  • Support for multi-page and animated images;
  • Support for popular formats is still done using the appropriate libraries libjpeg, libpng, etc.
  • Cross-platform: Linux, Windows, macOS;
  • "Probing" - obtaining information about the image without decoding pixels;
  • Human entity names (no FIMULTIBITMAP);
  • Reading and writing ICC profiles;
  • Returns RGBA or BGRA pixels;
  • Returns original pixels (for example, CMYK) if supported by the codec;

List of changes since last post:

  • Significantly improved and simplified API. Was: struct sail_context *context; SAIL_TRY(sail_init(&context)); struct sail_image *image; unsigned char *image_pixels; SAIL_TRY(sail_read(path, context, &image, (void **)&image_pixels)); ...free(image_pixels); sail_destroy_image(image);

    Became: struct sail_image *image; SAIL_TRY(sail_read_file(path, &image); ... sail_destroy_image(image);

  • Added BMP, GIF, TIFF formats;
  • Availability in VCPKG on all platforms except UWP;
  • Comparative performance tests published;
  • C++ binding translated to C++17;
  • The memory allocation functions are collected in one place so that they can be easily replaced with your own, but at the moment this can only be done by recompilation;
  • Users can now use CMake find_package() to connect SAIL;
  • Added the possibility of static compilation (SAIL_STATIC=ON);
  • Added ability to compile all codecs into one shared library (SAIL_COMBINE_CODECS=ON);
  • Work has begun on adding tests based on Β΅nit;

Recommended installation method

  • Linux - vcpkg, Debian rules also available
  • windows-vcpkg
  • macOS-brew

Source: opennet.ru

Add a comment