Supported

From VipsWiki
(Redirected from Stable)
Jump to: navigation, search

About vips-7.40

This is the current supported version of vips. Check the documentation page. We have a special page for What's New in 7.40 in headline form. We have a detailed VIPS ChangeLog and nip2 ChangeLog.

Installing

Unix

VIPS comes as part of many popular versions of Unix. If you're running Debian, Ubuntu, FreeBSD, Gentoo, Arch Linux or RedHat check your package manager and click install. The links page has details on how to find the packages if you have trouble.

You may find that the version packaged for your system is not the latest one. If you need a more recent version, you will have to build yourself from the files on the supported download page. Check the notes below.

Windows

There's a windows installer, called typically nip2-7.x.x-setup.zip in the supported download page.

nip2 has some problems with UTF-8 and filename encoding conversions at the moment. If you have problems loading files, try checking for accented characters in filenames.

Development on Windows

You need vips-dev-7.x.x.zip in the supported download page. This has a complete set of headers and DLLs for vips and all of the libraries it needs.

These binaries use msvcrt.dll, so you need to build your applications against this runtime as well, unless you are an expert. It'll 'just work' if you use mingw.

There are other zips you can use to build a complete vips system from source, check the Build on windows page.

This tiny test program:

#include <iostream>
#include <vips/vips>

int
main( int argc, char **argv )
{
        /* Check arguments.
         */
        if( argc != 3 ) {
                std::cerr << "usage: " << argv[0] << " infile outfile\n";
                exit( 1 );
        }

        try {
                vips::VImage fred( argv[1] );

                fred.invert().write( argv[2] );
        }
        catch( vips::VError e ) {
                e.perror( argv[0] );
        }

        return( 0 );
}

Compiles and links on Windows with this ugly command-line:

i686-w64-mingw32-g++ \
        -mms-bitfields -march=i686 \
        -I.../vips-dev-7.40.4/include \
        -I.../vips-dev-7.40.4/include/glib-2.0 \
        -I.../vips-dev-7.40.4/lib/glib-2.0/include \
        hello.cc \
        -L.../vips-dev-7.40.4/lib \
        -lvipsCC -lvips -lgsf-1 -lz -ljpeg -lxml2 -lfftw3 -lm \
        -lMagickWand-6.Q16 -llcms2 \
        -lopenslide -lcfitsio -lpangoft2-1.0 -ltiff -lpng14 -lexif \
        -lMagickCore-6.Q16 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 \
        -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl \
        -o hello.exe

On linux/osx you can use pkg-config and it's just:

g++ hello.cc `pkg-config vipsCC --cflags --libs`

Mac OS X

There's a .dmg, called typically nip2-7.x.x.app.dmg in the supported download page. There's a problem with rendering text into images, but otherwise it seems OK.

See Build on OS X for hints on building yourself or getting a library made.

From source

Go to the supported download page and grab the latest nip2-7.x.x.tar.gz and vips-7.x.x.tar.gz. See the READMEs in the packages for build and install notes, but generally the usual ./configure ; make ; sudo make install will work, provided you have all the development packages they need installed.

For example, most systems will come with the glib runtime, but will not include all of the header files you need to compile programs that use glib. On Debian-family systems the glib runtime is in a package called libglib2.0-0 but the headers (development files) are in a package called libglib2.0-dev.

Install -dev versions of packages until configure runs cleanly, then try make; sudo make install. When configure finishes it prints a summary of the packages it found and what components it will build. Look at the list carefully and make sure everything you need is there.

Examples

Go to the supported download page and grab vips-examples-7.x.tar.gz for a collection of simple examples and a sample plugin. There are some test images too, hence the large download.

The Hello World page has some very simple programs you can use to test your build environment.