"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/How-it-works.md" between
vips-8.10.6.tar.gz and vips-8.11.0.tar.gz

About: VIPS is a free image processing system (see also the GUI nip2).

How-it-works.md  (vips-8.10.6):How-it-works.md  (vips-8.11.0)
skipping to change at line 114 skipping to change at line 114
Like most threaded image processing systems, all VIPS operations have to Like most threaded image processing systems, all VIPS operations have to
be free of side-effects. In other words, operations cannot modify images, be free of side-effects. In other words, operations cannot modify images,
they can only create new images. This could result in a lot of copying if they can only create new images. This could result in a lot of copying if
an operation is only making a small change to a large image so VIPS has a an operation is only making a small change to a large image so VIPS has a
set of mechanisms to copy image areas by just adjusting pointers. Most of set of mechanisms to copy image areas by just adjusting pointers. Most of
the time no actual copying is necessary and you can perform operations on the time no actual copying is necessary and you can perform operations on
large images at low cost. large images at low cost.
**Run-time code generation** **Run-time code generation**
VIPS uses [Orc](http://code.entropywave.com/orc/), a run-time compiler, to VIPS uses
generate code for some operations. For example, to compute a convolution <ulink url="https://gstreamer.freedesktop.org/modules/orc.html">Orc</ulink>, a
on an 8-bit image, VIPS will examine the convolution matrix and the source run-time compiler, to generate code for some operations. For example, to
image and generate a tiny program to calculate the convolution. This program compute a convolution on an 8-bit image, VIPS will examine the convolution
is then "compiled" to the vector instruction set for your CPU, for example matrix and the source image and generate a tiny program to calculate the
SSE3 on most x86 processors. convolution. This program is then "compiled" to the vector instruction set
for your CPU, for example SSE3 on most x86 processors.
Run-time vector code generation typically speeds operations up by a factor Run-time vector code generation typically speeds operations up by a factor
of three or four. of three or four.
**Joining operations together** **Joining operations together**
The region create / prepare / prepare / free calls you use to get pixels The region create / prepare / prepare / free calls you use to get pixels
from an image are an exact parallel to the start / generate / generate / from an image are an exact parallel to the start / generate / generate /
stop calls that images use to create pixels. In fact, they are the same: stop calls that images use to create pixels. In fact, they are the same:
a region on a partial image holds the state created by that image for the a region on a partial image holds the state created by that image for the
skipping to change at line 165 skipping to change at line 166
operations per output tile, regardless of the pipeline length or complexity. operations per output tile, regardless of the pipeline length or complexity.
**Data sources** **Data sources**
VIPS has data sources which can supply pixels for processing from a variety VIPS has data sources which can supply pixels for processing from a variety
of sources. VIPS can stream images from files in VIPS native format, from of sources. VIPS can stream images from files in VIPS native format, from
tiled TIFF files, from binary PPM/PGM/PBM/PFM, from Radiance (HDR) files, tiled TIFF files, from binary PPM/PGM/PBM/PFM, from Radiance (HDR) files,
from FITS images and from tiled OpenEXR images. VIPS will automatically from FITS images and from tiled OpenEXR images. VIPS will automatically
unpack other formats to temporary disc files for you but this can unpack other formats to temporary disc files for you but this can
obviously generate a lot of disc traffic. It also has a special obviously generate a lot of disc traffic. It also has a special
sequential mode for streaming operations on non-random-access sequential mode for streaming operations on non-random-access formats. Another
formats. Another section in these docs explains [how libvips opens a section in these docs explains <ulink url="How-it-opens-files.md.html">how
file](How-it-opens-files.md.html). One libvips opens a file</ulink>. One of the sources uses the <ulink
of the sources uses the [ImageMagick](http://www.imagemagick.org) (or url="http://www.imagemagick.org">ImageMagick</ulink> (or optionally <ulink
optionally [GraphicsMagick](http://www.graphicsmagick.org) library, so url="http://www.graphicsmagick.org">GraphicsMagick</ulink> library, so VIPS
VIPS can read any image format that these libraries can read. can read any image format that these libraries can read.
VIPS images are held on disc as a 64-byte header containing basic image VIPS images are held on disc as a 64-byte header containing basic image
information like width, height, bands and format, then the image data as information like width, height, bands and format, then the image data as
a single large block of pixels, left-to-right and top-to-bottom, then an a single large block of pixels, left-to-right and top-to-bottom, then an
XML extension block holding all the image metadata, such as ICC profiles XML extension block holding all the image metadata, such as ICC profiles
and EXIF blocks. and EXIF blocks.
When reading from a large VIPS image (or any other format with the same When reading from a large VIPS image (or any other format with the same
structure on disc, such as binary PPM), VIPS keeps a set of small rolling structure on disc, such as binary PPM), VIPS keeps a set of small rolling
windows into the file, some small number of scanlines in size. As pixels windows into the file, some small number of scanlines in size. As pixels
skipping to change at line 246 skipping to change at line 247
"invalidate" signal on the image they are called on and this signal makes "invalidate" signal on the image they are called on and this signal makes
all downstream operations and caches drop their contents.) all downstream operations and caches drop their contents.)
**Operation database and APIs** **Operation database and APIs**
VIPS has around 300 image processing operations written in this style. Each VIPS has around 300 image processing operations written in this style. Each
operation is a GObject class. You can use the standard GObject calls to walk operation is a GObject class. You can use the standard GObject calls to walk
the class hierarchy and discover operations, and libvips adds a small amount the class hierarchy and discover operations, and libvips adds a small amount
of extra introspection metadata to handle things like optional arguments. of extra introspection metadata to handle things like optional arguments.
The [C API](using-from-c.html) is a set of simple wrappers which create The <ulink url="using-from-c.html">C API</ulink> is a set of simple wrappers
class instances for you. The [C++ API](using-from-cpp.html) is a little which create class instances for you. The <ulink url="using-from-cpp.html">C++
fancier and adds things like automatic object lifetime management. The API</ulink> is a little fancier and adds things like automatic object lifetime
[command-line interface](using-cli.html) uses introspection to run any vips management. The <ulink url="using-cli.html"> command-line interface</ulink>
operation in the class hierarchy. uses introspection to run any vips operation in the class hierarchy.
There are bindings for [many other There are bindings for <ulink url="https://libvips.github.io/libvips">many
languages](https://libvips.github.io/libvips/) on many platforms. Most of other languages</ulink> on many platforms. Most of these bindings use the
these bindings use the introspection system to generate the binding at introspection system to generate the binding at run-time.
run-time.
**Snip** **Snip**
The VIPS GUI, nip2, has its own scripting language called Snip. Snip is a The VIPS GUI, nip2, has its own scripting language called Snip. Snip is a
lazy, higher-order, purely functional, object oriented language. Almost all lazy, higher-order, purely functional, object oriented language. Almost all
of nip2's menus are implemented in it, and nip2 workspaces are Snip programs. of nip2's menus are implemented in it, and nip2 workspaces are Snip programs.
VIPS operations listed in the operation database appear as Snip functions. For VIPS operations listed in the operation database appear as Snip functions. For
example, `abs` can be used from Snip as: example, `abs` can be used from Snip as:
 End of changes. 3 change blocks. 
22 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)