Iniciar sesión

Redondela en Foto

GSoC 2015 summary

::

F-Spot timeline working.

It's sad to announce that F-Spot/gtk3 branch is not ready, but at least there are some advances due to this GSoC. I'm writing this post as a summary of that I've been able to achieve.

I've continued my last summer work by being able to fix the main image displaying, known in F-Spot as edit mode, getting F-Spot displaying photos again, to later add some other missing decorations.

Then I've faced problems with the gtk-sharp3 package that is included in current Ubuntu out of the box, basically lots of critical warnings which I've managed to suppress simply installing gtk-sharp development version —easy, but only after debugging, searching the web, and creating two little programs to see if the error was with F-Spot or with something between gtk-sharp or GLib itself.

By the way, more or less in a couple of weeks I'll be posting some instructions about installing F-Spot/gtk3 branch and gtk-sharp development version in an Ubuntu out of the box, since some steps are needed other that the classic ./autogen.sh && make && make install in order to get F-Spot working —not sure if that's fault of gtk-sharp or F-Spot itself... maybe that post could lead to fix it by someone, since I don't know a bit about Debian packaging.

That was June, but July was a more difficult month, having problems with photo thumbnails and the lack of Gnome.Thumbnail class, and fullscreen mode opacity and scrollbars.

I've reached August being able to solve a little problem about icon view mode —the mode where you see the photo thumbnails to manage them— that was annoying for a while: If you was in that mode and tried to resize the icon view area, dragging the separator between it and the sidebar, while resizing the icon view area would be blinking a lot. The reason was only one line of code that was making F-Spot process too much events. I've also restored the timeline —the thing you can see in the screenshot on top of this post above the icon view area.

August was inverted mostly walking in circles with the filmstrip, which is an area in edit more where you can still see the thumbnails to navigate while displaying a large photo. I've got blocked due to some null variable that almost got me crazy, since looking at the code it was supposed to never become null, so I've started wondering the problem and discarding things like multithreading, until I've figured out that it could be something related to C# binding problems again —but the glue-code of Pixbuf.CopyArea (the method natively complaining about the null) is really simple. I've started to loop trough the code until I've luckily decided to add some basic Console.WriteLine on gtk-sharp to debug that way, and it happened that I couldn't see those messages anywhere... A mystery until I've realized some *-sharp.dll files inside F-Spot's installation directory: Some kind of dirty F-Spot installation in my system. Deleting those files solved the mystery.

Sadly, the only thing I have now is a non-displaying filmstrip —you can click in the area where it is supposed to be and you would see the current photo changing, but nothing gets drawn in that filmstrip area and having it activated makes F-Spot/gtk3 even more unstable and slower.

But well, from my point of view —maybe not the F-Spot one— this have been another great Google Summer of Code learning about various components and way of doing this of the GNOME platform. Thanks a lot to Google, GNOME and Stephen Shaw —my mentor— for this (:

Tags: [en], GNOME, Google Summer of Code, F-Spot, Mono, gtk-sharp, Planet GNOME

Comentarios (0)

Difficult month with F-Spot

::

I'm having kind of a hard month with F-Spot.

I've started by trying to look for some way to fix one problem with photo thumbnails —they are regenerated every time F-Spot starts—, and I've found that the reason is the lack of Gnome.Thumbnail class. That one is needed to get the correct path for storing the thumbnails in a GNOME environment, and I couldn't figure out a way to get Gnome.Thumbnail using gtk-sharp-3.

So I've switched to another problem, this time with F-Spot's fullscreen mode, which stopped working after the change from gtk-sharp-3 stable to development version referenced in my last post. After some failed attempts to understand and find the problem using the debugger with MonoDevelop, I've got it with the help of GTK+ Inspector: Playing with FullScreenView, the window used to paint the fullscreen mode interface, I found that changing the window opacity made it work, and then it was easy to find the problem, so I fixed it.

But then, when I restored the visibility of the fullscreen mode I faced another problem with the scrollbars I was seeing before changing Mono from stable to development version: The first photo displayed when entering fullscreen mode sometimes has scrollbars, and it shouldn't as it is displayed adjusted. This time I've had no luck.

I've abandoned it, started working in trying to restore the timeline view, and I'm working on that right now. A few days ago I've installed OpenSUSE 12.3 to test the timeline widget:

F-Spot 0.8.2 in OpenSUSE-12.3

The thing I have is a bit different right now...

F-Spot/gtk3 in Ubuntu 15.04

Tags: [en], GNOME, Google Summer of Code, F-Spot, Mono, gtk-sharp, Planet GNOME

Comentarios (0)

F-Spot icon view decorations —and gtk-sharp compiled from development version

::

F-Spot icon view with tags, dates and rating stars.

With my last pull request, which you can see here, I'm trying to recover a few aesthetic features that was missing on F-Spot/gtk3, mainly the decorations of icon view mode thumbnails —date, tag icons and rating stars.

But the most interesting task I've accomplished last week was to investigate the reason of tons of weird GLib errors I was seeing when navigating through photos, just like this one:

Domain: 'GLib' Level: Critical
Message: Source ID 1915 was not found when attempting to remove it
Trace follows:
at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message)
at GLib.Log.NativeCallback(IntPtr log_domain_native, LogLevelFlags flags, IntPtr message_native, IntPtr user_data)
at GLib.Source.g_source_remove(UInt32 )
at GLib.Source.Remove(UInt32 tag)
at GLib.Idle+IdleProxy.Dispose(Boolean disposing)
at GLib.Idle+IdleProxy.Finalize()

After some debugging I've found the source of the problem: One error message was being printed for each call to g_idle_add, so I decided to write two little programs to see if the error was with F-Spot or with something between gtk-sharp or GLib itself —and I've discarded F-Spot because my C# test program had exactly the same problem.

After searching the Web finding no more than complaints about the problem, but no solutions nor explanations about it, I've been able to understand the problem simply changing the return value of the callback function I was using to perform the tests: It looks like gtk-sharp glib bindings has an error in stable version that makes GLib complain about trying to double free a non existent source if the callback you passed to g_idle_add has returned false —since returning false makes GLib free that source, so it shouldn't be freed again.

So I've compiled and installed the git version of gtk-sharp and I've started seeing weird crashes in my test programs and also in F-Spot:

Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for FSpot.Utils.XdgThumbnailSpec ---> System.DllNotFoundException: libglib-2.0-0.dll
at (wrapper managed-to-native) GLib.Marshaller:g_malloc (uintptr)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00000] in :0
at Hyena.SafeUri.FilenameToUri (System.String localPath) [0x00000] in /home/valentin/Escritorio/f-spot-sanva/external/Hyena/Hyena/Hyena/SafeUri.cs:88
at Hyena.SafeUri..ctor (System.String uri) [0x00047] in /home/valentin/Escritorio/f-spot-sanva/external/Hyena/Hyena/Hyena/SafeUri.cs:59
at FSpot.Utils.XdgThumbnailSpec..cctor () [0x00000] in /home/valentin/Escritorio/f-spot-sanva/src/Core/FSpot.Utils/XdgThumbnailSpec.cs:91
--- End of inner exception stack trace ---
at FSpot.Driver.Main (System.String[] args) [0x0006b] in /home/valentin/Escritorio/f-spot-sanva/src/Clients/MainApp/FSpot/main.cs:180
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for FSpot.Utils.XdgThumbnailSpec ---> System.DllNotFoundException: libglib-2.0-0.dll
at (wrapper managed-to-native) GLib.Marshaller:g_malloc (uintptr)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00000] in :0
at Hyena.SafeUri.FilenameToUri (System.String localPath) [0x00000] in /home/valentin/Escritorio/f-spot-sanva/external/Hyena/Hyena/Hyena/SafeUri.cs:88
at Hyena.SafeUri..ctor (System.String uri) [0x00047] in /home/valentin/Escritorio/f-spot-sanva/external/Hyena/Hyena/Hyena/SafeUri.cs:59
at FSpot.Utils.XdgThumbnailSpec..cctor () [0x00000] in /home/valentin/Escritorio/f-spot-sanva/src/Core/FSpot.Utils/XdgThumbnailSpec.cs:91
--- End of inner exception stack trace ---
at FSpot.Driver.Main (System.String[] args) [0x0006b] in /home/valentin/Escritorio/f-spot-sanva/src/Clients/MainApp/FSpot/main.cs:180

In short, I've found this link and with the help of

ldconfig -p | grep 'libraryname'

I've been able to fix my system creating a symbolic link to every *.so file with the name Mono was expecting...

And now the GLib critical warnings are gone.

Tags: [en], GNOME, Google Summer of Code, F-Spot, Mono, gtk-sharp, glib, Planet GNOME

Comentarios (0)

F-Spot displaying photos again using GTK3

::

F-Spot window displaying a photo.

I feel that this GSoC is going better than the last one in which refers to the usefulness of my participation in F-Spot development —things have changed to better with Gtk# 3, and it looks like the F-Spot internals studying last year is paying back now. I'm still a bit slow programing with C# —I'm a PHP developer— and I'm still learning stuff about the new drawing model with Cairo, but now it looks like the thing is going in the right direction: Now F-Spot is displaying photos again, through Cairo instead of deprecated GtkWindow drawing functions and in GTK3 —it's cool.

This week I'll be working on restoring icon view decorations/captions —i.e. date, rating stars and tags icons— and I'm going to continue investigating weird errors that I don't understand, like the crashes on program exit and a big amount of logs like the next one when I navigate between photos:

Domain: 'GLib' Level: Critical
Message: Source ID 1915 was not found when attempting to remove it
Trace follows:
at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message)
at GLib.Log.NativeCallback(IntPtr log_domain_native, LogLevelFlags flags, IntPtr message_native, IntPtr user_data)
at GLib.Source.g_source_remove(UInt32 )
at GLib.Source.Remove(UInt32 tag)
at GLib.Idle+IdleProxy.Dispose(Boolean disposing)
at GLib.Idle+IdleProxy.Finalize()
Domain: 'GLib' Level: Critical

Tags: GNOME, [en], Google Summer of Code, F-Spot, Mono, Planet GNOME

Comentarios (0)

Another great Google Summer of Code

::

That's all folks! Another GSoC is reaching it's end. This was my 3rd Summer of Code, and following the same idea of the first one: Provide face detection features to GNOME.

I've started my first year implementing a new tool for Shotwell that would allow the users to tag people faces in photos. The concept is very simple, and it is widely used in very well known social networks. I've implemented it in Shotwell and it works pretty well, but it was considered incomplete and so it isn't included in any stable release —even with the inclusion of face detection during my second GSoC. There are some instructions I wrote that may still work to compile Shotwell with Faces Tool.

Well, my first idea to this GSoC was to complete Shotwell's Faces Tool by adding face recognition and fixing bugs, but Yorba didn't get into this GSoC, so it has not been possible. And I've received that bad news really close to the student proposals deadline, with my proposal sent and all. But I've received an e-mail from GNOME people encouraging me to try to develop the same idea into another GNOME program, and so I've contacted Stephen Shaw, F-Spot's maintainer and my mentor in this GSoC. We spoke about the project and he showed interest, so I applied for both GNOME and Mono with the same idea: Implement Faces Tool in F-Spot, with face detection using OpenCV.

Most of the project was about porting Shotwell's Faces Tool, written in Vala, to F-Spot, which is written in C# —a language I've learned just a week before starting with F-Spot. The most challenging aspect of this project was getting enough knowledge about the F-Spot internals and way of doing things —i.e. it's architecture and design— to be able to adapt the mentioned port to be able to do things in F-Spot —I mean event handling, drawing, persistency, etc.

Now you can see F-Spot with Faces tool, and you have face detection using OpenCV —very improvable, by the way. There are still bugs and leak of functionality —e.g. you can't search all images of the same person—, but I think that is a good start. Having to work and study will have a negative impact on my ability to keep contributing, but well, I'll try.

With no more delay, here you have a screencast of F-Spot with Faces Tool:

Current status of F-Spot's Faces Tool

You can get the code at https://github.com/mono-soc-2013/f-spot/tree/faces-tool.

I really want to thank Google, Mono, Stephen Shaw and GNOME for allowing me and helping me with this :)

And Google, really: thanks.

For most of us —speaking only in my name, of course, but I'm sure I'm not alone—, this is the best way —and maybe the only— of learn, improve our curriculum vitae and contribute to Open Source at the same time and in a real-world environment.

Tags: Google Summer of Code, F-Spot, face detection, Mono

Comentarios (0)

My 2nd GUADEC

::

Sponsored by GNOME Foundation

From July 31th to August 5th I've been at Brno, Czech Republic, attending GUADEC 2013. This was a great experience where I've met some great FOSS-related people —from developers to translators, designers, etc.

So let me summarize the trip.

GNOME banner at Faculty of Information Technologies

The conferences

The main purpose of the GUADEC, of course. I've attended lots of conferences covering a broad variety of areas including news in the GNOME stack technologies, Wayland, Clang and Webkit. If I should choose two of those conferences they would be:

  • Rich custom user interfaces with Glade and CSS: With web development as my main area of knowledge, the support for CSS in GTK+ is something really interesting to me. More over, the Glade-created presentation that Juan Pablo Ugarte made for us was awesome —real feeling of awesomeness when he told us that the presentation we were looking at was in fact an stand-alone GTK+ program created with Glade running fullscreen. Great.
  • Sandboxed applications for GNOME: Lots of things that would achieve an incredible step forward in the GNOME desktop, applying some concepts that we can already see in the mobile desktop —for example the one about having applications that acts as service providers, like when you need to upload some photo to Instagram and the phone offers you to choose your photo browser application, your camera, or another application that offers the service photo provider.

Dinner sponsored by Red Hat and Igalia

The people

Even spending most of the time between Spanish speakers, GUADEC was a multicultural experience to enjoy. I had some beers with a couple of nice Netherlander translators and Marcos Chavarría, speaking mainly about trappist beer ;)

We attended social events like the awesome dinner at Klub Flèda sponsored by Igalia and RedHat, the one at Starobrno Brewery sponsored by Mozilla, another dinner mainly with Spanish people... yes, we like to have dinner (:

Views from Líšeň Castle, Brno

The city

Brno is a beautiful city. I have not been in Czech Republic before, and although the first feeling about Brno was that it is a boring place, it took little time to change my mind about it. There are cool places there, and it is bigger than it may seem in the first place —I realized that when Marcos, Carlos Soriano and I went to Líšeň Castle, from where you can see how big the city is.

Great food while at a street concert in Brno

We even went to a concert in some nice park by chance when visiting the city center.

The Foundation

Attending GUADEC has been possible to me thanks to being sponsored by The GNOME Foundation, so I want to openly thank them. Thanks people!! I'll love to attend GUADEC again next year to listen all the GNOME-related new stuff and see again the lovely people I met.

Tags: [en], GNOME, Brno, Google Summer of Code, GUADEC

Comentarios (0)

Compiling Shotwell with Faces support in Ubuntu 12.10

::

Since my last contribution to Shotwell in September, I've been seeing some interest about compiling Shotwell with Face Recognition and some variants of that same goal.

Well, first of all, let me say that I'm really sorry about the fact that I've stopped contributing to the project in a regular basis —having to work and study makes it difficult, I'm sure most of you know the feeling.

Anyway, I've got a little free time and I've decided to try to compile Shotwell in a freshly installed Ubuntu 12.10 system with Faces tool. But, first of all, let me say that this tool is in a development status, so it is incomplete —e.g. there is no face recognition feature yet, only face detection— and could be not so stable. You can and should make a copy of your Shotwell database just in case running this version of Shotwell hurts it. You have the instructions to do so at [1].

To compile Shotwell:

  1. Install Git: $ sudo apt-get install git
  2. Install Shotwell dependencies:
    1. Available in Ubuntu 12.10: $ sudo apt-get install libgconf2-dev libgee-dev libgexiv2-dev libglib2.0-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgtk-3-dev libgudev-1.0-dev libexif-dev libgphoto2-2-dev libraw-dev librest-dev libsoup2.4-dev libxml2-dev libsqlite3-dev m4 libunique-3.0-dev libwebkitgtk-3.0-dev valac-0.18 libjson-glib-dev libopencv-dev
    2. GStreamer 1.0:
      1. Add the GStreamer developers' PPA to your system: $ sudo add-apt-repository ppa:gstreamer-developers/ppa
      2. Update your packages database: $ sudo apt-get update
      3. Install needed GStreamer packages: $ sudo apt-get install libgstreamer1.0-dev gir1.2-gstreamer-1.0 libgstreamer1.0-0 libgstreamer-plugins-base1.0-dev
  3. Clone Shotwell repository —this will create a «shotwell» folder in your current working directory: $ git clone git://yorba.org/shotwell/ ./shotwell
  4. Go to that folder: $ cd ./shotwell
  5. Switch to «faces» branch: $ git checkout faces
  6. Configure enabling faces tool: $ ./configure --enable-faces
  7. Make: $ make
  8. And now you can run it:
    • To use a new, separate database: $ ./shotwell -d ./shotwell-data
    • To use your installed Shotwell's database —not recommended if you doesn't want to install the Git non-stable version: $ ./shotwell
  9. And install it into your system —optional, not recommended since it's a development version: $ sudo make install

[1] http://redmine.yorba.org/ projects/shotwell/wiki/ ShotwellFAQ#How-can-I-back-up- my-Shotwell-library

Tags: [en], Google Summer of Code, Shotwell, Planet GNOME

Comentarios (0)

Shotwell Faces Tool: Informe Semanal 12 y 13 (Informe final)

::

Hola a todos!

Este Google Summer of Code ha sido increíble. No solo por trabajar en Shotwell, si no por trabajar en Shotwell de nuevo, aprender sobre OpenCV, programar en C++ y Vala, mejorar mi nivel de inglés, y por supuesto conocer gente de GNOME —y, más aún, de Yorba— y ver cierta expectación de la comunidad acerca de mi trabajo.

Estas últimas dos semanas he estado trabajando en la integración de la detección facial y ya lo tengo realmente funcionando —pero, y me disculpo de nuevo por ello, aún tendréis que esperar un poco más para poder verlo en vuestras propias máquinas. Y esto es porque aún sigo trabajando en reincorporar la herramienta Caras al repositorio principal de Shotwell corrigiendo errores que hacen que mi código no cumpla con los altos niveles de calidad de Yorba —nada de lo que quejarse, al contrario, es lo que hace que uno crezca como desarrollador, y los motivantes well done que mi mentor a veces escribe son algo impagable.

Y ya que aún no he terminado mi trabajo —como el año pasado, estoy empezando a pensar que siempre trato de hacer más de lo que puedo—, e incluso considerando que es algo que no contará para Google, seguiré colaborando con Shotwell más o menos tres semanas —me encantaría contribuir más, y podría darse el caso, pero no puedo prometerlo ya que debo trabajar y estudiar.

Para terminar, dejadme recordaros que existe una página del proyecto [1] donde podéis encontrar mi propuesta original con su fallida planificación, así como enlaces a todos mis informes y a los repositorios relevantes en GitHub.

Gracias a Google, GNOME y Yorba por permitirme hacer esto de nuevo (:

[1] http://redmine.yorba.org/projects/shotwell/wiki/FacesTool

NOTA: Esto es una traducción del original en inglés, aquí → http://sanva.net/blog/116/

Tags: Google Summer of Code, Shotwell

Comentarios (3)

Shotwell Faces Tool: Weekly Report 12 & 13 (Final GSoC report)

::

[ NOTE: Spanish translation in http://sanva.net/blog/117/ ]

Hi all!

This Google Summer of Code has been incredible. Not only for the coding in Shotwell, but also for being coding in Shotwell again, learning OpenCV stuff, coding in C++ and Vala, improving my English level, and of course meeting GNOME —and even more, Yorba— people and seeing some community expectation about my work.

These last two weeks I've been working in face detection integration and now I have it actually working —but, and sorry again for that, you have to wait a little while more to see it in your own machine. And that is because I'm still working to reincorporate Faces Tool to Shotwell main repository by fixing bugs that are dissatisfying Yorba high quality standards —nothing to complain about, on the contrary, it is something that makes someone to grow up as a developer, and the motivational well done that my mentor sometimes writes is something invaluable.

And since I haven't finished my work —like last year, I'm starting thinking that I always try to do more that I can—, and even considering the fact that it won't count to Google, I'm going to keep contributing to Shotwell by more or less three weeks —I wish to contribute more, and it may be, but I can't promise that due to having to work and study.

To finish, let me remind you that there is a project page [1] where you can find my original proposal with its failed schedule, links to all my reports, and to my GitHub relevant repositories.

Thanks to Google, GNOME and Yorba to let me doing this again (:

[1] http://redmine.yorba.org/projects/shotwell/wiki/FacesTool

Tags: [en], Planet GNOME, Google Summer of Code, Shotwell

Comentarios (0)

Shotwell Faces Tool: Informe Semanal 09, 10 y 11

::

Estas últimas tres semanas han sido memorables, y por supuesto es por haber ido a la GUADEC [1] —sí, nada nuevo bajo el sol, todo el mundo que ha ido está diciendo lo mismo.

La GUADEC ha sido realmente una buena experiencia, y no solo por las charlas sino también por la gente que hemos[a] conocido —Y realmente hemos sociabilizado menos que otros, por estar en casa[b] y por mi timidez hablando inglés. Pero desde luego esto no lo escribo en plan triste, hemos conocido a gente muy agradable —quizá la mejor parte haya sido conocer a mi mentor, Lucas Beeler [2], in the main hacking space in the lobby[*] de la facultad para hablar acerca de los hitos de las semanas siguientes para hacer de este proyecto una realidad, y acabar hablando de San Francisco, las universidades de Estados Unidos, etc.

También he participado en las charlas relámpago con los demás participantes del GNOME outreach program hablando de mi proyecto, la cual ha sido una muy buena forma de hacer mi primera charla en público[c] —vale, solo 2-3 minutos, pero it's something. Gracias de nuevo[d] a Marina Zhurakhinskaya por convencerme. Además, después de la charla, un par de tíos de Igalia [3] se me acercaron para darme algo de información sobre una posible tercera parte de mi proyecto que mencioné al final de la misma —una gente muy agradable, gracias por compartir (:

Y bueno, volviendo al tema principal de estos informes: También he estado trabajando en la siguiente fase del proyecto, corregir varios errores que ya habían sido notificados el año pasado. En las semanas siguientes empezaré la integración de los programas de detección y reconocimiento facial en Shotwell —la parte más complicada pero también la parte verdaderamente tangible de todo el proyecto.

[a] Utilizo la primera persona del plural porque he ido a la GUADEC acompañado de mi verdaderamente motivado amigo Santi.

[b] Este año la GUADEC se ha celebrado en la facultad de informática de A Coruña, donde he estado estudiando durante tres años antes de cambiarme a Santiago de Compostela.

[*] La expresión es la que utilizó originalmente Lucas para referirse al sitio donde quedamos, y a Santi y a mí nos pareció muy graciosa por lo de main hacking space xDDD

[c] Nunca había hecho nada parecido ni siquiera en español —estoy esperando a que salga el vídeo para ver si realmente lo he hecho de una forma más o menos decente xDDD

[d] La conocí brevemente en persona (:

[1] http://guadec.org/

[2] http://yorba.org/about.html

[3] http://www.igalia.com/

NOTA: Esto es una traducción del original en inglés, aquí → http://sanva.net/blog/114/

Tags: Google Summer of Code, Shotwell, GUADEC

Comentarios (0)

Redondela en Foto 8.6.11 - XHTML 1.0 Strict - CSS - Política de Privacidad