All Projects → HappySeaFox → sail

HappySeaFox / sail

Licence: MIT license
The missing small and fast image decoding library for humans (not for machines) ⛵ https://sail.software

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to sail

imagecodecs
Image transformation, compression, and decompression codecs. Forked from https://pypi.org/project/imagecodecs
Stars: ✭ 56 (-72.82%)
Mutual labels:  png, jpeg, tiff, webp, jpeg2000, avif
Imageprocessor
📷 A fluent wrapper around System.Drawing for the processing of image files.
Stars: ✭ 2,452 (+1090.29%)
Mutual labels:  png, jpeg, tiff, bmp, gif, webp
stbi-sharp
C# wrapper around stb_image.h and qoi.h
Stars: ✭ 17 (-91.75%)
Mutual labels:  png, jpeg, tga, bmp, qoi
gfxprim
Open-source modular 2D bitmap graphics library with emphasis on speed and correctness.
Stars: ✭ 32 (-84.47%)
Mutual labels:  png, jpeg, bmp, gif, webp
Govips
A lightning fast image processing and resizing library for Go
Stars: ✭ 442 (+114.56%)
Mutual labels:  png, jpeg, tiff, gif, webp
StbSharp
C# port of the famous C framework
Stars: ✭ 62 (-69.9%)
Mutual labels:  png, jpeg, tga, bmp, gif
imagor
Fast, Docker-ready image processing server in Go and libvips
Stars: ✭ 2,276 (+1004.85%)
Mutual labels:  png, jpeg, gif, webp, gif-animation
Libvips
A fast image processing library with low memory needs.
Stars: ✭ 6,094 (+2858.25%)
Mutual labels:  png, jpeg, tiff, gif, webp
Sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
Stars: ✭ 21,131 (+10157.77%)
Mutual labels:  png, jpeg, tiff, webp, avif
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (+279.61%)
Mutual labels:  png, jpeg, tiff, gif, webp
Imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
Stars: ✭ 4,107 (+1893.69%)
Mutual labels:  png, jpeg, gif, webp
Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (+720.39%)
Mutual labels:  png, jpeg, gif, webp
Imagesharp
📷 A modern, cross-platform, 2D Graphics library for .NET
Stars: ✭ 5,186 (+2417.48%)
Mutual labels:  png, jpeg, bmp, gif
Sdwebimage
Asynchronous image downloader with cache support as a UIImageView category
Stars: ✭ 23,928 (+11515.53%)
Mutual labels:  png, jpeg, gif, webp
Flyimg
Dockerized PHP7 application runs as a Microservice to resize and crop images on the fly. Get optimised images with MozJPEG, WebP or PNG using ImageMagick. Includes face detection, cropping, face blurring, image rotation and many other options. Abstract storage based on FlySystem in order to store images on any provider (local, AWS S3...).
Stars: ✭ 762 (+269.9%)
Mutual labels:  png, jpeg, gif, webp
Optimizt
CLI image optimization tool
Stars: ✭ 594 (+188.35%)
Mutual labels:  png, jpeg, gif, webp
Format parser
file metadata parsing, done cheap
Stars: ✭ 46 (-77.67%)
Mutual labels:  png, jpeg, tiff, gif
Metadata Extractor
Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Stars: ✭ 1,972 (+857.28%)
Mutual labels:  png, jpeg, tiff, webp
Gulp Image
Optimize PNG, JPEG, GIF, SVG images with gulp task.
Stars: ✭ 213 (+3.4%)
Mutual labels:  png, jpeg, gif
Grunt Image
Optimize PNG, JPEG, GIF, SVG images with grunt task.
Stars: ✭ 201 (-2.43%)
Mutual labels:  png, jpeg, gif

Squirrel Abstract Image Library

The missing fast and easy-to-use image decoding library for humans (not for machines).

Travis Build Status Language grade: C/C++ Latest release

Target AudienceFeaturesImage FormatsGetting StartedFAQ

SAIL is a format-agnostic cross-platform image decoding library providing rich APIs, from one-liners to complex use cases with custom I/O sources. It enables a client to load and save static, animated, multi-paged images along with their meta data and ICC profiles.

GIF Demo Screenshot

Target audience

  • Image viewers
  • Game developers
  • Anyone who needs to load or save images in different image formats with a clean and comprehensive API

Features overview

  • Easy-to-use thread-safe C and C++ interfaces
  • Versatile APIs: junior, advanced, deep diver, and technical diver
  • Input/output: files, memory, custom I/O streams
  • Load by file suffixes, paths, and magic numbers
  • Save pixels as close as possible to the source
  • Codec-specific tuning options like PNG filters. See FORMATS
  • Meta data support: text comments, EXIF, ICC profiles
  • Access to the image properties w/o decoding pixels (probing)
  • Access to the source image properties
  • Adding or updating image codecs with ease demonstrated by Intel [*]
  • The best MIME icons in the computer industry 😄

* One day Intel demonstrated the advantages of their IPP technology in speeding up decoding JPEG and JPEG2000 images with the help of ksquirrel-libs, the predecessor of SAIL.

Features NOT provided

  • Image editing capabilities (filtering, distortion, scaling, etc.)
  • Color space conversion functions
  • Color management functions (applying ICC profiles etc.)
  • EXIF rotation

Supported image formats

N Image format Operations Dependencies
1 APNG R libpng+APNG patch
2 AVIF R libavif
3 BMP R
4 GIF R giflib
.. ...
6 JPEG RW libjpeg-turbo
7 JPEG2000 R jasper
8 PCX R
9 PNG RW libpng
10 QOI RW
11 SVG R resvg
12 TGA R
13 TIFF RW libtiff
.. ...
15 WEBP R libwebp
.. ...

See the full list here. Work to add more image formats is ongoing.

Benchmarks

Benchmark

Time to load and output default pixels (without explicit conversion) was measured. See BENCHMARKS.

Preferred installation method

  • Windows: conan, vcpkg
  • macOS: conan, brew
  • Linux: native packages if available, conan, vcpkg

See BUILDING.

APIs overview

SAIL provides four levels of APIs, depending on your needs. Let's have a quick look at the junior level.

C:

struct sail_image *image;

SAIL_TRY(sail_load_from_file(path, &image));

/*
 * Handle the image pixels here.
 * Use image->width, image->height, image->bytes_per_line,
 * image->pixel_format, and image->pixels for that.
 *
 * In particular, you can convert it to a different pixel format with functions
 * from libsail-manip. With sail_convert_image(), for example.
 */

sail_destroy_image(image);

C++:

sail::image image(path);

// Handle the image and its pixels here.
// Use image.width(), image.height(), image.bytes_per_line(),
// image.pixel_format(), and image.pixels() for that.
//
// In particular, you can convert it to a different pixel format with image::convert().

It's pretty easy, isn't it? 😄 See also FAQ.

Programming languages

Programming language: C11
Bindings: C++11

Competitors

Differences from other image decoding libraries

  • Easily extensible with new image format plugins
  • Easy-to-use API providing expected business entities - images, palettes, pixels etc.
  • Access to source pixel data (supported by the most codecs)
  • Access to the image properties w/o decoding pixel data (probing)

Development status

SAIL is ready for every day use. However, it's still under heavy development. The API can be changed at any time breaking binary and source compatibility. Consider opening a GitHub issue if you have any feature requests or issue reports. Your help (pull requests etc.) is highly welcomed.

Have questions or issues?

Opening a GitHub issue is the preferred way of communicating and solving problems.

See FAQ for more.

Architecture overview

SAIL is written in pure C11 w/o using any third-party libraries (except for codecs). It also provides bindings to C++.

SAIL codecs

SAIL codecs is the deepest level. This is a set of standalone, dynamically loaded codecs (SO on Linux and DLL on Windows). They implement actual decoding and encoding capabilities. End-users never work with codecs directly. They always use abstract, high-level APIs in libsail for that.

Every codec is accompanied with a so called codec info (description) file which is just a plain text file. It describes what the codec can actually do: what pixel formats it can load and output, what compression types it supports, and more.

By default, SAIL loads codecs on demand. To preload them, use sail_init_with_flags(SAIL_FLAG_PRELOAD_CODECS).

libsail-common

libsail-common holds common data types (images, pixel formats, I/O abstractions etc.) and a small set of functions shared between SAIL codecs and the high-level APIs in libsail.

libsail

libsail is a feature-rich, high-level API. It provides comprehensive and lightweight interfaces to decode and encode images. End-users implementing C applications always work with libsail.

libsail-manip

libsail-manip is a collection of image manipulation functions. For example, conversion functions from one pixel format to another.

libsail-c++

libsail-c++ is a C++ binding to libsail. End-users implementing C++ applications may choose between libsail and libsail-c++. Using libsail-c++ is always recommended, as it's much more simple to use in C++ applications.

Building

See BUILDING.

Philosophy

Philosophy of SAIL is modularization and simplicity.

Image codecs are architectured to be standalone dynamically loaded files. Any future hypothetical improvements will be implemented as separate client libraries. So a user is always able to choose what to use (i.e. to link against) and what not to use.

Support

If you like the project, please consider starring the repository.

Author

Dmitry Baryshev

License

Released under the MIT license.

Copyright (c) 2020-2022 Dmitry Baryshev

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].