simonpena.com Una mezcla heterogénea de tecnología y desvaríos

21Sep/12Off

Announcing the Gallery Tilt Shift plugin for the Nokia N9

A couple of weeks ago, we at Igalia got a number of plugins published in the Nokia Store: Enlarge & Shrink, Gallery Tilt Shift plugin, and Facerecognition Reset Plugin. We had them ready for some time already, but still it was very difficult to pass the Nokia Store Quality Assurance: there is a list of valid directories where a Debian package can install its files, and they had missed the ones for Gallery plugins. So, in order to finally get over that problem, my friend and colleague Andrés had to "fight" with the Store QA people quite a bit: don't forget to thank him for this!

Although I developed only the Tilt Shift one, I will briefly introduce you the other two as well :-)

The Enlarge & Shrink plugin is an add-on to the built-in Gallery application. You can use it to apply a radial distortion to a picture, so they look like enlarge and shrink effects (also known as punch or pinch).

The Face Recognition Reset plugin also behaves as an add-on, but doesn't work on individual images. Instead, it forces the deletion or un/protection of the facerecognition database, something that you might need if for whatever reason the database gets corrupted.

And finally, the Tilt Shift plugin lets you make a picture look as a miniature, by applying the following transformations:

  1. Blurring the image using a Gaussian Blur filter
  2. Keep an area of the image focused (either vertically or horizontally)
  3. Combine both parts of the image using a Gaussian filter (so the focus is lost gradually from the focused area to the rest of the image)
  4. Increase the saturation, so the colors seems those of a miniature
Saint Isaac's Square - Saint Petersburg, before applying the effect

Saint Isaac's Square - Saint Petersburg, before applying the effect

Saint Isaac's Square - Saint Petersburg, after applying the effect

Saint Isaac's Square - Saint Petersburg, after applying the effect

There is a problem, however. Gallery uses Quill, and Quill was designed to use tiles in order to minimize the memory footprint and work happily in mobile devices. That tiling mechanism finally proved to be less flexible than it should, so for those edit operations where you can't rely only on the local information in the tile... things won't work.

You can still use these plugins for small images. Gallery doesn't do tiling on images of 512x512px or smaller, so that is what is currently supported. Another option is writing a complete new application to get this miniature effect (either using Quill with a different tiling configuration or not using it at all). You can check the full explanation at the GitHub page of the project.

All these plugins are Open Source, so you can go to their page at GitHub: Enlarge & Shrink, Facerecognition Reset, Gallery Tilt Shift

Take a look at all applications published by Igalia at the Nokia Store.

Download from the Nokia Store

Posted by Simón

Comments (2) Trackbacks (1)
  1. 512×512 ?
    why ? That’s totaly unprofesional…
    You should make an auto resize or make it work for default size…

    • Hi,

      I don’t know if you are a technical user or a regular one, so I will provide two explanations.

      Simple explanation: I don’t have the technical means to resize the images automatically. Other technical limitations prevent me to apply the effect to default size images. Read this as “this is the best that could be done with the resources available”

      Technical explanation: As I mentioned, Gallery applies tiling to images to improve memory handling. If I resize the image from inside a plugin, I would be taking each individual tile and resizing it to the target size, but it would keep the tiles. Then, when applying the effect to those tiles, there would be visual artifacts in the borders of each tile. The images need to be resized and saved so that the new ones aren’t split into tiles.

      This is a problem with the architecture of Quill, at the core of the MeeGo Image Editor, since it was designed with a different kind of plugins in mind.

      Since the plugin is Open Source, everybody can check the algorithm I’m using and write a full-program (as opposed to a plugin) which does the operation on the full image, without applying tiling. In that case, this would work.