Friday, 2 September 2011

Major new stable version, 7.26

The new version is finally officially out. Here's what's new:
New operations 
nip2 has a few new menus for drawing, ImageMagick operators and matrix conversion. There's a new approximate convolution operator that can be more than 100x faster than standard convolution, see below.
More permissive operators 
All vips operators will now convert their inputs if necessary. This means you can add two images of different sizes, for example, without having to expand one of them first, see below.
Better file format support 
The TIFF, JPEG, PNG and FITS readers and writers have all seen useful improvements, see below.
Faster nip2 
nip2 now starts quickly enough to not need a splash screen, and should feel more responsive when in use.
VIPS rewrite 
The whole of vips has been cleaned up and reorganised. There's now gtk-doc documentation for the whole library. The vips core, iofuncs, has been replaced and is 5,000 lines smaller, simpler, and much more flexible. There's full source compatibility with the old API, but not binary, you will need to recompile, see below.
Plus the usual minor speed-ups, portability improvements, enhancements and bug fixes.

New operations 

nip2 has a new menu: Filter / Magick. This has a number of simple ImageMagick filters wrapped up as nip2 operations. On Windows and OS X, nip2 includes its own copy of ImageMagick, so there are no other packages to install.

There's a new Histogram / Convert to Histogram menu item which makes moving between images, matrices and histograms simpler.

There are a set of new items in Matrix / New which make building matrices easier.

Filter / Convolution / Custom Blur/Sharpen has a new precision setting, Approximate. This is slightly less accurate, but typically 10x faster. There's a lot of machinery behind the scenes to support this which needs writing up. It can actually do arbitrary 2D convolutions, though this isn't exposed yet.

Another new menu, Image / Draw, lets you use the paintbox operations like flood, rectangle and circle from menus. This can be very handy for making masks.

More permissive operators 

libvips operators used to be rather strict. When adding two images, for example, they had to be exactly the same size. This seemed like a good idea, since it forced users to think about these issues, but it was also very annoying and caused endless mysterious error messages.

libvips has a new philosophy: only fail with an error if you really have to. All operations will now do their best to do something, even if the images are not quite correct. All operations now automatically format-alike, band-alike and size-alike as much as they can.

File formats

The file format support has had quite a bit of work:
  • Better JPEG handling, including support for embedded thumbnails and decompression from memory.
  • Better PNG handling, including support for image resolution tags, 1, 2, 4 bit palette images, and the libpng-1.5 API.
  • Better TIFF handling, including faster loading and support for 1, 2, and 4 bit palette images.
  • Much faster FITS load and save, much lower memory use, better metadata support, FITS write.

VIPS rewrite

The vips rewrite has been going on for a few years now. 7.26 is probably the largest change so far: the old vips core has been removed and the whole library is now sitting on top of the new system we've been building. There's full compatibility with the old API, but the bones of a new, much better system are there.

The next stage is to start rewriting all the operators to use the new API, and to expose the new system to C++, Python and other languages. There's a little more work necessary on the new C API as well.

2 comments:

  1. Well done on the new version.
    I'm new to VIPS.
    Was hoping someone can point me to more detailed information about how to wrap other image libraries.

    I use command line tools that distort photos with perspective, vignetting, chromatic aberration, lens correction, and re-projecting simultaneously, using libtiff and OpenEXR. Hoping I can use VIPS in place of these libraries without a major re-write.

    ReplyDelete
  2. Hi, sorry, I just found your comment in the moderation page.

    Do you want to add new operations to libvips? The vips manual covers this:

    http://www.vips.ecs.soton.ac.uk/supported/7.26/doc/html/vipsmanual/vipsmanualch3.html#x19-840003

    That's the vips7 API. Be aware that the upcoming vips8 API is different :-(

    On the plus side, vips8 will be source compatible with vips7 (so any code you write should still work), and that porting code from vips7 to vips8 is pretty simple.

    ReplyDelete