Giter Club home page Giter Club logo

imagine-vips's Introduction

libvips adapter for Imagine

This package provides a libvips integration for Imagine. The VIPS image processing system is a very fast, multi-threaded image processing library with low memory needs.

Version 8.7 or higher of libvips is highly recommended. paste and rotate by angles other than multipliers of 90 are not supported with older versions of libvips.

You also need the php-vips-ext extension version 1.0.8 or higher (you need to install that manually) and the php-vips classes (automatically installed by composer)

The most (to us at least) important stuff is implemented. There may be edge cases, which are not covered yet, but those will be hopefully fixed soon. Report them, if you encounter one.

Even it this is not a 1.0.0 release yet, the library is somehow battle tested as we use it on rokka.io.

Installation

Just run the following

composer require rokka/imagine-vips

and then you can use it like any other Imagine implementation with eg.

$imagine = new \Imagine\Vips\Imagine();

$size    = new Imagine\Image\Box(40, 40);
$mode    = Imagine\Image\ImageInterface::THUMBNAIL_INSET;

$imagine->open('/path/to/large_image.jpg')
    ->thumbnail($size, $mode)
    ->save('/path/to/thumbnail.png')

Missing stuff

Needs vips 8.6 or higher:

  • paste
  • rotate by angles other than multipliers of 90

Not implemented yet

  • Font
  • Drawer
  • Methods:
    • fill
    • histogram
  • Filters:
    • colorize

Most of them are not that important to us, so any contributions are welcome. Drawer for example may be a low hanging fruit, if you want to get into it.

Layers and Animated gifs

If you have vips 8.7.0, layers and animated gifs should work like with imagick.

Saving files

Natively supported by libvips for saving are jpg, png, webp and tiff. If you have vips 8.7.0 with imagemagick support, it will use vips "magicksave" for all other formats. It not, this adapter falls back to the Imagick or GD implementation.

Contribution

Any contribution is very appreciated, just file an issue or send a Pull Request.

imagine-vips's People

Contributors

alexander-schranz avatar chregu avatar kdambekalns avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.