Jump to the content

On this page:

Information about the Nexime image manipulation and enhancement software

Page navigation:


What is Nexime

PHP is a well-known, open source scripting language which powers many of today's websites. This site as well is made with PHP. By default, it has just limited graphical capabilities when it comes to processing photographic images. Nexime is an extension for PHP which dramatically increases this capabilities.

Nexime allows for server-side image processing. With Nexime, a PHP or Zend engine programmer can very easily perform tasks like changing contrast, brightness, color saturation and add sharpness. But also special effect like sepia, emboss bump mapping, color inverse and photographic filters are just as easy to do. In fact, because Nexime is fully programmable, a programmer can add new effects and use them on the fly without reconfiguring, recompilation or restarting the server.

Live demo!

Here you can see some of the capabilities of Nexime. Above, you see the original image. Below, the same image processed with Nexime. You can expirement with the features, and see the result immediately!

The original:
Nexime image processing:
processed with Nexime You can chose up to five operation which will be applied to the original photo. The operations are stacked; every operation is applied to the result of the previous step.


For the sake of simplicity only a subset of the possibilities is available here.


Traditional Content management Systems are well suited to manage the textual content of a site. And often users can upload images to the CMS to be used on the site. But the possibilities to alter or improve the images by rotation, resizing, applying effects, are severely limited.

Nexime can help. It is specially well suited for this kind of online image manipulation. Apart from managing text, users of a CMS can also manage photos and images. All without the need for extra software.

At the moment Nexime is being used for the online photoalbum. Nexime automatically scales, rotates, create thumbnails, improves the quality and optimizes the photos for online use.
If the album manager decides the photos should be shown with a higher resolution, Nexime takes care of the rescaling on the fly. For that, the original photo is used, to maintain optimal quality.

The 3D-page also uses Nexime. There, Nexime combines two photos into one, to be viewed with 3D (anaglyph) glasses.


The Nexime system consist of three layers:

  • The PHP extension. Written in ANSI C, it forms the low-level heart of the systems. All processing is done in the extension.
  • BIOps, Basic Image Operations. Writtn in PHP, it provides the programmer with a low-level API for frequently used image operations.
  • Graphlets. Written in PHP, graphlets provide easy to use, stackable image functions. Very well suited for storing a series of manipulations in a database.

The Nexime PHP extension

The base

All graphic processing is done by the Nexime PHP/Zend engine extension. It forms the heart of the system. The extension is written in ANSI C, which makes it very fast and highly portable to other platforms.


Almost every effect and filter, including those demonstrated in the live demo here, are programmed in so called PixelPrograms. This is a scripting language, specially designed for graphic an photo manipulation, and is directly available for PHP programmers. The programmer can easily change existing effects, or add new.


What we call "true color images" are images which have 24 bits of color information per pixel, or 24bpp, which translates to 8 bit per color channel, or 8bpc. Because Nexime is very well suited to perform severeral operations in succession on a single image, (e.g. sharpning, contrast enhancing, increasing color saturation, gamma correction) those 8bpc are not enough to maintain optimal quality. Therefor, Nexime uses 32-bit floating point numbers per channel, resulting in 96 bits per pixel of color information!

Although this extra data slows down processing a bit, Nexime on this server (a 800MHz AMD Duron CPU) fast enough to perform several operations per second on a image.

The advantages outweigh the disadvantages by far:

  • No loss in color resolution of the original image, which avoids banding effects.
  • The possibility to calculate with "whiter than white" and "blacker than black" colors, or High Dynamic Range images (HDR). This prevents clipping of values during processing.

Interested in Nexime?

Currently Nexime closed-source, under my own control. Due to other activities I don't have time to really make it public. That's unfortunate, since Nexime is a powerful and flexible technique which can be widely used. Nexime is written in ANSI C, so it should be easy to port to other platforms (currently it runs on Windows with PHP 4.3 and Apache 1.3)

I see two options:

  1. Open Source. Unfortunately I don't have any experience in developing Open Source software and its pitfalls. But I think it is great if Nexime becomes Open Source.
  2. Commercial use. There are many sites where I believe Nexime really could help. On sites with online auctions and real estate sites, Nexime could automatically improve the quality of uploaded photographs. For a CMS, Nexime can provide PhotoShop-like features, to make e.g. product photos really stand out.
If you're interested in Nexime, send me an e-mail. I can send you an extensive English manual/reference with more details. Perhaps we can extend Nexime to make your site look even better!
Site Information