Monday, 11 January 2016

What's new in 8.2

vips has just updated to version 8.2. Here's what's new!

New mapim operator

This new operator lets you easily make any 2D image transform. You make an image containing a set of pixel coordinates, then mapim can use that to resample another image.
There was a blog post introducing this new feature.

New bandjoin_const operator

This operator adds constant bands to an image, for example:
$ vips bandjoin_const x.png y.png 255
will take the three-band PNG x.png, add an extra band where every element has the value 255, and write it to y.png. There wasn't really a convenient way to do this from the command-line before.

The C++ and Python interface will automatically use this new operator if they can, for a nice speedup.

New arrayjoin operator

This operator joins an array of images up in a rectangular grid. It's very fast and only needs a small amount of memory.

Previously, you needed to do a long series of separate pairwise joins. This worked well for smallish arrays, but very large arrays, more than a few thousand images, could cause stack overflows. The new arrayjoin operator can happily join 20,000 images or more in a single step.

Improvements to resize

The resize operator has seen some useful improvements.
  • Quality should be up, thanks to a smarter anti-alias filter. Images should look sharper and have more detail, but with no extra ringing. 
  • Memory use should be down, thanks to a more intelligent cache sizing scheme.
  • Speed should be better, especially for large shrinks on non-JPEG images. The box filter used for the first stage of large shrinks has been rewritten to be vectorizable.
  • On some very threaded systems with some images while under heavy load it could occasionally produce black tiles. Hopefully this is now fixed. 

Speed and memory improvements

There have been some nice improvements to memory handling and to execution speed.
  • As noted above, vips_shrink(), the vips box filter, has been rewritten to be vectorizable and is now about 2x faster.  It also now handles complex numbers.
  • The bilinear interpolator has been rewritten (again) and is now at least 2x faster. 
  • libvips uses a lot less space on the C stack during evaluation, so you can now make pipelines 2x longer.
  • Various caches have been tuned and should take less space for most operations.
  • Embarrassingly, there was some debugging code left turned on in the pixel buffer handling. Complex operations on large images should be noticeably faster.

File format improvements

As usual, the operators to read and write the various file formats that vips supports have seen some improvements.
  • TIFF save has better support for alpha channels. TIFF load and save now knows about the IMAGEDESCRIPTION tag. An option to the TIFF saver lets you write all the image metadata as XML in the IMAGEDESCRIPTION tag. The TIFF loader is faster and needs less memory.
  • The JPEG save operation makes smaller files with the strip option. 
  • The DeepZoom save defaults have changed, following advice from the DeepZoom developers. The pyramids should now need less memory to view. It also strips image tiles by default.

Better Windows binary

The thing that makes the Windows binary has been rewritten. The binary is now 64-bit and should work well with Visual Studio. We've tested loading the DLL into node and Python and it all seems fine.

Plus some other small improvements and bug fixes. Many thanks to everyone who contributed!

No comments:

Post a Comment