What's New in 7.30
From VipsWiki
| Revision as of 13:26, 5 August 2012 John (Talk | contribs) (→Improvements to sequential mode) ← Previous diff |
Revision as of 13:33, 5 August 2012 John (Talk | contribs) Next diff → |
||
| Line 17: | Line 17: | ||
| Plus the usual minor speed-ups, portability improvements, enhancements and bug fixes. [[What's New in 7.28]] is still there if you're interested. | Plus the usual minor speed-ups, portability improvements, enhancements and bug fixes. [[What's New in 7.28]] is still there if you're interested. | ||
| - | === nip2 improvements === | + | === Save as Deep Zoom === |
| - | If you click View / Definition Browser in nip2's programming window, you'll see this new thing appear on the right: | + | libvips now has a [http://en.wikipedia.org/wiki/Deep_Zoom DeepZoom] writer. This is based on the code from the tiff pyramid writer: it scans the input image once and writes all layers of the pyramid at the same time. It also uses a set of worker threads to write separate tiles in parallel, producing a further speedup. |
| - | [[Image:7.30-snapshot1.png|center|300px]] | + | Use it like this: |
| - | It shows all definitions in this scope, with their help text. You can type into the search box at the top and it'll show just definitions with that text in their name or help. | + | <pre> |
| + | $ vips dzsave huge.tif my_dz_dir | ||
| + | </pre> | ||
| - | As you type in the main text area, it'll search left from the cursor and show all matches for that identifier. In other words, as you type, it shows all possible completions and their documentation. | + | will create a directory called <code>my_dz_dir</code> and build a set of directories in there containing the tiles. |
| - | [[Image:7.30-snapshot2.png|center|300px]] | + | A set of flags let you set overlap and tile size. |
| === Improvements to sequential mode === | === Improvements to sequential mode === | ||
| Line 56: | Line 58: | ||
| (cut a 100x100 pixel area out of a tif image 100 pixels down from the top of the file) will now run in sequential mode. It will read the first 100 scan lines and throw them away, then read the next 100 and save a square of pixels to tiny.jpg, and then stop. It will not need to read the whole of huge.tif. | (cut a 100x100 pixel area out of a tif image 100 pixels down from the top of the file) will now run in sequential mode. It will read the first 100 scan lines and throw them away, then read the next 100 and save a square of pixels to tiny.jpg, and then stop. It will not need to read the whole of huge.tif. | ||
| + | |||
| + | === nip2 improvements === | ||
| + | |||
| + | If you click View / Definition Browser in nip2's programming window, you'll see this new thing appear on the right: | ||
| + | |||
| + | [[Image:7.30-snapshot1.png|center|300px]] | ||
| + | |||
| + | It shows all definitions in this scope, with their help text. You can type into the search box at the top and it'll show just definitions with that text in their name or help. | ||
| + | |||
| + | As you type in the main text area, it'll search left from the cursor and show all matches for that identifier. In other words, as you type, it shows all possible completions and their documentation. | ||
| + | |||
| + | [[Image:7.30-snapshot2.png|center|300px]] | ||
Revision as of 13:33, 5 August 2012
This page summarises the changes for version 7.30. We have a detailed VIPS ChangeLog and nip2 ChangeLog, but as headlines:
- Improved sequential mode
- vips-7.28 introduced sequential mode, a new file IO mode where pixels could be streamed directly from compressed input files to compressed output files without any separate decompression stage. This has seen several useful improvements, see below.
- Save as DeepZoom
- libvips can now save images in DeepZoom format. This (should be) the fastest and most memory-efficient DeepZoom writer around, I think. See below. Many thanks to Alexander Koshman for this feature.
- Zombie pipelines
- libvips has a new feature to save memory --- at the end of every calculation it puts pipelines into a "zombie" state. Zombie pipelines are dead, but yet still living. This feature gives a large reduction in memory use in languages with lazy garbage-collection, like Ruby.
- Much better Ruby support
- ruby-vips, the main Ruby binding for libvips, is much better. There's also carrierwave-vips, a plugin for the popular carrierwave Ruby web framework image upload system, which uses libvips as the image processing engine. We have two related repositories of benchmarks: vips-benchmarks, which times ruby-vips against other Ruby image processing systems, and carrierwave-vips-benchmarks which shows how carrierwave speeds up with a vips backend. Stanislaw Pankevich has worked very hard on all this.
- Better threading support
- You can now pass images between threads and use results calculated in one to help another. Previously you needed to be rather careful if you wanted to use libvips from many threads.
- More nip2 menu items
- nip2 now has menu items to calculate skew and kurtosis, two useful properties of distributions. The menu items for finding and applying colour calibrations from images of Macbeth charts are much faster and support a new workflow where images are linearised by their embedded ICC profiles.
- nip2 Definition Browser
- This is handy if you do any programming in nip2. See below.
Plus the usual minor speed-ups, portability improvements, enhancements and bug fixes. What's New in 7.28 is still there if you're interested.
Save as Deep Zoom
libvips now has a DeepZoom writer. This is based on the code from the tiff pyramid writer: it scans the input image once and writes all layers of the pyramid at the same time. It also uses a set of worker threads to write separate tiles in parallel, producing a further speedup.
Use it like this:
$ vips dzsave huge.tif my_dz_dir
will create a directory called my_dz_dir and build a set of directories in there containing the tiles.
A set of flags let you set overlap and tile size.
Improvements to sequential mode
libvips-7.28 introduced sequential mode, a new file IO mode where pixels could be streamed directly from compressed input files to compressed output files without any separate decompression stage.
This has been improved in several ways. First, it's now available in vips7 via a new "rs" open mode:
IMAGE *im = im_open (filename, "rs");
Opens a file for sequential read.
Secondly, it's now turned on automatically for vips8 command-line operations when possible. For example:
$ vips copy huge1.tif huge2.tif
will copy the tiff image without having a separate decompression stage. This can give a huge speed up.
Finally, sequential mode is able to skip ahead if necessary. For example:
$ vips extract_area huge.tif tiny.jpg 0 100 100 100
(cut a 100x100 pixel area out of a tif image 100 pixels down from the top of the file) will now run in sequential mode. It will read the first 100 scan lines and throw them away, then read the next 100 and save a square of pixels to tiny.jpg, and then stop. It will not need to read the whole of huge.tif.
nip2 improvements
If you click View / Definition Browser in nip2's programming window, you'll see this new thing appear on the right:
It shows all definitions in this scope, with their help text. You can type into the search box at the top and it'll show just definitions with that text in their name or help.
As you type in the main text area, it'll search left from the cursor and show all matches for that identifier. In other words, as you type, it shows all possible completions and their documentation.
